Re: Conversation Context not active when method called on conversation

Splash Forums PrettyFaces Users Conversation Context not active when method called on conversation Re: Conversation Context not active when method called on conversation

#23383

jllado
Participant

Thank you very much for reply!

I solved my problem already. The main trick is here:

<pattern value="/#{sessionScope.forumName}">
<validate index="0" validator="#{forumBacking.validateUrlParameters}"
onError="pretty:forums" />
</pattern>

Your link has helped.

I can execute action method in <h:commandLink> and redirect to needed view by prettyfaces mappingId.

In that action method I put forumName into sessionMap to pass to next JSF lifecycle.

Then I access it by sessionScope.forumName and in validator I check if it is valid and remove it from sessionMap.

Finally if user directly types in browser this pattern validator is called and typed url is checked too !!!

So, I can execute action method before leaving the page and redirect user by very pretty url

which can also be used as shortcut next time