request parameters
I've got a url being generated out of some javascript:
addnewitem.jsp?parentID=999
addnewitem.jsp has a backing bean with a parentID attribute.
The addnewitem.jsp takes some user input, and submits back to the FacesServlet
I'd like to set the backing bean parentID attribute with the value from the request
I've tried setting a managed bean property like this:
<managed-property>
<property-name>parentID</property-name>
<value>#{param.parentID}</value>
</managed-property>
And a hidden input in the jsp:
<h:inputHidden id="parentID" value="#BackBean.parentID}" />
Which works when addnewitem.jsp is rendered.
But when I submit the form on addnewitem.jsp, because there is no parentID in the request, jsf tries to assign null to backing bean's attribute
I'm not sure what the best way is to work around this issue.
Any pointers?
I'm starting to think that I really don't want the app server to manage the parentID property, but if not, how can I initialize parentID from the request when using a managed bean?

