RE: ActionForm Defaults/Updates Question

2002-02-20 Thread Dua, Amit
14, 2002 8:44 PM To: 'Struts Users Mailing List' Subject: RE: ActionForm Defaults/Updates Question Here is what I do. User (Generic Value Object) UserBean (Extends form bean) On initial page we have a link to viewUser.do?userId=100 In the Action class correspoding to viewUser.do, in the perform

RE: ActionForm Defaults/Updates Question

2002-02-15 Thread Ronald Haring
That's what I do to. Putting initialisation logic (like setting defaults) in the form makes it a very strange object. Partly a Utility for passing data between Forms Action classes partly a controller fetching data from the model to make it accessible to the JSP. The second part there

RE: ActionForm Defaults/Updates Question

2002-02-15 Thread Keith
I don't use validate(). The only validation I have is in the business logic. The business class that does validation accepts returns a string version of the data (as well as the proper data type). validate() introduces a new element of execution flow into the design (validation occurs in 2 diff.

Re: ActionForm Defaults/Updates Question

2002-02-15 Thread Ted Husted
If validation fails, the controller forwards to the input property, which can be an action that populates any static properties on the action form bean. Ronald Haring wrote: That's what I do to. Putting initialisation logic (like setting defaults) in the form makes it a very strange

Re: ActionForm Defaults/Updates Question

2002-02-14 Thread Mark Woon
[EMAIL PROTECTED] wrote: 1. What is the best way to load default values into an ActionForm bean that will show up the first time a user visits the site and pulls up a jsp page? You know, this question has come up a bunch of times, but I've never seen any good responses. If I've got a form in

RE: ActionForm Defaults/Updates Question

2002-02-14 Thread Jakkampudi, ChandraseKhar
-Original Message- From: Mark Woon [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 4:22 PM To: Struts Users Mailing List Subject: Re: ActionForm Defaults/Updates Question [EMAIL PROTECTED] wrote: 1. What is the best way to load default values into an ActionForm bean that will show up

Re: ActionForm Defaults/Updates Question

2002-02-14 Thread Ted Husted
The best approach is to never let the user go directly to a JSP page. Always pass control through an Action first, which gives you the opportunity to pre-populate forms, and a number of any other things. To prime the pump, you can have the index.jsp forward to an Action. After that it should

Re: ActionForm Defaults/Updates Question

2002-02-14 Thread theron . kousek
] nford.EDU cc: Subject: Re: ActionForm Defaults/Updates Question 02/14/02 02:22 PM

Re: ActionForm Defaults/Updates Question

2002-02-14 Thread Mark Woon
[EMAIL PROTECTED] wrote: In the end, I've just grabbed the Form bean from the pageContext Pardon my ignorance but can you tell me the syntax in your JSP page to do just that above?I think I'll need to be doing the same thing. % MyForm form = (MyForm)pageContext.getAttribute(form_name,

RE: ActionForm Defaults/Updates Question

2002-02-14 Thread Jakkampudi, ChandraseKhar
()%/ .. .. /html:form -JC -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 6:52 PM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: Re: ActionForm Defaults/Updates Question In the end, I've just grabbed

Re: ActionForm Defaults/Updates Question

2002-02-14 Thread CyberZombie
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 14, 2002 6:52 PM To: Struts Users Mailing List Cc: [EMAIL PROTECTED] Subject: Re: ActionForm Defaults/Updates Question In the end, I've just grabbed the Form bean from the pageContext Pardon my

Re: ActionForm Defaults/Updates Question

2002-02-14 Thread CyberZombie
snip / I use reset() to provide all 'best guess' defaults. Within reset(), I do not do any checks as to the input path, etc. -- strictly stateless initialization. All other defaults initialization is either done by the Session bean by the return of the VO to my