Rule of thumb: commandLink or commandButton when you want an action to happen (aka, posting a form), and outputLink when it's just a navigation link.
Travis
On 4/28/06,
Andrew Robinson <[EMAIL PROTECTED]> wrote:
Could you create a phase listener to check if the request is a POST or
GET, and if a GET, create a new view root? With server-side state
saving, views seem to be reused if the URL doesn't change. I haven't
looked at the code, but I see the same behavior (the same view tree is
used).
Another alternative is to use client side state, that way the browser
will not post the component state back on refresh.
On 4/28/06, Anthony Hong < [EMAIL PROTECTED]> wrote:
> You mean as _javascript_ you wrote can prevent form submit?
> I don't want to prevent refresh, but I just want refresh in request a
> new page same as jsf page first requested, its lifecycle create a new
> jsf view component tree and render response.
>
>
> On 4/28/06, aliko <[EMAIL PROTECTED]> wrote:
> >
> > You can trap F5 key and call form.submit with a little _javascript_. But that
> > does not help when user clicks the refresh button.
> >
> > <script>
> >
> > function ui_onkeydown_handler() {
> > switch ( event.keyCode) {
> > case 116 : // F5
> > event.keyCode = 0;
> > event.returnValue = false;
> > document.forms ['form1'].submit();
> > }
> > }
> >
> > document.attachEvent("onkeydown", ui_onkeydown_handler);
> > </script>
> >
> >
> > --
> > View this message in context: http://www.nabble.com/Issues-with-refresh-page-in-JSF-t1523452.html#a4140628
> > Sent from the MyFaces - Users forum at Nabble.com.
> >
> >
>
>
> --
>
> Anthony Hong
>

