-
1. Re: RF4. Obtaining URL parameters
bleathem Jul 19, 2011 1:00 AM (in response to sukharevd)You can use the <f:viewParam> introduced with JSF 2.0 to map request parameters to backing bean.
If you are stuck on JSF 1.x, have a look at prettyfaces (http://ocpsoft.com/prettyfaces/) to achieve the same effect.
Lastly, you can always lok at the facesContext.getExternalContext().getRequestParameterMap(), and parse the request parameters in your backing bean yourself.
-
2. Re: RF4. Obtaining URL parameters
sukharevd Jul 21, 2011 10:18 AM (in response to bleathem)I DO use JSF2 and f:viewParam descriptor.
It looks like they don't work in the way they should.
-
3. Re: RF4. Obtaining URL parameters
iabughosh Jul 22, 2011 7:11 PM (in response to sukharevd)hi Sukharev,
I saw this code in your attachment :
<rich:panelMenuItem>
<h:outputLink value="activities.xhtml?type=today">
<h:outputText value="Today Activities"></h:outputText>
</h:outputLink>
<f:param name="current" value="Today Activities" />
</rich:panelMenuItem>
try replacing it with this:
<rich:panelMenuItem>
<h:link outcome="activities.xhtml" includeViewParams="true" value="Today Activities">
<f:param name="type" value="today" />
</h:link>
<f:param name="current" value="Today Activities" />
</rich:panelMenuItem>
regards.
-
4. Re: RF4. Obtaining URL parameters
sukharevd Jul 23, 2011 12:45 PM (in response to iabughosh)Amazing!
But why is it so?
-
5. Re: RF4. Obtaining URL parameters
iabughosh Jul 24, 2011 2:57 AM (in response to sukharevd)1 of 1 people found this helpfulwith JSF 2 , h:link is designed to submit GET requests and pass URL parameters using f:param or outcome="yourpage.xhtml?param=value", unlike the other commands which uses POST requests.
-
6. Re: RF4. Obtaining URL parameters
sukharevd Jul 24, 2011 4:29 AM (in response to iabughosh)Cool! Thank you!