I actually want the screen name of the logged in user. I saw the example authorized user pluginmodel that comes with the source. I deployed it and tried to use it but I don't seem to be able to access the variables. I tried the following in the velocity templates for the frontpage and the jsp for adding entries:
debug full name $authenticated.user.fullName <br/> debug screen name $authenticated.user.screenName <br/> I also tried using the $user object: debug full name $user.fullName <br/> debug user name $user.userName <br/> None of them worked. Can anybody point out what I am doing wrong? How can I access the user model and the custom authenticated model setup with the plugin?? Cheers, Manu ________________________________ From: Henning Brune <[email protected]> To: [email protected] Sent: Friday, May 1, 2009 11:26:09 PM Subject: Re: Passing variables via context, etc.? Hello Manu, > > 1. How do I find a logged in user's screen name. I do not seem to > find that information in the published models? I you want to display the screenname of the creator of a blog entry use ' $entry.creator.screenName' But you are right. In the the roller template guide: http://apache.speedbone.de/roller/roller-4/v4.0.1/docs/roller-template-guide.pdf the attribute screenName is not documented with the 'User' model. > > 2. How can I pass information to roller via the context? How do I > access the request object in a velocity template and in a JSP file?Thanks in > advance, If you want to access the request e.g. to use request parameters you should take a look at a previous thread startin here: http://osdir.com/ml/user-roller.apache.org/2009-04/msg00005.html It is (almost) not possible to make use of request parameters in roller pages because of caching. -Henning > > Manu > > > > -- Dipl.-Inform. Henning Brune http://ekvv.uni-bielefeld.de/pers_publ/publ/PersonDetail.jsp?personId=10185 Universität Bielefeld Projekt BIS Postfach 10 01 31 D-33501 Bielefeld Die neue Homepage des BIS Projektes: http://www.uni-bielefeld.de/bis/
