2008/8/27 Jeromy Evans <[EMAIL PROTECTED]>
>
> I vaguely an update or concern recently relating to automatic refreshing
> of the model in the ModelDriven interceptor; the interceptor gets the
> model and re sets it on the stack when it thinks it should.

I followed through your suggestion, and came up with something simple.
 If I indicate to ModelDrivenInterceptor to
"refreshModelBeforeResult", then my "StillFailingAction" now works.
Here would be the modification to struts.xml.  (Let me display the two
versions, for ease of comparison.)


/***************************************/
/* struts.xml  (old version:  failing) */
/***************************************/
<struts>
    <package name="default" extends="struts-default" abstract="false"
namespace="/" >
        <default-interceptor-ref name="paramsPrepareParamsStack"/>
        <action name="successfull"
class="com.myapp.SuccessfullAction"><result>/test.jsp</result></action>
        <action name="failing"
class="com.myapp.FailingAction"><result>/test.jsp</result></action>
   </package>
</struts>

/******************************************************/
/* struts.xml (new version: success for both actions) */
/******************************************************/
<struts>
    <package name="default" extends="struts-default" abstract="false"
namespace="/" >
        <default-interceptor-ref name="paramsPrepareParamsStack"/>
        <action name="successfull"
class="com.myapp.SuccessfullAction"><result>/test.jsp</result></action>
        <action name="failing" class="com.myapp.FailingAction"> <!--
Not failing anymore:  SUCCESS! -->
            <interceptor-ref name="modelDriven">
                <param name="refreshModelBeforeResult">true</param>
            </interceptor-ref>
            <result>/test.jsp</result>
        </action>
   </package>
</struts>


May I suggest that this kind of details would greatly gain with being
documented...  Let me know if I can be of any help in this respect.
(BTW, there are tons of typos in the guides that I am itching to correct!!!)  ;)

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

Reply via email to