RE: [S2] ScopedModelDriven issues [newbie]
Based on the documentation I didn't think so. The interceptor appears to be correctly persisting the object in the session. It just seems that the model is not being populated on form submission. Is there something obvious I should check to ensure that the model is being properly populated? Is it something to do with the getScopeKey() method? -Original Message- From: Cory D. Wiles [mailto:[EMAIL PROTECTED] Sent: Saturday, September 29, 2007 9:12 AM To: Struts Users Mailing List Subject: Re: [S2] ScopedModelDriven issues [newbie] Wouldn't you also have to include the SessionAware interceptor in your "myForm" stack as well as implement the SessionAware Interface or is that over kill for scopedModelDriven? On 9/28/07, ghodgins <[EMAIL PROTECTED]> wrote: > > > Does anyone have a working example using the scopedModelDriven > interceptor to work for a session bean? > > I've tried with the following: > > 1. define interceptor in struts.xml > ... > > > class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor" > > <param name="scope">session</param> > <param name="name">myForm</param> > <param name="className">model.MyFormBean</param> > > > ... > > 2. define interceptor-ref for action(s) in struts.xml > > > ... > > > > 3. Action class extends ScopedModelDriven > > public class MyAction extends ActionSupport implements > ScopedModelDriven { ... > private String scopeKey; > private MyFormBean model; > ... > public String getScopeKey() { > return scopeKey; > } > > public void setScopeKey(String key) { > scopeKey = key; > } > > public void setModel(MyFormBean model) { > this.model = model; > } > > public MyFormBean getModel() { > return model; > } > } > > 4. attempt to populate a property of MyFormBean via JSP form: > > > > > > > With this setup, the model is persisted in the session, however, none > of my properties are populated or preserved in subsequent > actions/screens. > > I'm sure I'm missing something trivial or completely misunderstanding > something but any help is appreciated. > > Thanks, > Grant > > > > Tracy12 wrote: > > > > Hi, > > > > Has any one successfull getting ScopedModelDriven with session > > scoped form beans, > > > > I tried several times and it failed, the values only remains for > > request scope, it get reset each time. > > > > Is this a bug. > > > > Plese let us know how to proceed. > > > > Thanks > > > > > > > > > __ > __ > > Don't pick lemons. > > See all the new 2007 cars at Yahoo! Autos. > > http://autos.yahoo.com/new_cars.html > > > > > > - To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/ScopedModelDriven-issues-tf3776022.html#a1295024 > 8 Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > Notice Regarding Confidentiality This email, including any and all attachments, (this "Email") is intended only for the party to whom it is addressed and may contain information that is confidential or privileged. Sierra Systems Group Inc. and its affiliates accept no responsibility for any loss or damage suffered by any person resulting from any unauthorized use of or reliance upon this Email. If you are not the intended recipient, you are hereby notified that any dissemination, copying or other use of this Email is prohibited. Please notify us of the error in communication by return email and destroy all copies of this Email. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [S2] ScopedModelDriven issues [newbie]
Wouldn't you also have to include the SessionAware interceptor in your "myForm" stack as well as implement the SessionAware Interface or is that over kill for scopedModelDriven? On 9/28/07, ghodgins <[EMAIL PROTECTED]> wrote: > > > Does anyone have a working example using the scopedModelDriven interceptor > to > work for a session bean? > > I've tried with the following: > > 1. define interceptor in struts.xml > ... > > > class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"> > session > myForm > model.MyFormBean > > > ... > > 2. define interceptor-ref for action(s) in struts.xml > > > ... > > > > 3. Action class extends ScopedModelDriven > > public class MyAction extends ActionSupport implements > ScopedModelDriven { > ... > private String scopeKey; > private MyFormBean model; > ... > public String getScopeKey() { > return scopeKey; > } > > public void setScopeKey(String key) { > scopeKey = key; > } > > public void setModel(MyFormBean model) { > this.model = model; > } > > public MyFormBean getModel() { > return model; > } > } > > 4. attempt to populate a property of MyFormBean via JSP form: > > > > > > > With this setup, the model is persisted in the session, however, none of > my > properties are populated or preserved in subsequent actions/screens. > > I'm sure I'm missing something trivial or completely misunderstanding > something but any help is appreciated. > > Thanks, > Grant > > > > Tracy12 wrote: > > > > Hi, > > > > Has any one successfull getting ScopedModelDriven with > > session scoped form beans, > > > > I tried several times and it failed, the values only > > remains for request scope, it get reset each time. > > > > Is this a bug. > > > > Plese let us know how to proceed. > > > > Thanks > > > > > > > > > > > Don't pick lemons. > > See all the new 2007 cars at Yahoo! Autos. > > http://autos.yahoo.com/new_cars.html > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/ScopedModelDriven-issues-tf3776022.html#a12950248 > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: [S2] ScopedModelDriven issues [newbie]
Does anyone have a working example using the scopedModelDriven interceptor to work for a session bean? I've tried with the following: 1. define interceptor in struts.xml ... session myForm model.MyFormBean ... 2. define interceptor-ref for action(s) in struts.xml ... 3. Action class extends ScopedModelDriven public class MyAction extends ActionSupport implements ScopedModelDriven { ... private String scopeKey; private MyFormBean model; ... public String getScopeKey() { return scopeKey; } public void setScopeKey(String key) { scopeKey = key; } public void setModel(MyFormBean model) { this.model = model; } public MyFormBean getModel() { return model; } } 4. attempt to populate a property of MyFormBean via JSP form: With this setup, the model is persisted in the session, however, none of my properties are populated or preserved in subsequent actions/screens. I'm sure I'm missing something trivial or completely misunderstanding something but any help is appreciated. Thanks, Grant Tracy12 wrote: > > Hi, > > Has any one successfull getting ScopedModelDriven with > session scoped form beans, > > I tried several times and it failed, the values only > remains for request scope, it get reset each time. > > Is this a bug. > > Plese let us know how to proceed. > > Thanks > > > > > Don't pick lemons. > See all the new 2007 cars at Yahoo! Autos. > http://autos.yahoo.com/new_cars.html > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/ScopedModelDriven-issues-tf3776022.html#a12950248 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]