I am facing an interesting situation and looking for feedback.  I am really
enjoying minimal action configurations such as:

                <action name="wizard_*" class="acme.action.wizard.Wizard" 
method="{1}">
                        <result>/pages/wizard/${nextPage}.jsp</result>
                </action>

where my action class can decide which page to display next.  This works
fine unless a validation fails, which short circuits the action call
altogether.  I discovered the DefaultWorkflowInterceptor was checking for
errors using a call to validationAwareAction.hasErrors() and decided to
override the hasErrors() behavior in my base action class to return false. 
This allows me to determine navigation in my action class independent of the
String return type and multiple result lookup code in the struts.xml
mappings.  All of this and I continue to get appropriate validation
messages.  What seems odd is that I would have to default the hasErrors()
behavior this way.  Is there a switch or flag where I can configure the
framework to execute action always?

I realize the framework navigation logic is "wired" to use the symbolic
names as opposed to names in the action class itself.  However, I feel like
you should be able to use both schemes without weird code in a base class.

Peace,
Scott


-- 
View this message in context: 
http://www.nabble.com/Validation-vetoing-Action-invocation-tp16703623p16703623.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to