wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Berlin [GCG-PFS]" <Berlin.Br...@Primerica.com>
Subject Wicket philosophy, modelObject isVisible, isEnabled, CSS
Date Mon, 28 Feb 2011 16:00:21 GMT
Most of the backing modelObject and models are normally associated with
the data that is to be displayed or edited.  Isn't the CSS and
visibility one aspect that is part of the display?
 
What are your thoughts on controlling the visibility, enabled state and
CSS through the model objects as opposed at the component?  Where do you
draw the line between how the component should work and how the data
should manipulate the component?
 
public class DataWithCSS { 
    public String getValue() {
      return value;
    }
    public String getCSS() {
      return css
    }
}
 
For example, let's say you have a text box that has two backing objects:
 
Label label = new Label<DataWithCSS>(new DataWithCSS("Hello World",
"style-red")) {
   onComponentTag() {
      tag.put("class", this.getCSS())
   }
}
 
 
...
I know we can add functionality that will pull the data value and CSS or
visbility or other attributes from the model and model objects, I was
just curious if the wicket developers intended for some aspects to be
more controlled at the component level.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message