I narrowed down the problem to a combination of what AnnotatedClassActionResolver and DispathHelper do.
In AnnotatedClassActionResolver method ActionBean getActionBean(ActionBeanContext context, String path): The bean returned is the bean from previous request and the ActionBeanContext is not updated except for request property. Then DispatchHelper sets the bean as ActionBean in ExecutionContext, but does not update ExecutionContext's ActionBeanContext. When DispatchHelper sets the event name, it sets in in ExecutionContext's ActionBeanContext, but not in ActionBean's ActionBeanContext. So we have 2 different events. One in ExecutionContext and one in the ActionBean. The Wizard throws an exception because it checks startEvents againts ActionBean's context which is not the event that will be called. A possible patch is to update eventName in ActionBean's ActionBeanContext in DispatchHelper's resolveHandler method. Path is included in email. Christian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Poitras Christian Sent: Tuesday, May 13, 2008 11:08 AM To: 'Stripes Users List' Subject: Re: [Stripes-users] RedirectResolution calls wrong event with wrizard I fell on something event more bizare. When I remove @Wizard, the right event is called, but context.getEventName() does not match called event. Is that the expected behaviour? Here's the logs. Following logEvent is context.getEventName(). I've also included submitted parameter names sent by the browser. 2008-05-13 11:04:22,030 - TRACE - popRelationChoices - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 77 2008-05-13 11:04:23,937 - TRACE - popRelationChoices - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 85 2008-05-13 11:04:23,937 - TRACE - logEvent - update - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 106 Parameters: oids[0] _sourcePage update __fp oids[1] 2008-05-13 11:04:23,952 - TRACE - popRelations - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 92 2008-05-13 11:04:23,952 - TRACE - popRelations - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 99 2008-05-13 11:04:23,952 - TRACE - update - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 138 2008-05-13 11:04:23,952 - TRACE - update - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 140 2008-05-13 11:04:23,968 - TRACE - popRelationChoices - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 77 2008-05-13 11:04:25,874 - TRACE - popRelationChoices - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 85 2008-05-13 11:04:25,874 - TRACE - logEvent - update - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 106 Parameters: done __fsk 2008-05-13 11:04:25,874 - TRACE - popRelations - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 92 2008-05-13 11:04:25,874 - TRACE - popRelations - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 99 2008-05-13 11:04:25,890 - TRACE - done - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 148 2008-05-13 11:04:25,890 - TRACE - done - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (cloutip[P:1]) - 149 Christian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Poitras Christian Sent: Tuesday, May 13, 2008 10:00 AM To: 'Stripes Users List' Subject: Re: [Stripes-users] RedirectResolution calls wrong event with wrizard Done this. I've attached the code. Once update is called, update is called again on the redirect. Here's the logs beginning when update is called. 2008-05-13 09:59:00,383 - TRACE - logEvent - update - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 107 2008-05-13 09:59:00,399 - TRACE - popRelations - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 93 2008-05-13 09:59:00,399 - TRACE - popRelations - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 100 2008-05-13 09:59:00,414 - TRACE - update - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 135 2008-05-13 09:59:00,414 - TRACE - update - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 137 2008-05-13 09:59:00,414 - TRACE - popRelationChoices - begin - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 78 2008-05-13 09:59:02,258 - TRACE - popRelationChoices - end - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 86 2008-05-13 09:59:02,258 - TRACE - logEvent - update - ca.qc.ircm.proteus.web.user.result.UntreatedRelationAction - (poitrac[P:1]) - 107 2008-05-13 09:59:02,258 - ERROR - logger - Submission of a wizard form in Stripes absolutely requires that the hidden field Stripes writes containing the names of the fields present on the form is present and encrypted (as Stripes write it). This is necessary to prevent a user from spoofing the system and getting around any security/data checks. - ca.qc.ircm.proteus.web.handler.ExceptionHandler - (poitrac[P:1]) - 36 net.sourceforge.stripes.exception.StripesRuntimeException: Submission of a wizard form in Stripes absolutely requires that the hidden field Stripes writes containing the names of the fields present on the form is present and encrypted (as Stripes write it). This is necessary to prevent a user from spoofing the system and getting around any security/data checks. Christian -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Freddy D. Sent: Monday, May 12, 2008 6:35 PM To: [email protected] Subject: Re: [Stripes-users] RedirectResolution calls wrong event with wrizard Salut Christian, You want @Wizard(startEvents="done") for this to work. Cheers, Freddy - When - my action bean uses <at> Wizard and I return a RedirectResolution from and - event, it - tries to call the same event again causing an exception. Removing - <at> Wizard prevents the exception. - - return new RedirectResolution(this.getClass(), "done").flash(this); - - net.sourceforge.stripes.exception.StripesRuntimeException: Submission of a - wizard form in Stripes absolutely - requires that the hidden field Stripes writes containing the names of the - fields - present on the form is present and encrypted (as Stripes write it). This is - necessary to prevent a user from spoofing the system and getting around any - security/data checks. - - Christian - PS - : I use stripes 1.5 revision - 905 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
DispatcherHelper.java
Description: DispatcherHelper.java
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
