won't work with a wildcard parameter mapping Dave <action name="update/modelObject/*" class="net.myapp.web.ModelObjectActions" method="update">
The parameter simply isn't parsed in the prepare method unless it's in the form of update/modelObject.action?id=22 this is what I'm currently doing update/modelObject/22.action The parameter is parsed in the update method, but not in the prepare method (i've tried using the newton.dave wrote: > > --- meeboo <[EMAIL PROTECTED]> wrote: >> I have a class for several actions and each action is mapped to a method, >> like this: >> >> <action name="update/modelObject" >> class="net.myapp.web.modelObjectActions" >> method="update"> >> <result>/index.jsp</result> >> </action> >> >> The above action will fire when a form is submitted and the modelObject >> properties are populated via the form fields. Now that I want is to >> invoke >> a >> prepare method before the update method so that I first can read the >> model >> object from the database and then populate its fields. I did implement >> preparable in modelObjectActions but then the prepare method will be >> invoked >> before all actions in that class, I want it to be invoked just for this >> specific action. >> >> Any ideas? > > prepareUpdate. > > http://struts.apache.org/2.x/docs/prepare-interceptor.html > > Dave > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Running-a-prepare-method-before-the-assigned-action-method-tp16219260p16225398.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]