If my JSF is extremely rusty, the action attribute on the command button or command line is used to indicate the result line defined in the faces-config-nav file, or should point to a method on the bean that will return the result (or redirect / whatever).
In your case, if you want to redirect to another page ... you should define this in your configuration file as a navigation link ( redirect if necessary). Then in your action button you should have something like
<h:commandButton action="showDetails" value="details">
...
<navigation-case> <from-outcome>showDetails</from-outcome> <to-view-id>/details.jsf?faces-redirect=true</to-view-id> </navigation-case>
As an aside, the <f:atribute> will work, but it will only set the attribute on the component. Therefore, if you hold the command line button in a bean, you can get the attribute value by name. To pass a query parameter, use a hidden field technique like pakore
source share