struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chen, Gin" <Gin.C...@NielsenMedia.com>
Subject RE: Newbie.... Best Practices for ActionForms
Date Mon, 02 Jun 2003 15:44:54 GMT
1) Having it that way is definetly the easiest/safest route to go.
Check out BeanUtils (jakarta commons) for BeanUtils and PropertyUtils. They
will help do the conversion to the types you need for you.
2) Same as above. There are alot of other date practices that work. Check
the archives to see some other solutions.
-Tim

-----Original Message-----
From: Aaron Longwell [mailto:listservs@newmedialogic.com]
Sent: Monday, June 02, 2003 11:39 AM
To: Struts User List
Subject: Newbie.... Best Practices for ActionForms


I am beginning my first Struts project with this setup:

mySQL Database
Tomcat 4
OJB (ObjectRelationalBridge)

My questions:

1) What is the best practice for the properties in an ActionForm bean? 
Because HTTP sends everything from forms as strings, do I make all 
properties Strings, then convert them in the Action (after validating of 
course)?

2) I am using a mySQL DateTime column in the database. What is the best 
practice for editing these values via Struts? Do I put a java.util.Date 
proeprty in the Action form? Or do I use a String (as in Q #1) and then 
do a conversion in the Action?

I am building an event manager... so the StartDate (actually 
StartDateTime) and EndDate (EndDateTime) are central to this 
application. I have not seen any examples of people editing DateTime or 
even Date values in a struts application.

Could someone with experiece in this area give me a brief explanation of 
the recommended workflow for editing dates?

Thanks,
Aaron Longwell


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message