yes..the form bean which was submitted contains the previous data..But the data which u are going to put on screen will not necessarily be in same form bean(mostly in another form bean)and also will be rendered by another action....so the data processing action and data populating action are different here using different form beans...Didn,t u get my earlier post about the same ?or am i replying the same mail again :-((
-----Original Message----- From: suresh.addagalla [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 12:17 PM To: Sakhare, Shirishchandra; struts-user Subject: RE: Validator (newbie) Hi, Using request scope instead of session makes sense. One question on your suggestion. Usually the form bean represents the form data of the "previous" page. The data, which is required to be put in the view (JSP), most probably would not be present in the form bean. So, how can we say that using the form bean is the best idea. In the scenario which I described, what can be the alternative and best practise? Thanks, Suresh >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED]] >Sent: Wednesday, December 18, 2002 4:37 PM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: RE: Validator (newbie) > > >U r first Q ,I dont know ...But abt 2nd may be i have some >suggestion form my >experience with struts .. >>>>2. What is the standard way to pass data from Action >objects to the JSP >(view)? Should the data be sent as a) Session properties, b) Some bean >objects, or c) Data members of the Action object? > >GEnerally u should try to avoid using session variables.So the >standard way is >to pass the data in request scope.So if the data u want to use >in jsp is >attribute of the formBean,then as the form bean is available >to the jsp , u can >use it there...I think this keeps the design clean as the form >bean actually >represents the form data..So u dont have to look at the action >class to see >what u are trying to put on jsp..The form bean is the place... > >-----Original Message----- >From: suresh.addagalla [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, December 18, 2002 12:02 PM >To: struts-user >Subject: Validator (newbie) > > >Hi, > >I have a couple of basic questions. > >1. If we use ActionForm, the ActionServlet first executes the >validate() >method before calling execute() on the corresponding Action. >If I switch >from ActionForms to Struts Validator (that is, use >ValidatorForm instead >of ActionForm), do things work the same way? Is it that in this case >also, ActionServlet calls the validate() just before calling the >execute()? > >2. What is the standard way to pass data from Action objects to the JSP >(view)? Should the data be sent as a) Session properties, b) Some bean >objects, or c) Data members of the Action object? > >Thanks, >Suresh > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

