Combining action and actionListener primefaces to redirect

Posted: June 11, 2012 in web

If you don’t want to modify the backing bean to return an outcome, you can use both action and actionListener att. This will run the method setActiveCart and then redirect to checkout_page.

<p:commandButton action=”checkout_page”
actionListener=”#{account.setActiveCart(cart)}”
 value=”Pay” />

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s