wood burning stoves 2.0*
The moose likes JSF and the fly likes How to populate a form from a tree node Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to populate a form from a tree node" Watch "How to populate a form from a tree node" New topic
Author

How to populate a form from a tree node

Tokunbo Oke
Ranch Hand

Joined: Sep 09, 2003
Posts: 57
I have a JSF screen (jsp/jsf file) that is made up of a tree and four forms. The tree is always rendered (visible) while Only one form is rendered at a time. So the tree and anyone of the forms is visible at any point in time.
The tree node that is clicked determines which form is rendered. When a node of the tree is clicked, a method is called from the backing bean of the tree. The methodis suppoded to both render the tree and the form, and populate the form with data.

Problem
=======
The each form gets rendered, but they are never populated with data. I know the form and methods are functioning well, because when I call the action methods from a value bound button that is attached to the form, the form gets populated with data. i.e. each form works very well (gets populated with data) when the method is called from a button attached to the form, but not when the method is called via a tree node and the tree's backing method.

Help
====
Please tell me how to populate the fields of the form when it is sharing a screen with the tree. Please note, the clicking of a node of the tree is the trigger.

To put my question another way, if two forms appear in the same screen (JSP/JSF file) say forms A and B, can a button on form A, populate the fields of form B via JSF lifecycle? The answer to this will enable me to work out how the tree/form case can be made to work.

Please note, although the tree and the forms are in the same screen each form has a separate backing bean.

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to populate a form from a tree node