Changeset 991
- Timestamp:
- 12/14/10 12:57:56 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
VirtualCollectionRegistry/trunk/VirtualCollectionRegistry/src/main/java/eu/clarin/cmdi/virtualcollectionregistry/gui/border/AjaxToggleBorder.java
r975 r991 18 18 public class AjaxToggleBorder extends Border { 19 19 private final static String COLLAPSED_CLASS = "collapsed"; 20 20 21 21 public AjaxToggleBorder(String id, IModel<String> title, 22 final boolean expanded) {22 boolean expanded, String cssClass) { 23 23 super(id); 24 24 setRenderBodyOnly(true); 25 25 26 26 final WebMarkupContainer header = new WebMarkupContainer("header"); 27 add(header); 27 28 header.add(new Label("title", title)); 28 29 29 30 final WebMarkupContainer content = new WebMarkupContainer("content"); 31 add(content); 30 32 content.setOutputMarkupId(true); 31 33 content.add(getBodyContainer()); 32 add(header);33 add(content);34 34 35 35 header.add(new WiQueryEventBehavior(new Event(MouseEvent.CLICK) { … … 50 50 new Model<String>("display:none"), ";")); 51 51 } 52 if (cssClass != null) { 53 content.add(new AttributeAppender("class", 54 new Model<String>(cssClass), " ")); 55 } 56 } 57 58 public AjaxToggleBorder(String id, IModel<String> title, String cssClass) { 59 this(id, title, true, cssClass); 52 60 } 53 61 54 62 public AjaxToggleBorder(String id, IModel<String> title) { 55 this(id, title, true );63 this(id, title, true, null); 56 64 } 57 65 58 66 } // class AjaxToggleBorder
Note: See TracChangeset
for help on using the changeset viewer.