Hi folks,
I searched around for a few minutes now, regarding "redirection after 
successfull form submit" for example, and I found a few ways to do it. What I 
am wondering was, which way I should use in which situation and which ways is 
the "best practice" way. Perhaps this is a easy question for you all, but it 
was thinking of which pros and cons are connected to a specific solution. I 
collected the to version I found and used till now. Perhaps you can comment on 
it, add some other versions, and after that we could collect our stuff and add 
it to the wiki.
Here are my versions:
- First way through the action-tag
        <x:commandButton styleClass="button" id="searchButton"
                                actionListener="#{addSystemdataSpringBean.add}"
                                action="popupsuccess"
                                value="#{bundle.addSystemButton}" />
to the faces navigation:
<navigation-rule>
                <from-view-id>*</from-view-id>
                <navigation-case>
                        <from-outcome>popupsuccess</from-outcome>
                        <to-view-id>/close.jspx</to-view-id>
                        <redirect/>
                </navigation-case>
        </navigation-rule>

Andy my second idea was through the external way:

FacesContext fc =FacesContext.getCurrentInstance();
fc.getExternalContext().redirect(url);
fc.responseComplete();
return;

Any other sugestions out there?

Hope this post is not annoying you.

Kindly regards Johannes
Trying to provide a bit more documentation for myfaces, to get a very nice 
project more famous!
_________________________________________________________________________
Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle 
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179



Reply via email to