Let's assume we got simple page that accepts one parameter:
<f:viewParam name="name" value="#{bean.name}"/>
When user goes to http://localhost/myapp/?name=Joe
, then #{bean.name}
is set to Joe
.
Then if 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 this can be done?