wood burning stoves 2.0*
The moose likes JSF and the fly likes Got stuck with #{param} Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Got stuck with #{param}" Watch "Got stuck with #{param}" New topic

Got stuck with #{param}

mamidi subrahmanyam

Joined: Jun 29, 2005
Posts: 18
Hi all,
I have a question on how to use #{param.XXXX}
In my code there is button and I want to render it only when #{param.XXXX == 'SomeValue'} ... Rendering happens correctly, but the "action" is not working {for navigation}. It is submitting to same page, even I have placed different value in "action" attribute.

The same is working fine if the "rendered" attribute contains value "true" directly.

Am I using #{param} wrongly?? Please suggest.
Can I find any example on this?


Rohit Boorugu

Joined: Oct 06, 2009
Posts: 14
Hi mamidi, try this

<h:commandButton value="submit" rendered="#{param.XXXX == 'SomeValue'}" action="#{param.navigate}">

backing bean

public String navigate()
return "nextpage";


<redirect />

The value returned to the action should match the navigation case in xml file. here in this case it is the value "nextpage". when xml file sees that value it knows that it has to navigate to the page mentioned in <to-view-id>. If both the pages are in the same folder this should work. If not give the path to the page.

Hope this helps.
Don't get me started about those stupid light bulbs.
subject: Got stuck with #{param}
Similar Threads
tiles definition error, maping .(dot) error
I want to pass the parameter to the same action after submit
Multiple Struts-config.xml in Jboss 4.2.1
Default Action In Struts2
ServletContextListener not working