This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JSF and the fly likes Can we mention which action to be called in faces-config depending on the outcome? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Can we mention which action to be called in faces-config depending on the outcome?" Watch "Can we mention which action to be called in faces-config depending on the outcome?" New topic
Author

Can we mention which action to be called in faces-config depending on the outcome?

Shasi Mitra
Ranch Hand

Joined: Nov 27, 2008
Posts: 101

I want to mention the action("#{bean.perfomTask}") in faces-config.Depending on the outcome, the corresonding action method should be called ..Is this possible?
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
No, you can't. Just do it right in the action method, or do it in the constructor of the managed bean associated with the page associated with the outcome.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

The JSF request/response lifecycle isn't designed for that. However, if all you wanted to to was invoke an action method from another action method, just have the first one do a simple Java call.

The only restriction is that the managed beans will have the context of the original request..


Customer surveys are for companies who didn't pay proper attention to begin with.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Can we mention which action to be called in faces-config depending on the outcome?