You can store the value in memory and simply set it anytime you need it, by replacing the runtime, which is a built-in GWT function.
@eval userBackground com.module.UserPreferences.getUserBackground();
div {
background: userBackground;
}
public class UserPreferences {
public static String getUserBackground() {
return "#FF0000";
}
}
Please check the GWT specifications:
http://www.gwtproject.org/doc/latest/DevGuideClientBundle.html#Runtime_substitution
source
share