Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is binding in following respect  RSS feed

 
chetan padhye
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) what is binding in following respect

<h:selectManyListbox id="list" value="#{optionBean.optionSelected}" >
<f:selectItems value="#{optionBean.optionList}"></f:selectItem>
</h:selectManyListbox>

If getOptionlist returns the ArrayList of SelectItems then optionSelected should get SelectItem object whichever is selected this object will have value and label both fields...
But it returns null ....rather if the optionSelected is made String type it returns ....

What is binding attribute of these tags ..it is present for almost all tags ....how it works

Thanks
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The 'binding' attribute allows you instant access to the desired UIComponent inside the backing bean. It is useful if you want to get/set a bit more than only the value.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!