There will be an ActionContext during the execution, yes, but when the #foo.blah 
method is called there will be no ActionContext, right?
So if I would for example call the  #foo.locale method (the getLocale method in 
BaseActionSupport) that method will try to access the ActionContext but it will not 
find the ActionContext that was used during the execution of the action. Imagine if I 
have a method that tries to use the ActionContext to do something with session data. 
Nothing will work as expected.
I cannot seem to find the testSimple class so if I have misunderstood something, 
please correct me.
The problem also exists in WW1 but there one can work around it by letting the action 
tag span the page, as I described before. I see no similar work-around now in WW2 
which is the reason for me asking these questions.

Best regards,

Dick Zetterberg
[EMAIL PROTECTED]

----- Original Message ----- 
From: "Jason Carreira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 06, 2003 12:57 PM
Subject: RE: [OS-webwork] How ActionTag in WW2 work?


> It should not be a problem. If you don't have an ActionContext before
> the tag, you won't have one after, but during the execution of the
> Action it will have one (ActionContext's are created in the creation of
> the ActionInvocation, which is created with the ActionProxy in the
> ActionTag). The executed Action is put into the PageContext with the Id,
> which is how Patrick was accessing it with #foo.  The unit test
> testSimple doesn't create an ActionContext before executing the tag,
> which is the same as what you're talking about.
> 
> > -----Original Message-----
> > From: Dick Zetterberg [mailto:[EMAIL PROTECTED] 
> > Sent: Friday, June 06, 2003 3:28 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [OS-webwork] How ActionTag in WW2 work?
> > 
> > 
> > 
> > ----- Original Message ----- 
> > From: "Cuong Tran" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 06, 2003 2:09 AM
> > Subject: Re: [OS-webwork] How ActionTag in WW2 work?
> > 
> > 
> > > 
> > >   #foo.blah works for me since it is simply a bean getter.  
> > Why do you 
> > > need the context?
> > > 
> > >
> > 
> > #foo.blah might be more complicated than just a bean getter. 
> > For example if I want to use the locale it might call the 
> > getLocale method (in BaseActionSupport) and that will call 
> > ActionContext. Or if I want to access something in the 
> > session etc, etc.
> > 
> > With the current code you would probably have a problem if 
> > you are doing this in a view (JSP file) that is executed 
> > directly (not as a result of an action execution). Then you'd 
> > not have any top action context from the original action. 
> > With the current action tag I see no way to use it so that I 
> > can be sure to have an action context in my page. In WW1 I 
> > could do this by putting the action start tag at the top of 
> > my JSP and the end tag at the bottom.
> > 
> > I think it is good to be rid of the lazy value holder stuff 
> > but I think the problem I describe should be solved in some 
> > way if possible.
> > 
> > Best regards,
> > 
> > Dick Zetterberg
> > [EMAIL PROTECTED]
> > 
> > 
> > > --- Dick Zetterberg <[EMAIL PROTECTED]> wrote:
> > > > ----- Original Message -----
> > > > From: "Pat Lightbody" <[EMAIL PROTECTED]>
> > > > Subject: Re: [OS-webwork] How ActionTag in WW2 work?
> > > > 
> > > > 
> > > > > The new way the action tag works is much simpler -- no 
> > more need 
> > > > > for LazyValueHolder and crap like that. Instead, just do:
> > > > > 
> > > > > <!-- FooAction execute is called here -->
> > > > > <ww:action id="foo" name"FooAction"/>
> > > > > 
> > > > > <!-- this gets properties from the FooAction --> <ww:property 
> > > > > value="#foo.blah"/>
> > > > > 
> > > > 
> > > > Does the action have an ActionContext set up for it during 
> > > > execution? (I assume there is something similar in WW2). Is this 
> > > > context removed when the action tag is closed? In that case, when 
> > > > the method #foo.blah is called later on there might not exist an 
> > > > ActionContext even though the action is executing a 
> > method?  Have I 
> > > > understood this correctly?
> > > > 
> > > > 
> > > > Best regards,
> > > > 
> > > > Dick Zetterberg
> > > > [EMAIL PROTECTED]



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to