myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3881) CLIENT_WINDOW_MODE generates new windowid even if one exists
Date Wed, 16 Apr 2014 14:42:16 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3881?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13971488#comment-13971488
] 

Leonardo Uribe commented on MYFACES-3881:
-----------------------------------------

I have been thinking about different possibilities:

1. An special mode like "url-redirect" that by default make all views to be redirected with
the window id from server side.
2. Add a new param to url mode.

The problem with the url-redirect is precisely what makes it useful: it checks all existing
views and if they don't have the client-window id, it appends the client window and force
a redirect. But what happen if the view does not require the client window id to work?. Since
the typical case is almost all your views in your application requires the client window id,
it has sense a parameter that exclude some views to be redirected. In other modes this doesn't
have sense, so it seems to me that a new mode with the param is what we need to do.

Client Window api is flexible enough to include the solution in a separate jar, but it is
easier to do it inside core, because after all it is just extend the default url mode and
add the missing lines.

> CLIENT_WINDOW_MODE generates new windowid even if one exists
> ------------------------------------------------------------
>
>                 Key: MYFACES-3881
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3881
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.2
>         Environment: java 7, tomcat 7.0.50
>            Reporter: Rene O
>         Attachments: jsftest22.zip, jsftest22_new.zip
>
>
> If you use @ViewScoped beans and activate CLIENT_WINDOW_MODE (url or client) a page refresh
generates a new windowid although the application in the current browser window already has
a windowid.
> I think a new windowid should only be generated, if no windowid exists, e.g. open new
window or tab with the same url.
> <context-param>
>    <param-name>javax.faces.CLIENT_WINDOW_MODE</param-name>
>    <param-value>url</param-value>
>    <!--client doesn't work too-->
> </context-param>
> A testcase is attached.
> call url: http://localhost:8080/jsftest22/mypage.jsf
> Fill some values into field
> Press F5 to refresh the page
> => new windowid is generated => inputdata is lost, because a new @ViewScoped bean
was created



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message