how to disable browser autofill username and password. we are using Gwt MVP model for creating screen and using Sencha GXT library

248 views Asked by At

we have autocomplete="off" in jquery but not finding to set in gwt xml file.Can someone help me to set autocomplete to false.

<f:FieldLabel labelSeparator="" ui:field="userNameLabel">
<f:widget><f:TextField width="300" ui:field="userName" /></f:widget>
</f:FieldLabel>

Textfield doesn't have autocomplete attribute to set.

1

There are 1 answers

1
ics_mauricio On

What ui library are you using?

For example if you are using vanilla gwt you could get the Element and set the attribute autocomplete="off" manually

http://www.gwtproject.org/javadoc/latest/com/google/gwt/dom/client/Element.html#setAttribute-java.lang.String-java.lang.String-

You could create a Composite that wraps the field and set this automatically, then create instances of TextFieldNotAutocomplete for example

http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/Composite.html