• Post Reply Bookmark Topic Watch Topic
  • New Topic

EL in views and outcomes?

 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to use expression language referencing an application scoped java bean for navigation in faces-config.xml

I have an object called navigation in application scope and I want to replace my navigation rule:



with a variable based version like this:



I can reference #{applicationScope.navigation.whatever} to set parameters in backing beans but the way I am using the expression for navigation does not seem to work.

Does anyone have any idea if this is possible or if not how I can control my navigation from an application level bean rather than using hardcoded text in the faces-config.xml file?

Thanks in advance.
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rick Beaver:
Hi

I am trying to use expression language referencing an application scoped java bean for navigation in faces-config.xml

I have an object called navigation in application scope and I want to replace my navigation rule:



with a variable based version like this:



I can reference #{applicationScope.navigation.whatever} to set parameters in backing beans but the way I am using the expression for navigation does not seem to work.
.

You can't use expression language in faces-config.xml, the parser to the xml file won't understand the tag.

Does anyone have any idea if this is possible or if not how I can control my navigation from an application level bean rather than using hardcoded text in the faces-config.xml file?
Thanks in advance.

Use NavigationHandler class for handling run time navigation. OR alternatively, you can configure navigation for multiple outcomes in faces-config.xml and your action method can return one of those possible outcomes and depending upon the outcome the corresponding navigation will be executed.
 
Rick Beaver
Ranch Hand
Posts: 464
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Varun
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!