defaultChecked - Checked by Default
Specifies whether a control is initially selected or cleared.
Category
basicsSyntax
defaultChecked="true|false"
Usage
In Design mode, click the top tab under Properties and look for Checked by default, or click All Properties and look for defaultChecked under data.This
property applies to a control that can be selected or cleared such
as a check box. By default this property is false
.
Examples
This Check Box control assigns a data value depending on whether the box is selected (default) or cleared.<xp:checkBox id="checkBox2" text="Use user name instead of Anonymous"
defaultChecked="true" value="#{document1.loginname}" uncheckedValue="Anonymous"
checkedValue="#{javascript:session.getUserName()}">
</xp:checkBox>