Its this type of issue that is why "action chaining" has been
discouraged - the "cancel" request parameter that Struts uses will
still be there in the second action and there isn't a way you can
remove it.

Having said that the check should only be invoked for actions where
validate="true" and I wouldn't have thought your "preparation for the
homepage" acton would need validation, so perhaps you can just set
validate="false".

Alternatively you could re-direct to your second action, which then
wouldn't have the cancel request parameter and you wouldn't then need
the "cancellable" property.

Niall

On 6/26/06, jaybytez <[EMAIL PROTECTED]> wrote:

I finished reading the docs and upgrade notes for cancellable property.

I have an action that extends LookupDispatchAction and uses the cancelled
method.  I add a property (like the document shows you) for cancellable:

<set-property property="cancellable" value="true"/>

I test the page and the cancel button throughs an InvalidCancelException.
So I decided to add the property in my struts-config to the action that gets
cancelled to.  So more or less I have a Detail JSP that shows a record.
They can do a cancel and go home functionality that will process the cancel
and skip validation and forward to another action that is the preparation
for the homepage.  So once these two actions have the cancellable property,
then the cancel action works.

Why do I have to put the cancellable on both actions?  Is it because I am
forwarding from one action to another?  It seems I should only have to put
cancellable on the action that uses the cancelled method.

Thanks,

jay
--
View this message in context: 
http://www.nabble.com/Just-upgraded-to-1.2.9-from-1.2.4---Cancellable-doesn%27t-work-right--t1850117.html#a5050824
Sent from the Struts - User forum at Nabble.com.

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

Reply via email to