Skip to main content



      Home
Home » Eclipse Projects » JavaServer Faces » Referencing Bean values in JSF page(How to achieve "dynamic" HTML URL and conditional rendering)
Referencing Bean values in JSF page [message #663842] Wed, 06 April 2011 11:45 Go to next message
Eclipse UserFriend
[New to JSF, so apologies if too basic or explained badly]

I have a Session scoped managed bean (A) that is populated from a form with selectOneMenu items. On submit, the controller Bean (B) routes based on the categories chosen by the user.

The target page must display one or more graphs depending on variables contained in the session bean A. But the URL of the chart or graph depends on variables in Bean A. In some cases one chart is needed, in other cases several. So I need to conditionally include code on this .xhtml page, and somehow create the appropriate URL for the charts.

I can't get the syntax to make a URL like:

A.index = 5

I need a URL like: "chart-3/"+A.index+"/1.html" to be inserted.

Thanks for any help.
Re: Referencing Bean values in JSF page [message #663889 is a reply to message #663842] Wed, 06 April 2011 13:46 Go to previous messageGo to next message
Eclipse UserFriend
This is a general JSF question, but the forum is for the Eclipse JSF Tools project. You'd probably get more answers in a more general forum.

That said, could you use a command link, something like this?

<h:commandLink value="chart-3/#{A.index}/1.html"/>
Re: Referencing Bean values in JSF page [message #663890 is a reply to message #663889] Wed, 06 April 2011 13:56 Go to previous message
Eclipse UserFriend
Sorry, thought I was in the right place.
Previous Topic:JSF Facet
Next Topic:pagecode sync in Eclipse
Goto Forum:
  


Current Time: Fri Jul 25 15:48:15 EDT 2025

Powered by FUDForum. Page generated in 0.03046 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top