Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

binding, which ethod use?  RSS feed

 
ira romanenko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
ira romanenko
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!