Friday, July 29, 2011

Re: Dynamically convert between TextBox and PasswordTextBox

Yes you should be able to, however you are not. There is no
constructor for PasswordTextBox that takes in a TextBox. I ended up
just using getElement and setting the attribute directly.

textBox.getElement().setAttribute("type", "password");

On Jul 29, 3:17 pm, Gal Dolber <gal.dol...@gmail.com> wrote:
> From a code and css points of view they are exactly the same. You should be
> able to change from TextBox to PasswordTextBox without changing anything.
>
>
>
>
>
>
>
>
>
> On Fri, Jul 29, 2011 at 5:05 PM, Ben Munge <ben.mu...@gmail.com> wrote:
> > I have a requirement to turn some financial fields into masked fields
> > and I wanted to use the password input type to simplify the logic. I
> > need to be able to change a TextBox to a PasswordTextBox and have it
> > change the value in the box to circles without affecting the value or
> > style of the element. I'm having trouble finding a good way to do this
> > as TextBox does not let you modify the type property. Any advice/help
> > would be greatly appreciated.
>
> > Thanks!
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> http://code.google.com/p/guit/

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment