It depends on why you wanted to use dispatch action in the first place.
Yet another technique is to have multiple actions using the same action
class, but with a seperate "parameter='whatever'" attribute, where
'whatever' is 'update', 'delete' etc.
In fact you can put most common code in a base
Agreed about it being mostly syntactical sugar.
On the other hand I think defining multiple mappings for the same Action
is extremely useful. It allows you to group your functionality and
easily access shared functionality, but also provide alternative
validation and forwards without having w
You could do this same thing in Strust 1.1, except that you would need
the method parameter. In struts 1.1, the links would be:
/createSubscription.do?method=create
/editSubscription.do?method=edit
...
And with MappingDispatchAction they would be
/createSubscription.do
/editSubscription.do
...
Sorry about that link. Frames are a killer ...
http://jakarta.apache.org/struts/api/org/apache/struts/actions/MappingDispatchAction.html
Mike Foody wrote:
If you're not opposed to using 1.2 the MappingDispatchAction will
allow you to easily set up multiple action mappings, each capable of
hav
If you're not opposed to using 1.2 the MappingDispatchAction will allow
you to easily set up multiple action mappings, each capable of having
their own ActionForm, validation, etc and then actually handle these all
with a multiple methods in a single Action class.
http://jakarta.apache.org/st
Adam Hardy [mailto:[EMAIL PROTECTED]
Sent: 31 March 2004 17:13
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I mean, try changing it in the code in your action when you want to
validate, & change it back afterwards to its previous value when done.
Is that what you
1:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:
javax.servlet.ServletException: Configuration is frozen
Adam Hardy wrote:
I mean, try changing it in the code in your action when you want to
validate, & change it back afterwards to its
...if it is true
sandeep
-Original Message-
From: Paul Barry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:
javax.servlet.ServletException: Configuration is frozen
Adam Hardy wrot
29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:
javax.servlet.ServletException: Configuration is frozen
Adam Hardy wrote:
I mean, try changing it in the code in your action when you want to
validate, & change it back afterwards to its prev
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 31, 2004 11:29 AM
To: Struts Users Mailing List
Subject: Re: validator and dispatch action
I get this exception:
javax.servlet.ServletException: Configuration is frozen
Adam Hardy wrote:
> I mean, try changing it in the code in your action when you
I get this exception:
javax.servlet.ServletException: Configuration is frozen
Adam Hardy wrote:
I mean, try changing it in the code in your action when you want to
validate, & change it back afterwards to its previous value when done.
Is that what you tried?
String oldName = mapping.getName()
Ah, I got you now. No, I didn't try that, I will give it a try.
Adam Hardy wrote:
I mean, try changing it in the code in your action when you want to
validate, & change it back afterwards to its previous value when done.
Is that what you tried?
String oldName = mapping.getName();
mapping.setN
I mean, try changing it in the code in your action when you want to
validate, & change it back afterwards to its previous value when done.
Is that what you tried?
String oldName = mapping.getName();
mapping.setName("widget-edit");
form.validate(mapping, request);
mapping.setName(oldName);
On 0
The name of the action-mapping has to correspond to the name of the
form-bean.
Adam Hardy wrote:
If I really wanted to stick with your set-up, I see a way it might be
possible, although I have not done this myself.
Try changing the 'name' attribute of the mapping to the validation that
you de
If I really wanted to stick with your set-up, I see a way it might be
possible, although I have not done this myself.
Try changing the 'name' attribute of the mapping to the validation that
you defined in the validation.xml, e.g. 'widget-update' or 'widget-edit'
and then call the validate() met
Hello Everyone,
I am using the validator and dispatch actions and I am wonder what the
best way to do this is. Consider that I have the following method in a
dispatch action:
add- populates collections for drop-down lists, forwards to jsp page
create - needs to do validation and store in d
16 matches
Mail list logo