Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Shasi Mitra
Ranch Hand
Posts: 101
Flex Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic