GWT UIBinder remember username password

494 views
Skip to first unread message

Markandayarushi Pamu

unread,
Mar 7, 2012, 5:39:20 AM3/7/12
to Google Web Toolkit
<g:FormPanel method="post" action="javascript:;"
ui:field="formPanel">
<g:HTMLPanel>
<div class="fm-login-ui-form-panel" id="login-ui-form-panel-id">
<div class="fm-login-info-msg fm-label">
<ui:msg key="loginInfoMessage">Use your
Aconex Login Name and Password</ui:msg>
</div>
<div class="fm-login-ui-form-header-panel" id="login-ui-form-
header-panel-id">
<div class="fm-login-ui-form-header-label fm-label">
<ui:msg key="loginInputFormHeaderMessage">Login to
Field Manager</ui:msg>
</div>
</div>
<g:HTMLPanel styleName="fm-login-ui-form-top-error-panel"
ui:field="topErrorPanel">
<g:Label ui:field="errorLabelOnTop"
styleName="fm-error-message-label fm-validation-message-label
fm-login-ui-form-top-error-label fm-label">&nbsp; </g:Label>
</g:HTMLPanel>
<div class="fm-panel-username" id="panel-username-id">
<div class="fm-label-login fm-label" id="fm-label-login">
<ui:msg key="loginName">Login Name</ui:msg>
</div>
<g:TextBox styleName="fm-textbox fm-textbox-login"
ui:field="userNameTextBox" name="loginname" />
</div>
<div class="fm-panel-password" id="panel-password-id">
<div class="fm-password-label-and-field-panel" id="password-
label-and-field-panel-id">
<div class="fm-label-password fm-label" id="fm-label-password">
<ui:msg key="password">Password</ui:msg>
</div>
<g:PasswordTextBox styleName="fm-textbox fm-textbox-password"
ui:field="passwordTextBox" name="password" />
</div>
</div>
<div class="fm-login-ui-form-bottom-error-panel" id="login-ui-
form-bottom-error-panel-id">
<g:Label ui:field="errorLabelOnBottom"
styleName="fm-mandatory-error-message fm-login-ui-form-bottom-
error-label fm-label">&nbsp; </g:Label>
</div>
<div class="fm-login-ui-form-login-button" id="login-ui-form-
login-button-id">
<g:SubmitButton styleName="fm-button fm-button-primary fm-button-
login"
ui:field="loginButton">
<ui:msg key="loginButton">Login</ui:msg>
</g:SubmitButton>
</div>
<div class="fm-login-ui-form-forgot-password-panel" id="login-ui-
form-forgot-password-panel-id">
<g:Anchor ui:field="forgotPasswordLink"
styleName="fm-login-ui-form-forgot-password-link">
<ui:msg key="loginInputFormForgotPasswordMessage">Forgot your
password?</ui:msg>
</g:Anchor>
</div>
</div>
</g:HTMLPanel>
</g:FormPanel>

And in java file

formPanel.addSubmitHandler(submitHandler);



Please help me how to solve this problem..




JoyaleXandre

unread,
Mar 12, 2012, 1:25:08 PM3/12/12
to google-we...@googlegroups.com
What is exactly your problem? Your login interface is not remembering the user's password?

Joseph Lust

unread,
Mar 13, 2012, 12:24:57 PM3/13/12
to google-we...@googlegroups.com
Markandayarushi Pamu,

This is a common issue on dynamically generated webapp content. Basically, the browser looks for a form with name 'password', as a password input, and any other fields like 'email' or 'username.' If they are found, the browser offers to remember them when they are posted. However, to refill them, the browser checks at load time for the fields. Because technologies like ExtJs and GWT insert these items into the DOM dynamically, those fields are not found by the browser at the instant of loading.

To correct this, I hardcode the form and fields into the header (hidden from the user). Then, when the login form initializes, it checks this hidden form and copies the values from it if finds any.

You can see the login form of my site, http://www.runpartner.com, which uses this method to get the credentials remembered and prefilled.

Sincerely,
Joe

Markandayarushi Pamu

unread,
Apr 12, 2012, 2:50:51 PM4/12/12
to Google Web Toolkit
Thx for the reply ......

Same things I am doing .......I put the hidden textboxes username and
password in my jsp page which is the first page of my application.

But still same problem I am facing .................it is asking the
prompt to remember password, but when I type user name it is not
picking the remember password.

That is my exact problem ..

Rushi



On Mar 13, 9:24 pm, Joseph Lust <lifeofl...@gmail.com> wrote:
> Markandayarushi Pamu,
>
> This is a common issue on dynamically generated webapp content. Basically,
> the browser looks for a form with name 'password', as a password input, and
> any other fields like 'email' or 'username.' If they are found, the browser
> offers to remember them when they are posted. However, to refill them, the
> browser checks *at load time* for the fields. Because technologies like
> ExtJs and GWT insert these items into the DOM dynamically, those fields are
> not found by the browser at the instant of loading.
>
> To correct this, I hardcode the form and fields into the header (hidden
> from the user). Then, when the login form initializes, it checks this
> hidden form and copies the values from it if finds any.
>
> You can see the login form of my site,http://www.runpartner.com, which
Reply all
Reply to author
Forward
0 new messages