Two Laptop Bag
The moose likes JSF and the fly likes JSF & dispalying data Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "JSF & dispalying data" Watch "JSF & dispalying data" New topic
Author

JSF & dispalying data

Zein Nunna
Ranch Hand

Joined: Mar 31, 2005
Posts: 245
Hi guys,

I'm pretty new to JSF. Here's my dilemna.

I'm on a page where I enter some login details, I press the 'OK button' that calls some bean, which performs some computation - soo far no problem.

The database transaction gnereates some data, which is put inside a HashMap. (i.e. the data has been extracted into a HashMap, the DB connection is then closed) - so far so good. The HashMap has more HashMaps inside it.

Once this has been done, the user needss to be re directed to some page, where the data from the HashMap is extracted and then displayed on the JSF page - this bit i'm not too sure how to tackle. Any tips?

I have the Java Server Faces book by O'Reilly which hardly touches on this. I was also using the tutorial on http://www.coreservlets.com/JSF-Tutorial/ - again it has nothing concrete that I can use.

So guys if you could give me pointers, topics to read on or other tutotials that may help, please post below. Examples would be fabulous!

Thanks in advance
Regards
Zein
Josh Juneau
Ranch Hand

Joined: Jun 16, 2004
Posts: 86
It sounds like your original page will have a commandButton which initiates an action in the bean. This action method is where your transactions will take place. You can then store the values into this bean or another bean. The completion of the transaction should cause the page to be redirected to your second page which shows the calculated solutions.

In short...the action method which is invoked can store the values within a hashmap or even just variables within a bean (these variables can also be collections). The second page will reference the variables within the bean...which will show the results.

Here is a link which may assist you in retrieving values from other managed beans:

http://www.jsffaq.com/Wiki.jsp?page=HowToAccessOneManagedBeanFromAnotherManagedBean


Database Administrator/Application Developer
 
 
subject: JSF & dispalying data
 
Threads others viewed
Novice to JSF
JSF tutorial required
Result pages in the WEB-INF folder
Any Good PDF's for Learning JSF Quickly
Passing values between pages
developer file tools