This content has been marked as final.
Show 2 replies
-
1. Re: Ending conversation on page change
gonorrhea Apr 28, 2009 4:00 PM (in response to swenvogel)use <s:link propagation="end">
s:link does not submit the form.
another example to end conversation after an action method:
<page view-id="/coursewizard/*"> <navigation> <rule if-outcome="cancel"> <end-conversation/> <redirect view-id="/FacilityList.xhtml"/> </rule> </navigation> </page>
or:
<page view-id="/coursewizard/*"> <navigation from-action="#{courseWizard.save}"> <rule if-outcome="success"> <end-conversation/> <redirect view-id="/coursewizard/summary.xhtml"/> </rule> </navigation> </page>
@End public String save() { try { ... entityManager.persist(course); FacesMessages.instance().add( "#{course.name} has been added to the directory."); return "success"; } catch (Exception e) { FacesMessages.instance().add("Saving the course failed."); return null; } }
So when evaluating the outcome via the <rule> tag, the Seam component method must return a String.
-
2. Re: Ending conversation on page change
swenvogel Apr 30, 2009 10:18 AM (in response to swenvogel)Thanks for your answer,
now i hava added
propagation="end"
to all links in my main navigationand sub navigation and the conversation's are closed.
The lasts problem is that when the user uses the browser back button, the conversation is not closed.I don't now wheter this is really a problem. Everything works fine except for that it could be happen that i end up with a lot of unused conversation's, depending wheter the user uses the browser back or not.