Can you attach these to a Jira issue? My exchange server blocks almost
all attachments...

> -----Original Message-----
> From: Frederick N. Brier [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, September 28, 2003 4:53 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [OS-webwork] ActionTag wipes out own ActionContext
> 
> 
> I made the changes described below, and it fixed the problem. 
>  The changes 
> were very small, but did effect the ActionProxy interface.  
> The patch files 
> for XWork and Webwork are attached.  The only behavioral 
> change is that I 
> put the restoreContext() in a finally clause, so it would get 
> executed 
> regardless of whether an exception occurred in the Action 
> invoke().  Seemed 
> desirable.  Feel free to change the method names.  Let me 
> know whether this 
> is acceptable.  This again puts the body of the JSP back in 
> the body of the 
> <ww:action> tag.
> 
> Fred.
> 
> At 07:02 PM 9/27/2003, you wrote:
> >I have been back tracking through Webwork, XWork, and OGNL 
> for the last
> >several of hours (not being familiar with the codebase), and 
> might have 
> >tracked down the problem.  Since I am just starting to use 
> Webwork2, it 
> >would be great if someone else could tell me if this is the 
> problem and 
> >whether my solution would be acceptable.
> >
> >My app has an index.jsp page with an <ww:action id="homePage"
> >name="homePage"/> and within the page a property tag: <ww:property 
> >value="lookAndFeel.title"/>
> >"lookAndFeel" is a property of the action specified by 
> homePage.  It is an 
> >object that has a property "title".
> >
> >When I debug the code, the doStartTag() of the <ww:property> 
> tag shows 
> >the
> >valueStack retrieved from the ActionContext has a size of 0, 
> and so it 
> >exits - no value output.
> >
> >ActionTag.doEndTag calls executeAction().  After all the trouble of
> >creating a new ActionContext and associating it the current thread 
> >(below), the next line calls the 
> DefaultActionProxy.execute() class which 
> >on exit, restores the previous ActionContext.  The ActionContext 
> >containing the valueStack with my Action class instance is gone.
> >
> >ActionTag, Line 227, 228:
> >             proxy =
> > ActionProxyFactory.getFactory().createActionProxy(namespace, name, 
> > createExtraContext(), executeResult);
> >             proxy.execute();
> >
> >Sooo...  Possible solution: Have the ActionTag go back to the way it
> >apparently worked in WW1, nesting around the contents of the 
> JSP.  Move 
> >the functionality in the doEndTag() to the doStartTag().  Split the 
> >functionality in DefaultActionProxy.execute() into an 
> invoke() method and 
> >a pop()/restore() method.  The pop() method is called in the 
> doEndTag().
> >
> >It might also be a thought to turn the ThreadLocal where 
> ActionContext 
> >is
> >stored into a stack itself and setContext() actually does a 
> push() instead.
> >
> >I can take a swag and fixing this, but would like some confirmation 
> >that
> >this is the problem and would be an acceptable solution.  Thank you.
> >
> >Fred.
> 


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to