-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
I am looking for the best practice for writing Actions in my
application.
For example:
I have a forgot password action where the users are taken to a page
where they can enter their username and click 'sumbit' and another page
is shown saying that their password was sent to their registered
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,
I have a login page with a link with forgot password? for users to
retrieve the passwords to their email account in case they forgot it.
It's pretty trivial but still using struts what is the best practice?
Should the link inside the login page point to the ForgotPassword.jsp or
to a
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
best practice question
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, 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
21 matches
Mail list logo