Jakarta > Tapestry
Jakarta
 

ControlCheckbox

Creates a checkbox that will automatically select or deselect all controlled checkboxes in the checkbox group.

See also: CheckboxGroup, ControlledCheckbox

Parameters

Name Type Direction Required Default Description
group CheckboxGroup in no null If provided, it specifies the CheckboxGroup this component belongs to. If it is not specified, then the component is a a part of the CheckboxGroup that wraps it. Please note that if this parameter is used, then the CheckboxGroup it refers to must either enclose the current component, or must be defined after it.

Body: removed

Informal parameters: allowed

Reserved parameters: type, onclick

Examples

Template

	
<form jwcid="form">
    <span jwcid="checkboxGroup">
    	<input jwcid="controlCheckbox"/>	
    		<input jwcid="controlledCheckbox1"/>
    		<input jwcid="controlledCheckbox2"/>
    		<input jwcid="controlledCheckbox3"/>                        
    </span>    
    ...
</form>    
	

Specification

<property name="state1" persist="session" initial-value="false"/>
<property name="state2" persist="session" initial-value="false"/>
<property name="state3" persist="session" initial-value="false"/>        
	
   <component id="checkboxGroup" type="contrib:CheckboxGroup"/>    
   <component id="controlCheckbox" type="contrib:ControlCheckbox"/>
   
<component id="controlledCheckbox1" type="contrib:ControlledCheckbox">
	<binding name="value" value="state1"/>
</component>   
<component id="controlledCheckbox2" type="contrib:ControlledCheckbox">
	<binding name="value" value="state2"/>
</component> 
<component id="controlledCheckbox3" type="contrib:ControlledCheckbox">
	<binding name="value" value="state3"/>
</component>