Re: Init of forms

2006-09-27 Thread Andy.de
Andy.de <[EMAIL PROTECTED]> > To: user@struts.apache.org > Sent: Tuesday, September 26, 2006 5:13:12 PM > Subject: Re: Init of forms > > > Hi Antonio, > i do not understand. The action is executed if the form is submitted, this > is > after the jsp has been displ

Re: Init of forms

2006-09-27 Thread Ilja S.
Hi Lets see in example you declare an action in struts-config like this: type="com.example.struts.action.RegistrationAction" validate="false"> Now when you access "/registration" url Your Action's class "execute" method will be called. Inside this method you get instance of "registra

Re: Init of forms

2006-09-26 Thread Antonio Petrelli
Andy.de ha scritto: Hi Antonio, i do not understand. The action is executed if the form is submitted, this is after the jsp has been displayed. Yeah, you're right I was missing a point. You have to call ANOTHER action that prepopulates an object and puts it, for example, in request scope, the

Re: Init of forms

2006-09-26 Thread Yamir Encarnacion
action in the example. You can get struts 1.1 from http://archive.apache.org/dist/struts/struts-1.1/ Yamir - Original Message From: Andy.de <[EMAIL PROTECTED]> To: user@struts.apache.org Sent: Tuesday, September 26, 2006 5:13:12 PM Subject: Re: Init of forms Hi Antonio, i do not unde

Re: Init of forms

2006-09-26 Thread Andy.de
gt; You can use DAO and DTO as Ilja suggested (though I don't like it, I > prefer domain objects, but that's another story). > > HTH > Antonio > > > --------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional

Re: Init of forms

2006-09-26 Thread Andy.de
ds > Ilja > > > --------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Init-of-forms-tf233

Re: Init of forms

2006-09-26 Thread Ilja S.
Hi Action class is right place. Common way is to have some layer working with DB like DAO pattern. Then You can have some service layer between DAO and Action which you call from Action class. Call it, get data transfer object from DB, copy its properties to ActionForm instance and forward requ

Re: Init of forms

2006-09-26 Thread Antonio Petrelli
Ilja S. ha scritto: Hi Action class is right place. Common way is to have some layer working with DB like DAO pattern. Then You can have some service layer between DAO and Action which you call from Action class. Call it, get data transfer object from DB, copy its properties to ActionForm inst

Init of forms

2006-09-26 Thread Andy.de
simple and only with forms for new objects (name=""; street=""; at reset()). Where is te correct place to init forms from database if i want edit an existing object and which method must i call I'm using Struts 1.2.9 Regads, Andy -- View this message in context: http