I am currently trying something that I haven't seen anyone else do (doesn't mean someone else isn't doing it). In UserAdminBean I have a dataTable with a list of users. When I click on one of the users in the dataTable I am taken to
ModifyUser.jsp which uses ModifyUserBean.
In the action method in UserAdminBean to go to ModifyUser, I am doing the following:
User user = (User)getUserData().getRowData();
FacesContext fc = FacesContext.getCurrentInstance
();
ModifyUserBean userBean = (ModifyUserBean) fc.getApplication().createValueBinding("#{ModifyUserBean}").getValue(fc);
userBean.setCurrentUser(user);
Now, in ModifyUser.jsp I have the following:
<h:outputLabel for=""> <h:outputText value="#{bundle.globalFirstNameLabel}"/>
</h:outputLabel>
<h:inputText id="firstName" value="#{ModifyUserBean.currentUser.firstName
}" required="true"/>
When the page first comes up, the firstName field is populated appropriatly. However, when I try and submit the form, I get a conversion error on firstName. I *think* it's because when the form is being validated the currentUser object has been lost out of scope and so that phase is getting NULL back for the value of firstName. Is this accurate? If so, is there anything I can do to make this process work aside from putting things in session.
I've also tried placing a saveState on the ModifyUser form with a value of #{ManageUserForm.currentUser} but that didn't solve anything.
Thanks for any feedback.
- Conversion Error on Validation - Trying Something New Gregg Bolinger
- Re: Conversion Error on Validation - Trying Somet... Gregg Bolinger
- Re: Conversion Error on Validation - Trying S... Matthias Wessendorf
- Re: Conversion Error on Validation - Tryi... Gregg Bolinger
- Re: Conversion Error on Validation - ... Gregg Bolinger

