Forums Register Login

JSF & dispalying data

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 810 times.
Similar Threads
Novice to JSF
Result pages in the WEB-INF folder
JSF tutorial required
Passing values between pages
Any Good PDF's for Learning JSF Quickly
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:05:20.