I want to learn that if I can define user input parameters at bean class and take these input parameters from a controller function with submit button :
for example input
jsp :
<h:inputSecret value="#{control.userObj.pwrd}"></h:inputSecret>
<h:commandButton type="submit" value="Giris" action="#{control.check}">
</h:commandButton>
“User” bean class :
private String userName; (with getter and setter)
“Control” controller class :
private User userObj;
When using nested bean properties, then you need to prepare it yourself so that JSF can call the setters on it. JSF/EL namely won’t prepare them for you.
This way
#{control.userObj.userName}will work in input fields.See also: