Dan's got the right idea. :) in your application specification, you can do <property name="org.apache.tapestry.visit-class" value="com.foo.Bar"/>
Then the "Bar" object is the "visit" object. Then, from any page, you can call "getVisit()" to get the visit. Inside the visit object, you can store whatever information you want. The visit is automatically persisted to the session for you. >From html pages, you can then do stuff like: <span jwcid="@Insert" value="ognl:visit.user.username"/> Or whatever. >From components, it would look something like: <span jwcid="@Conditional" condition="ognl:page.visit.user.authenticated"> ... </span> Robert Dan wrote: > if u need acess to user info on all pages after login, i would store the > user info in a Visit object, and then access the user info from the > visit. you could also make a component of yours and "embed" this visit > object in the components java code. that way in all ur other html pages, > just include ur custom component and acess the user info via ognl (like: > visit.user.firstName) > > i m a newbie so dont know if the above approach is recommened or not ... :( > > -Dan > >> From: Patrick Kelly <[EMAIL PROTECTED]> >> Reply-To: "Tapestry users" <[email protected]> >> To: Tapestry users <[email protected]> >> Subject: fireObservedChange >> Date: Thu, 14 Jul 2005 11:08:05 -0600 >> >> For my project, (using Tapestry 3.0.2) I have a login page that gets >> and set the username as a string userName. I need to have access to >> this username during the session on more than 1 page. Currently in >> the login page java I call "Tapestry.fireObservedChange(this, >> "userName", userName);" on the formSubmit, and can retrieve username >> on the current page using "this.getProperty("userName")". After >> reading about the fireObservedChange this infomation should be >> retained for future use in the HTTPsession. So far, I can't figure >> out how to get the userName out on a different page. Am I going about >> this the correct way? >> >> Any help would be appreciated, >> Thanks - Patrick >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > _________________________________________________________________ > Express yourself instantly with MSN Messenger! Download today - it's > FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
