aspose file tools
The moose likes JSF and the fly likes value binding inputText Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "value binding inputText" Watch "value binding inputText" New topic
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: value binding inputText
 
Similar Threads
Conversion Error setting value 'xyx for 'null Converter'. in my page
selectOneMenu
How can get the value of a HtmlInputText (created in the bean)
Please Help : Problem getting submitted value for dynamic input text field
binding vs value