| Author |
value binding inputText
|
Rajeev Ravindran
Ranch Hand
Joined: Aug 27, 2002
Posts: 455
|
|
Hi All, Isn't it possible to set the value of the component in BackingBean using binding ? If I set the value of inputText directly in the jsp to the managed bean it works fine but if i use binding, the value is not seeting to the managed bean, this is what i tried jsp --- <h:inputText id="textFirstName" styleClass="inputText" binding="#{pc_Borrower.firstName}" /> backing bean --------- public HtmlInputText getFirstName() { if (textFirstName == null) textFirstName = new HtmlInputText(); BorrowerManagedBean mb_borrower = (BorrowerManagedBean) getFacesContext().getApplication().getVariableResolver ().resolveVariable(getFacesContext(), "mb_Borrower"); textFirstName.setValue(mb_borrower.borrowers[0].firstName); return textFirstName; } public void setFirstName(HtmlInputText input) { this.textFirstName = input; } We need to dynamically add new Tabs in our application and its working fine, but when we tried to map the component to the managedbean it seems to be not setting the values. I think the concept of setting value is binding is similar to what we are trying to acheive. Could anyone help me out in resolving this issue ? Thanks, Rajeev
|
 |
 |
|
|
subject: value binding inputText
|
|
|