• Post Reply Bookmark Topic Watch Topic
  • New Topic

use of component binding

 
william kane
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I would like to know component bindings are used in JSF application? What is use of wiring components into java beans when java beans are meant hold data?
Thanks in advance
William
 
wendy chou
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use component bindings to make custom validation a little easier. Binding components to backing beans allows me to have direct access to the components in the backing bean validator functions without doing a getViewRoot().findComponent(). Another example is if I needed to display a property of the component on the page *outside* of it's body tag. For eg.

<t:dataScroller binding="#{myBean.myDataScroller}" ...>
</t:dataScroller>

Displaying Page #{myBean.myDataScroller.pageIndex} of #{myBean.myDataScroller.pageCount}.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!