Hi John,

I have debugged the application to find out where exactly, a new 
context object is being created and have these interesting
findings in my log file :

Default execution : 
-------------------

WebMacroSitePage : context : 
org.webmacro.servlet.WebContext@1945c404
WebMacroSiteScreen : context : 
org.webmacro.servlet.WebContext@1945c404
Screen - Login : context : 
org.webmacro.servlet.WebContext@1945c404
WebMacroSiteScreen : context : 
org.webmacro.servlet.WebContext@1945c404

--->everything looks fine here

When Login fails :
------------------

WebMacroSiteAction : context : 
org.webmacro.servlet.WebContext@9e91c404
Action - LoginUser : context : 
org.webmacro.servlet.WebContext@9e91c404  <----
WebMacroSitePage : context : 
org.webmacro.servlet.WebContext@20c5c405  <----
WebMacroSiteAction : context : 
org.webmacro.servlet.WebContext@20c5c405
WebMacroSiteScreen : context : 
org.webmacro.servlet.WebContext@20c5c405
Screen - Login : context : 
org.webmacro.servlet.WebContext@20c5c405
WebMacroSiteScreen : context : 
org.webmacro.servlet.WebContext@20c5c405                        
                                                                -
-----> you will notice that after action-LoginUser is executed,
it executes the page again and that is where it is creating a 
new context object and passing it to screen module instead
of passing the context object already created in action module.
That is why I am loosing data in my screen module.

How do I fix it ?

Thanks

Venkat  







Sorry to state the obvious, but just so it doesn't get missed.  
You are
obviously creating a new context in your Screen module.  There 
is a helper
method in many of the WebMacro modules that is used  to get the 
context.  If one
does not exist this helper method uses the service to create 
one.  It then
places it into an object which is stored in RunData 
(TemplateInfo).  So that the
next time (in another module, most likely) the helper method is 
invoked it will
return the one in TemplateInfo in RunData.

So all I can say is track down why this process is breaking down 
for you.

BTW, in the velocity service I added a method like this to the 
service, so that
it did not have to be repeated in every module.

John McNally

[EMAIL PROTECTED] wrote:
> 
> Hi Jon,
> 
> I do not put any data into turbine RunData object. What I do
> is this :
> 
> context.put("key", key);
> context.put("value", value);
> 
> I call this in my Screen module (for debugging) as :
> 
> context.get("key");
> 
> and also in my template as :
> 
> $key
> 
> I get 'null' in both the places.
> 
> Thanks
> 
> Venkat
> 
> on 10/20/2000 6:59 AM, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]>
> wrote:
> 
> > Hi,
> >
> > I have been using developer's daily snapshot of Turbine dated
> 20000905 and am
> > happy with it so far.
> >
> > For the time being, I have the following problem :
> >
> > I have observed that the data I stuff in context object in my
> Action module is
> > not being passed on to my Screen module.
> >
> > I use complete Webmacro site model.
> >
> > Has anyone has any idea ?
> >
> > Thanks
> >
> > Venkat
> 
> Nope, no idea. Works fine here. What "data" are you "stuff"ing
> into it? In
> most cases, with the WM model, you would put something into the
> context, not
> into the RunData object.
> 
> -jon
> 
> --
> http://scarab.tigris.org/    | http://noodle.tigris.org/
> http://java.apache.org/      | http://java.apache.org/turbine/
> http://www.working-dogs.com/ |
> http://jakarta.apache.org/velocity/
> http://www.collab.net/       | http://www.sourcexchange.com/
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-
> dogs.com/>
> Problems?:           [EMAIL PROTECTED]
> 
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Search: <http://www.mail-archive.com/turbine%40list.working-
dogs.com/>
> Problems?:           [EMAIL PROTECTED]


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-
dogs.com/>
Problems?:           [EMAIL PROTECTED]
                                                                
                                


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to