for example I have a css in test.css given below.
.test {
开发者_运维百科 top:100px;
}
how can i increment top property from GWT ?
e.g. you can retrieve the Style of the element and alter that. other type of widgets might have other functionalities
You can hold value in memory and just set it at any time you need it via runtime substitution which is built-in GWT feature.
@eval userBackground com.module.UserPreferences.getUserBackground();
div {
background: userBackground;
}
public class UserPreferences {
public static String getUserBackground() {
return "#FF0000";
}
}
Please check GWT specs: http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#Runtime_substitution
精彩评论