This approach will work but it's a non-tiles approach. What I'd really like is to have the tile (the form) populate itself instead of having the page linking to the form be responsable for populating it.
Thanks, Michael > -----Original Message----- > From: Robert Taylor [mailto:[EMAIL PROTECTED] > Sent: jeudi 13 mars 2003 18:12 > To: Struts Users Mailing List > Subject: RE: How to populate a form with data and then have the > DynaValidatorForm validate it afterwards > > > Have 2 actions: > > -PopulateFormAction > -ProcessFormAction > > When the user clicks to edit the Monitor, invoke, PopulateFormAction. > When the user submits invalid data (invoke ProcessFormAction), > the request should forward back to the input defined in the > struts-config file. All the form data still resides in the request > and should therefore be rendered again (without hitting the database). > > robert > > > -----Original Message----- > > From: Michael Mattox [mailto:[EMAIL PROTECTED] > > Sent: Thursday, March 13, 2003 11:55 AM > > To: Struts Users Mailing List > > Subject: How to populate a form with data and then have the > > DynaValidatorForm validate it afterwards > > > > > > I defined a tile like this: > > > > <definition name="monitor.urlmonitor.edit.form" > > path="/monitors/monitor_urlmonitor_edit_form.jsp" > > controllerUrl="/getMonitor.do" > > > > > </definition> > > > > Basically my getMonitor action gets the monitor from the > database and then > > the JSP displays the information in a form so the user can edit > > it. Here's > > my problem: When the user clicks to edit the Monitor, I want > to populate > > the form with the info from the database. But when the user submits, if > > there is an error, I'd like the form to be populated by the > > DynaValidatorForm. I don't see a way to do the two. In my > JSP, I can do > > one of the following: > > > > Use the DynaValidatorForm: > > > > <html:text property="name" size="20"/> > > > > Use the javabean (populated with data from the database): > > > > <html:text property="name" size="20" value="<%=monitor.getName()%>"/> > > > > But how can I have the data populate the first time only?? > > > > Thanks, > > Michael > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

