You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "marco antonio lima (JIRA)" <de...@myfaces.apache.org> on 2015/01/22 00:15:36 UTC

[jira] [Updated] (MYFACES-3949) javax.faces.ViewState autocomplete

     [ https://issues.apache.org/jira/browse/MYFACES-3949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

marco antonio lima updated MYFACES-3949:
----------------------------------------
    Status: Patch Available  (was: Open)

> javax.faces.ViewState autocomplete
> ----------------------------------
>
>                 Key: MYFACES-3949
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3949
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.4
>         Environment: Chrome (Windows & Linux)
>            Reporter: Dan Østerberg
>
> We have a JSF application where we mainly use ViewScoped beans, and add no-cache headers for all JSF pages. Navigating back to a previous page (with the browser) correctly recreates the beans, and renders new HTML, with a new ViewState ID. But... Chrome "autocompletes" _some_ of the hidden ViewState inputs, overriding the new value with an old ViewState value. We have verified this in the browser dev-tools by looking at the response, which is correct, and the resulting HTML which is not.
> In short, this seems like a known autocomplete issue, which Mojarra has fixed since 1.2, by adding 'autocomplete="off"' to the hidden ViewState input. Most browsers skip autocompleting hidden fields (in most situations), but apparently this is not always the case.
> We can add 'pa:autocomplete="off"' explicitly to the whole form, as a case-by-case workaround for this issue. But to our understanding, a full fix would be if MyFaces rendered "autocomplete='off'" for its hidden javax.faces.ViewState inputs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)