Recently I've found out that DOM.setStyleAttribute as well as
getElement().getStyle()
do not work for valid properties. At first I thought that it doesn't
work at all but lately I found out that there are very few properties
for which it works:
Image image = new Image("images/someimage.gif");
DOM.setStyleAttribute(image.getElement(), "margin-left", "15px");//
does nothing
instead I found out that it works with
DOM.setStyleAttribute(image.getElement(), "marginLeft", "15px");//
works
DOM.setStyleAttribute(image.getElement(), "coLLLor", "red");//does
nothing
DOM.setStyleAttribute(image.getElement(), "color", "red");//does
nothing
DOM.setStyleAttribute(image.getElement(), "color", "rad");//throws
Invalid property value.
I found no documentation on such... let's say not evident behavior.
Does anybody know why gwt developers changed margin-left to
marginLeft? (I guess they use some BeanUtils for this stuff)
why they throw exception on wrong property value but not on wrong
property name?
and
why they do nothing when the property name is correct (like with
color, yes, I know Image does not have such property).
Regards
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---