code: private void applySettings() {
  		// reset the container.
  		container.reset();
  
  		// create the new collapsible.
  		WText component1 = new WText("Here is some text that is collapsible via ajax.");
  		WCollapsible collapsible1 = new WCollapsible(component1, "Collapsible",
  				(CollapsibleMode) rbCollapsibleSelect.getSelected());
  		collapsible1.setCollapsed(cbCollapsed.isSelected());
  		collapsible1.setVisible(cbVisible.isSelected());
  
  		if (collapsible1.getMode() == CollapsibleMode.DYNAMIC) {
  			component1.setText(component1.getText() + "\u00a0Generated on " + new Date());
  		}
  
  		if (drpHeadingLevels.getSelected() != null) {
  			collapsible1.setHeadingLevel((HeadingLevel) drpHeadingLevels.getSelected());
  		}
  
  		// add the new collapsible to the container.
  		container.add(collapsible1);
  
  	}
docs: applySettings creates the WCollapsible, and loads it into the container.