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
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
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
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
Hi Antonio,
i do not understand. The action is executed if the form is submitted, this
is
after the jsp has been displayed. I want to fill the form with values from
database
before the jsp is displayed.
I need the typical 'edit' function, not create.
Regards, Andy
apetrelli wrote:
>
> Ilja S. h
Hi Ilja,
i'm using DAO patterns but the question was: how can i init a form inside an
action. I Didn't
find any method to do this and also no example. All struts samples are with
forms to create
new objects and not to edit existing objects.
regards, Andy
Ilja S. wrote:
>
> Hi
> Action class is r
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
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
8 matches
Mail list logo