-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 3:32 PM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
I thought that was exactly what you were doing!
Erez Efrati wrote:
The only thing you cannot do is having a mixture of this solution
, and it is needed cause the
ForgotPasswordAction.java needs this 'action' parameter to distinguish
between the two. Hmm..
Erez
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 11:43 AM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
manual validation by configuring 'validate=false' is very handy in some cases I have
also implemented it ...
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 3:13 PM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
Erez
David,
can you show the page attribute in the xml context? Is it set by a
seperate taglib or does the form tag deal with it in the HTML?
thanks
Adam
David G. Friedman wrote:
Taking your advice, it means that I would
have two different action mappings, one
for the init step and the second for
Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 11:43 AM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
Erez Efrati wrote:
One of the problem I found with 'action=init' method, is that the
validation is activated automatically for both cases (both init
send
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 3:00 PM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
That's not necessary. In the action mapping, you can specify the action
parameter with parameter=init or parameter=send
You're right it is a good option.
Thanks,
Erez
-Original Message-
From: Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 06, 2003 3:00 PM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
That's not necessary. In the action mapping, you can specify the action
PROTECTED]
Sent: Wednesday, August 06, 2003 3:00 PM
To: Struts Users Mailing List
Subject: Re: Actions Best Practice
That's not necessary. In the action mapping, you can specify the action
parameter with parameter=init or parameter=send.
Erez Efrati wrote:
Taking your advice, it means that I would have
AM
To: Struts Users Mailing List
Subject: Re: RE: Actions Best Practice
Taking your advice, it means that I would
have two different action mappings, one
for the init step and the second for the
actual action (send). But then I will have
to write something like html:link
page
Taking your advice, it means that I would
have two different action mappings, one
for the init step and the second for the
actual action (send). But then I will have
to write something like html:link page=/InitForgotPassword.do?action=init
which is a bit strange to write again the
Erez Efrati wrote:
One of the problem I found with 'action=init' method, is that the
validation is activated automatically for both cases (both init send),
and fails of course on the 'init' cause no field is yet in the form. So
I was forced to configure 'validate=false' and call it manually in
Adam,
I simply add a tag in the field ... section of my tiles definition like the snippet
below. One note to keep in mind from the documentation about the differences between
server-side validation using the page attribute and client-side validation - client
side is that page=number only,
According to MVC pattern ,alway link to action, not to JSP. This way you controler
always knows what the user is doing,
and you can add some logic if needed.
Using a request parameter to addapt action behaviour is a common Struts use (take a
look at DispatchAction).
Nico.
I have a login
is called that the action is going to do real action.
Erez
-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 2:24 PM
To: Struts Users Mailing List
Subject: Re: actions best practice question
According to MVC pattern ,alway link to action
action do you use, if any? Cause, it's only the next time the
action is called that the action is going to do real action.
Erez
-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 2:24 PM
To: Struts Users Mailing List
Subject: Re: actions
Nico, thanks a lot for the prompt answers.
Do you use for that the org.apache.struts.actions.ForwardAction ?
Erez
-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 2:48 PM
To: Struts Users Mailing List
Subject: Re: actions best practice
18, 2003 2:48 PM
To: Struts Users Mailing List
Subject: Re: actions best practice question
I use to set a specialized action-mapping for such init request, that
is a simple forward (no Action class needed)
/newUser/init.do = forward to newUser.jsp
/newUser/register.do
Thanks again Nico.
-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 3:06 PM
To: Struts Users Mailing List
Subject: Re: actions best practice question
I use a Forward action-mapping :
action path=/newUser/init
forward
Currently I used a ForgotPassword.do, and in the action I check if
there's an 'action' parameter with the value of 'send'. If the 'action'
parameter does not exist then I locally forward to the
ForgotPassword.jsp using struts-config.xml local forwards configuration.
If it does exist and equals to
19 matches
Mail list logo