1
votes

I want to define a navigation case in faces-config.xml to do a page reload/refresh, without navigating to another page on certain outcome from any view id. How do I define it in faces-config.xml as I dont have any specific to-viewId to hardcode in faces-config.xml ?

1
Sounds like you want to reload the existing page. In which case, viewId = #{view.viewId} ? - 8bitjunkie
yes I want to reload just the current page. I'll try out your solution! So, it's possible to put ELs in faces-config ?! Didn't know this! - Rajat Gupta
Thanks please post as an answer so I could accept. #{view.viewId} didn't work for me as I use a URL rewritter(Prettyfaces) but I found a solution once I came to know I could use EL over there. Another thing, there is small issue if you could help, my URLs are extensionless, topic/23423 & faces-config redirects me to topic/23423.xhtml by appending .xhtml at the end of my viewIds. How could I prevent adding .xhtml to my extensionless URLs ? - Rajat Gupta
OP has posted followup question: stackoverflow.com/questions/19978988/… - 8bitjunkie

1 Answers

0
votes

You can use EL expressions in your faces-config.xml file.

To return to the current view, for example:

<navigation-case>
        <from-outcome>success</from-outcome>
        <to-view-id>#{view.viewId}</to-view-id>
 </navigation-case>