code: private void buildUI() {
  		// build the configuration options UI.
  		WFieldLayout layout = new WFieldLayout(WFieldLayout.LAYOUT_STACKED);
  		layout.setMargin(new Margin(null, null, Size.LARGE, null));
  		add(layout);
  		layout.addField("Autoplay", cbAutoPlay);
  		layout.addField("Loop", cbLoop);
  		layout.addField("Disable", cbDisable);
  		layout.addField("Show only play/pause", cbControls);
  		layout.addField((WLabel) null, btnApply);
  
  		// enable disable option only when control PLAY_PAUSE is used.
  		WSubordinateControl control = new WSubordinateControl();
  		add(control);
  		Rule rule = new Rule();
  		rule.setCondition(new Equal(cbControls, Boolean.TRUE.toString()));
  		rule.addActionOnTrue(new Enable(cbDisable));
  		rule.addActionOnFalse(new Disable(cbDisable));
  		control.addRule(rule);
  
  		// allow config to change without reloading the whole page.
  		add(new WAjaxControl(btnApply, audio));
  
  		// add the audio to the UI
  		add(audio);
  	}
docs: Build the UI for this example.