I found out about these implicit variables from reading Kito Mann's excellent JavaServer Faces in Action. There are others:
#{cookie.myCookie} #{facesContext} #{header['User-Agent']} #{headerValues['Accept-Encoding'][3]} #{initParam.adminEmail} #{param.foo} #{paramValues.foo[2]} #{requestScope.foo.bar} #{view.locale} -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 1:38 PM To: MyFaces Discussion Subject: RE: is there a way to pull a session scope variable directly into a jsf tag? Thank you James and Julian. Your help is greatly appreciated. Putting all session scoped variables in one place makes sense, but at this time we have a bunch of code that treats this one value as a separate attribute. for the time being I'll use the syntax from James and going forward will just use a bean. I must not be reading the right docs because I couldn't find a reference to "sessionScope". If you have time, could you mention any docs that have helped you? Thanks again for your help. Tom "Julian Ray" <[EMAIL PROTECTED] .com> To "'MyFaces Discussion'" 07/27/2006 03:04 <users@myfaces.apache.org> PM cc Subject Please respond to RE: is there a way to pull a "MyFaces session scope variable directly Discussion" into a jsf tag? <[EMAIL PROTECTED] ache.org> We put all our session scoped variables into a managed bean which has session scope. It then becomes easy #{SessionBean.foo.bar} -----Original Message----- From: James Reynolds [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 2:41 PM To: MyFaces Discussion Subject: RE: is there a way to pull a session scope variable directly into a jsf tag? There are some implicit variables to simplify accessesing objects in session or application scope... #{sessionScope.foo.bar} Or #{applicationScope.foo.bar} I haven't tried this for navigation as you've described, but it works great for tying object properties to controls. JR -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 11:33 AM To: MyFaces Discussion Subject: is there a way to pull a session scope variable directly into a jsf tag? let's say I have a session scoped attribute (not a component) named foo, with a value of "bar" I wanted to create a command button like <h: commandButton action=" #{session.foo}" ... to pass the string value to jsf for navigation. I didn't want to put the value in a managed bean, so used just a session attribute. but that doesn't work and I've looked for references and can't find one. is there a way to pull a session scoped attribute directly with a tag? Thanks for your help. Tom This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction. Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates. If you are not the intended recipient of this e-mail, please delete the e-mail. This message is intended for the recipient only and is not meant to be forwarded or distributed in any other format. This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument, or security, or as an official confirmation of any transaction. Putnam does not accept purchase or redemptions of securities, instructions, or authorizations that are sent via e-mail. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of Putnam, LLC (DBA Putnam Investments) and its subsidiaries and affiliates. If you are not the intended recipient of this e-mail, please delete the e-mail.