I want to pass the content of an inputText to a
method in the backbean
what is a backbean?
commandButton
what is a commandButton?
should i write in the value attribute ?
put the pipe down and repost when you come to
It is sufficient to define a getter and setter for the inputText field.
JSF
<h:form><h:inputText value="#{myBean.input}" />
<h:commandButton value="submit" action="#{myBean.submit}" />
</h:form>
MyBean
private String input;public void submit() {
// The input value is just available in here.
System.out.println(input);
}
public String getInput() {
return input;
}
public void setInput(String input) {
this.input = input;
}