The context does not automatically persist from page to page. To achieve that type of functionality, you'd need to put the objects in the user's session or re-create them on each page load.
- Stephen > -----Original Message----- > From: Andy Whalen [mailto:[EMAIL PROTECTED]] > Sent: Sunday, July 14, 2002 3:59 PM > To: [EMAIL PROTECTED] > Subject: Velocity Context Objects being dropped > > Hi, > > As per the thousands of recommendations scattered throughout this newsgroup, I > have stuck with Turbine 2.1 to develop an intranet site. This framework is > tremendous! > > I'm having one little problem: I'm using VM templates for my front end, but for some > reason, whenever I instantiate an object and insert it into the Context, it disappears > upon instantiation of the next page. I.e., > > in FooAction.java > doBuildTemplate( data, context ) { > context.put( "bar", new Bar() ); > } > > then, on the next page that loads, MyFooBar.vm: > > $bar.toString() > > prints out an error message, "$bar.toString() is an invalid reference." Indeed, if I do a > S.o.p. of "context.get( "bar" )" in the class matching MyFooBar.vm, it says "null". > > Oh contrare! > > The RunData object is there, but that's all - I can't get any other type of object to > "stick". In Turbine Velocity, there's no "merge" function like in standalone Velocity, so > I'm frankly out of ideas. > > Does anyone have any wisdom they could impart upon me? I am in desperation! > > Best, > > ================================ > Andy Whalen > http://www.andywhalen.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
