I am working in Java EE application which supports authentication and managing some simple objects
After the user has been logged in I store it as an object in a session scoped managed bean. The logged in user can Create a new UNIT object which must be visible only to him. I am doing this using a JSF form. My problem is that I am not being able to pass the current user as the owner of the created unit.
I was trying to do something like this with the inputHidden tag in the JSF Create unit form
<h:inputHidden binding="#{unitController.selected.user}" value="#{loginController.checkedUser}"/>
but it is not working.
I also tried to add a User object as parameter in the CreateUnit method, but I was not sure how to call this method using the Java Expression Language.
Basically,
<p:commandButton value="Save Unit" action="#{unitController.create(#{loginController.checkedUser})}" update="createUnitForm :growlCreateUnit"/>
but still is not working.
Can somebody help please?
Replace
with:
EL expressions cannot be nested.