This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes binding, which ethod use? 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 "binding, which ethod use?" Watch "binding, which ethod use?" New topic
Author

binding, which ethod use?

ira romanenko
Greenhorn

Joined: Aug 07, 2006
Posts: 4
Hello!
I have a question!
In some tags, like inputTextare or inputText, we have attribute "binding". What method is used to render it or just to process it (for example, for attribute rows, there is getRows(), for style - getStyle() and so on).
Thak you!
Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
I don't understand your question properly, but if you trying to use component binding in backing bean you can do it like this

ValueBinding vbinding = FacesContext.getCurrentInstance()
.getApplication().createValueBinding("#{mb_Borrower.firstName}");

componentId.setValueBinding("value",vbinding);

Hope it helps !!

Thanks,


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
ira romanenko
Greenhorn

Joined: Aug 07, 2006
Posts: 4
Thank you.
But I have a proplem.
I'm writing:

if(maxlength!=null){
if (isValueReference(maxlength)) {
ValueBinding vb =context.getApplication().
createValueBinding(getMaxlength());
textComponent.setValueBinding("maxlength", vb);
}
else textComponent.setMaxlength(maxlength);
}

But maxlength doesn't bind to the attribute inp of Bean. Even the getter is not called. What is my mistake? Could you help me?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: binding, which ethod use?
 
Similar Threads
Why is value not part of a component's state?
Field display problem
Doubt in Basic Profile 1.1
binding and service elements in wsdl
How to control the name attribute value for the wsdl binding element