Put parameters into url -->Howto?
Hi all!
How can I post some parameters to get an url something like that
http://localhost:8080/application?user=test
So how can I get the parameter user into my url?
Can I just use the f:param Tag?
And who do I retrieve the information on the next page?
thx for help!
[317 byte] By [
Semmerlea] at [2007-10-2 12:08:50]

Wow, 1 duke dollar, geez big spender huh? :-)
Yes, f:param will work. Nest this tag inside commandLink.
Their are a couple of ways to get the paramter out of the request but the most elegant is using the "param" implicit EL varialble and the managed-property element of the managed bean configuration.
Something like:
<managed-bean>
<managed-bean-name>yourBean</managed-bean-name>
<managed-bean-class>foo.YourClass</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>yourBeanProperty</property-name>
<value>#{param.yourParamNamey}</value>
</managed-property>
</managed-bean>
First of all, thanks for your reply (Here is a hard-earned ;-) nuke dollar)
But I still have some questions:
Can I use the f:param inside a commandButton?
And is the f:param enough to get a url like
http://localhost:8080/application?user=test
So do I only have to set:
<f:param name="user" value="test"/> ?
Regards,
Andy