SelectManyCheckbox |
||||||||||||||||||||||||||||||||||||||||||||||||
Developer’s Guide Home
Installation and Configuration Common Concepts Components Index Border Layout Panel Calendar Chart Command Button Command Link Confirmation Data Table Date Chooser Day Table Drop Down Field Dynamic Image Folding Panel For Each Graphic Text Hint Label Input Text Input Textarea Layered Pane Popup Layer Popup Menu Select Boolean Checkbox Select Many Checkbox Select One Radio Spinner Suggestion Field Tabbed Pane Tab Set Tree Table Two List Selection Window Focus Load Bundle Scroll Position Ajax Framework Validation Framework Tag Reference API Reference |
Key Features
Basic ConfigurationThe SelectManyCheckbox component can be added to a page using the <o:selectManyCheckbox> tag. This tag is just an extended version of the standard <h:selectManyCheckbox> tag. Therefore, you can safely replace the standard SelectManyCheckbox components with OpenFaces SelectManyCheckbox components, which provide you with an additional functionality. Just like in the standard <h:selectManyCheckbox> the value attribute lets you specify the current value of the component. The following example shows a definition of a simple SelectManyCheckbox component with three items. <o:selectManyCheckbox value="#{ManyCheckboxTest.CheckboxGroupExample}"> <f:selectItem value="1" itemLabel="Option 1"/> <f:selectItem value="2" itemLabel="Option 2"/> <f:selectItem value="3" itemLabel="Option 3"/> </o:selectManyCheckbox> You can customize various states of each Checkbox by applying images to it. The images are defined by the following attributes:
When you click on any of the checkboxes its view changes appropriately depending on its state. Customizing StylesYou can apply styles for the SelectManyCheckbox when it is in the enabled or disabled state, selected or unselected state, focused or rollover state. The table below lists all style attributes:
The following example demonstrates the usage of style-related attributes of the SelectManyCheckbox component:
<o:selectManyCheckbox id="selectManyCheckboxStyled" value="#{ManyCheckboxTest.CheckboxGroupExample}" enabledClass="enClass" enabledStyle="background-color: #B0AFFF;" disabledClass="desClass" disabledStyle="background-color: #6F6F6F;" focusedClass="focClass" focusedStyle="border: 1px solid #DDDF29;" rolloverClass="rollovClass" rolloverStyle="border: 1px solid #33DF29;"> <f:selectItem value="1" itemLabel="Option 1"/> <f:selectItem value="2" itemLabel="Option 2"/> <f:selectItem value="3" itemLabel="Option 3"/> </o:selectManyCheckbox> You can also apply styles to the labels of the SelectManyCheckbox items. You can specify their view in the focused, selected, rollover, and pressed state. The table below lists all style attributes:
Client-Side EventsThe SelectManyCheckbox component supports a set of standard client-side events such as onclick, ondblclick, onmousedown, onmouseover, onmouseup, onmouseout, onmousemove, onselect, onchange, onfocus, onblur, onkeyup, onkeydown, onkeypress. Client-Side APIAll client-side API methods for the SelectManyCheckbox component are listed in the following table:
|
|||||||||||||||||||||||||||||||||||||||||||||||
© 2009 TeamDev Ltd. | ![]() |