File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes binding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "binding" Watch "binding" New topic
Author

binding

Vishal K Patel
Ranch Hand

Joined: Oct 20, 2006
Posts: 43
what is binding doing internally?
How it will affect the normal life-cycle of JSF page?
where and when should I use it?

Example:
I have 5 JSF components in my page. On some action...I need to set some properties of those components from the backing bean.

now...if I am doing with the scope request and using binding...i can set all the properties of all the components of that page.

or...with session scope and without binding i can do the same.

which one is the better approach?

Is it good idea to keep all the states of all components stored in session??? or bindind could be the good alternative???
Qussay Najjar
Ranch Hand

Joined: Jan 18, 2008
Posts: 53
Originally posted by Vishal K Patel:
what is binding doing internally?
How it will affect the normal life-cycle of JSF page?
where and when should I use it?

Check this link, nice one..
http://java.sun.com/developer/EJTechTips/2004/tt0923.html


Example:
I have 5 JSF components in my page. On some action...I need to set some properties of those components from the backing bean.

now...if I am doing with the scope request and using binding...i can set all the properties of all the components of that page.

or...with session scope and without binding i can do the same.

which one is the better approach?

Is it good idea to keep all the states of all components stored in session??? or bindind could be the good alternative???


Using backing bean can sometimes be abused and mix the business data with the form components, but it has its uses like it is sometimes
necessary for event handlers or validators to have access to the actual components on a form. That case, yes backing beans can be used, but
in general try to use a different beans for business objects.


Qussay NAJJAR
 
IntelliJ Java IDE
 
subject: binding
 
Threads others viewed
JSF hurts my head...
JSF hurts my head...
Creating a custom scope... (kinda long)
Best to populate components with values when page loads
Difference between Managed bean and backing bean
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com