The POST-REDIRECT-GET pattern has been very useful for me in solving
problems with the back button and bookmarking. PRG can be applied to
Web apps in any framework, but JSF allows you to solve it centrally
using a phase listener (see below). Or you can use the <redirect>
element in all your navigation cases.

See http://learnjsf.com/wp/2006/08/06/a-prg-phase-listener-for-jsf/
for the code and limitations.

/dmc

I've written a PRG phase listener for JSF

On 12/11/06, Andrew Robinson <[EMAIL PROTECTED]> wrote:
Almost all of your issues relate to web pages that are information based
instead of form based. If you are not submitting data, you should consider
using all outputLinks instead of commandLinks. That way your pages will be
bookmark-able and have the ability to open in a new window. If you must use
commands on non-data data positing events, then use redirect set to true to
make sure the URL of the browser is updated.

As for the browser back button, it has always worked for me in JSF with
server side state saving and should work fine with client side state even
better, what MyFaces version are you using?

Double form submission: this is not a framework issue, it is a user one and
an HTML one. There are many ways to "fix" this, like disabling the button on
click, disabling the form after submit, a phase listener that "counts"
submissions and skips the validation & update phases if a repeat post, etc.

having multiple copies of a page/service in different browser tabs/windows:
This is not an issue, why is it for you? Just avoid session scope. Use
request scope plus <t:saveState> or use the JBoss-Seam conversation state
(which is per window).

-Andrew

On 12/10/06, Adam Koprowski <[EMAIL PROTECTED]> wrote:
>     Hello,
>   Approximately one year ago, together with my colleague, we had to make a
decision what technology to use for the development in some project of ours.
At the time, after quick investigation, we came up with the idea of using
J2EE, that is EJB + JSF. Let alone the EJB but let me share with you some
thoughts that I have about JSF after this year of work with it.
>   Below you will find a mixture of features (that I would expect any
decent web framework to support) and problems (that I would expect any
decent framework to solve and let developer not worry about it). Here we go:
>  -) use of browser back button,
>  -) page bookmarking,
>  -) double form submission (by double user click),
>  -) opening link in new browser tab/window,
>  -) having multiple copies of a page/service in different browser
tabs/windows
>   Now, correct me if I'm wrong, but I think all of the above pose some
(lots of?) difficulties in JSF. And I know that some of those are not easy
issues (like browser's back button) but personally I think this list is way
too long...
>   I don't really know any alternative web frameworks so I cannot compare
but is it really that the developer has to deal with all of those issues on
his own? Or are there frameworks where one does not need to worry about
those irritating problems and can concentrate on real development... and JSF
is just too immature to provide that? I know this is not a myfaces specific
question but I decided to post this provocative question on this list as I'm
curious about your opinion guys...
>   Best wishes,
>    Adam Koprowski
>
> --
> =====================================================
> [EMAIL PROTECTED] , ICQ: 3204612
> http://www.win.tue.nl/~akoprows
> The difference between impossible and possible
> lies in determination (Tommy Lasorda)
> =====================================================




--
David Chandler
Development Coach
learnjsf.com

Reply via email to