Hi,

I had considered doing something like that but i find that if the message is displayed on page with other information, such as displaying the "successfully updated" message on the actual form, its not as easy to notice. Feedback from the majority of users that have used systems like this dont mind it and like the consistent confirmations. Also (i'm not sure how applicable to JSF this i) the redirection stops the browser from ending on a page that can have post data re-submitted if refreshed. Ie. it prevents people from re-doing some action without noticing.

Anyway thanks for your input and I will seriously consider an approach like you mentioned as it does seem to be much more suited to the framework.

Thanks,
-Robert.

Andrew robinson wrote:
Not to question your design, but why have an extra page and make the
user wait for a post back. Instead of a redirection, just add "Your
order was completed successfully" as a FacesMessage with no associated
component, then on every page on your site, have a messages tag to
show all non-component messages. That way, all pages that are loaded
after your change will show the "all is well" message. The user can
then immediately get back to work, and not have to wait for another
post back and you also won't have to worry about browsers supporting
the meta-refresh tag.

Just a thought,
Andrew

On 11/2/05, Robert Parsons <[EMAIL PROTECTED]> wrote:
  
Hi,

In past non-faces applications I have had a simple method in my
controlling servlet that would automatically display a screen with a
given message before redirecting to some given page. Something like this:

...
displayRedirect("Your order was completed successfully", "index.jsp");

In my JSF application I have navigation-rules for each outcome and a
sepparate view for each message. So for the example above i'd have
something like:

        <navigation-case>
            <from-outcome>complete</from-outcome>
            <to-view-id>/order_complete.xhtml</to-view-id>
        </navigation-case>

The 'order_complete.xhtml' page would have the message "Your order was
completed successfully" and then a timed redirect to some other page.
I'm not completley stupid and am using a template (btw i'm using
facelets too) for all the redirection pages, but I'm still having to
create a page for each outcome.

Is there some nice way I can achieve this kind of behaviour without
making an individual view for all the messages?

Any comments welcome.

Thanks,
-Robert.


    


  

Reply via email to