Suppose we get a simple page that takes one parameter:
<f:viewParam name="name" value="#{bean.name}"/>
When the user goes to http://localhost/myapp/?name=Joe
, then #{bean.name}
set to Joe
. Then, if the user goes to http://localhost/myapp/
or http://localhost/myapp/?something=Else
, then #{bean.name}
is still set to Joe
, but I want it to be null
. How can I do that?
source share