css for SuperImmediateTextField

How can I set the default
TextField css style
to the

Henrik really should’ve used the default textfield stylename when he created this component, it’s just redundant that a textfield would look different even if it is “super immediate”. I suggest you go and bug him about this issue on this thread:
SuperImmediateTextField forum thread

Anyway, just add a stylename “v-textfield” to the superimmediate textfield, and you’re halfway there (focus style will be missing, I bet).


Thank you Jouni for reply, I added the “v-textfield” style name and the “v-textfield-focus” style name:


but can I get the textfield style name using this method?:

SuperImmediateTextField.setStyleName(new TextField().getStyleName());

No need to add the focus style, that’ll just make the field look like it’s always focused, even when the user is typing into another field. That’s not what you want, ever. Bad usability.

No, you can’t, that would just return the additional stylenames that
have defined to the field. And for a new instance of TextField, that will return null or an empty string. But you can use the following:


Thanks, it work’s.