File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Multiple Components on a page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Multiple Components on a page" Watch "Multiple Components on a page" New topic

Multiple Components on a page

Sameer Jaffer

Joined: Feb 28, 2010
Posts: 4

Is there a way to have a component load order. I am trying to access the value of a component from another component.

Comp1 -> bean1
Comp2 -> bean1
Comp3 -> bean1

Comp4 -> bean2

Need comp1/2/3 to load values first and then need to access these values in bean2 and display max/min values in comp4. Any helps is appreciated.

Comp1/2/3 are combo list boxes and get populated from database, and the comp4 is an output text. So the comp1/2/3 need to get populated before comp4 instantiates. The comp4 needs to display the calculated value from comp1/2/3 selections.
I am using Trinidad components


Sameer Jaffer
Christian Nicoll
Ranch Hand

Joined: Mar 09, 2008
Posts: 106
I would assume that you should create two different pages, one for your input components which will be populated by your database entries and a second page where your show the result (min/max) to your users.

You 've to bind the three input components an related (managed) beans and then put those beans in the request scope. In your output page you just access your three input beans.

My SCBCD-Notes - My Hello World Webservice
I agree. Here's the link:
subject: Multiple Components on a page
It's not a secret anymore!