3

I am doing a project using primefaces.

In that I am using user login page.

My problem is that, when i enter the text on p:inputText the previous value is appeared on the p:inputText.

I used autocomplete=“off” in p:inputText and I cleared my Mozilla browser history on every login but still its not working well.

Code:

<h:form>

 <p:inputText id="userName" autocomplete="off" value="...">
      <p:ajax event="focus" listener="..." update="infoMessage"/>
 </p:inputText>

 <p:watermark for="userName" value="..." id="userLabelWaterMarkId"/>

 <p:password id="password" autocomplete="off"  value="....">
      <p:ajax event="focus" listener="....." update="infoMessage"/>
 </p:password>   

 <p:watermark for="password" value="..." id="pwddWaterMarkId"/>

</h:form>

Any idea?

1 Answers1

1

First check that your session scoped bean isn't storing the value.

Next you need to clear your Mozilla browser cache, not the history. If the browser has already cached the form data it will continue to auto fill it in and ignore your autocomplete=“off” attribute. This is a feature / behavior that acts differently across various browsers. For example, Internet explorer may honor your autocomplete=“off” attribute ignoring its own cache, where as Mozilla Firefox may not. This result could very depending on the version of the browser as well (ex. IE 8 vs IE9)

Sixthpoint
  • 1,161
  • 3
  • 11
  • 34
  • Yes right,in internet explore there ll not be come previous entered values on that p:inputText field.only problem is in Mozilla cache. i ll check it.thankq –  May 21 '15 at 01:20
  • I cleared my Mozilla cache too but still its not working. that previous entered values still there appear when click on p:inputText –  May 21 '15 at 01:31