We recently started a new project at work. The web application was going to be started by linking from another page. The links were going to look a little something like this:
http://mysuperapp.com/appname?mygetparam=program1
http://mysuperapp.com/appname?mygetparam=program2
http://mysuperapp.com/appname?mygetparam=program3
A few weeks before I remembered reading about how hard is was to use GET parameters in a JSF application. So a red flag went up in my head, and I did a little research. A bunch of sites told me that is hard to get your components to send requests via GET parameters, but it turns out it's actually easy to bind GET parameters to your backing bean. (Just putting them in the url is cludgy)
All you have to do is use the param object in your el expression:
<managed-bean>
<managed-bean-name>myBean</managed-bean-name>
<managed-bean-class>com.mysuperapp.MyBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>myPropery</property-name>
<value>#{param.mygetparam}</value>
</managed-property>
</managed-bean>
Now your request scope backing bean has the value from the url.
Easy.
This page contains some info about captrespectcom
Tracked: Sep 20, 05:23