Re: Dynamically convert between TextBox and PasswordTextBox
Just to get my understanding straight, on what event would you change the textBox to a PasswordBox? If there is really a event can't you create a new passwordTextBox to replace the TextBox? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/GZDInuSh5k8J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Dynamically convert between TextBox and PasswordTextBox
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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Dynamically convert between TextBox and PasswordTextBox
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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
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+unsubscr...@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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Dynamically convert between TextBox and PasswordTextBox
An resourceful user could probably still watch the value, via a javascript debugging tool like Firebug, as its being set into those input fields. Assuming you are still sending the financial data to the client from the server, of course. This is also assuming the reason you want to use a password field is to hide the value from the user. If that isn't the use case, then ignore my ramblings. -Ben -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/Qkq0CiNTQtUJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.