Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
-none-

-none-

2007-10-01       - By Hodgins, Grant

 Back
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:kwylez@(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 <GrantHodgins@(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
> ...
>     <interceptors>
>       <interceptor name="myForm"
>
>
class="com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor"
>
>         &lt;param name="scope">session&lt;/param>
>         &lt;param name="name">myForm&lt;/param>
>         &lt;param name="className">model.MyFormBean&lt;/param>
>       </interceptor>
>     </interceptors>
> ...
>
> 2. define interceptor-ref for action(s) in struts.xml
>     <action ... >
>       <interceptor-ref name="myForm" />
>       ...
>     </action>
>
>
> 3. Action class extends ScopedModelDriven<MyFormBean>
>
> public class MyAction extends ActionSupport implements
> ScopedModelDriven<MyFormBean> { ...
> 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:
>
> <s:form ...>
>   <s:textfield name="model.property"/>
>   <s:submit />
> </s: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: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(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: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(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: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.