8

I'm making my term paper using JSF 2.0, Java 6 and Tomcat 7, but I'm having some doubts in the development.

In my project I have a <h:inputText> tag

<h:inputText value="#{turmaMBean.nome}">
    <f:ajax event="keyup" render=":meuForm:minhaTabela" />
</h:inputText>

I want to disable autocomplete. I already tried:

<h:inputText value="#{turmaMBean.nome}" autocomplete="false">
    <f:ajax event="keyup" render=":meuForm:minhaTabela" />
</h:inputText>

However, it didn't work. What can I do to solve this problem?

Paladini
  • 4,522
  • 15
  • 53
  • 96

1 Answers1

16

I found the answer. I searched a lot about this issue and I discover this isn't an issue. When I try to do the following:

<h:inputText value="#{turmaMBean.nome}" autocomplete="off">
        <f:ajax event="keyup" render=":meuForm:minhaTabela" />
</h:inputText>

I didn't restart my Tomcat Server, and by some strange way Tomcat doesn't updated my view properly. When I tried to restart the server, this attribute start work.

So, if you need to turn the autocomplete off, use:

autocomplete="off" 

This probably will work - don't forget to restart the server, sometimes Tomcat like play with us :p.

Paladini
  • 4,522
  • 15
  • 53
  • 96