View Source

h1. PushButton:

See the namespace definition requirements on Slider component



 page should look like:
{code:xml}
<html xmlns:ann="http://www.icesoft.com/icefaces/component/annotated"
..>
<h:body class="yui-skin-sam">
<h:form >
<ann:pushbutton />
<h:form>
<h:body>
<html>
{code}

*basic attributes:*
&nbsp;actionListener, example:-

{code:xml}
<h:form id="myform">
<h:panelGroup id="push1" class="yui-button yui-push-button">
<ann:pushbutton id="pushId" label="submitForm"
actionListener="#{button.actionListenerMethod}" />
</h:panelGroup>
</h:form>
{code}

&nbsp;image and action

{code:xml}
<h:form id="myform2">
<h:panelGroup id="push2">
<ann:pushbutton id="pushId2" label="Action"
singleSubmit="true"
image="../images/image1.gif"
action="#{button.methodAction}" />
</h:panelGroup>
</h:form>
{code}



h2. Additional attributes:

*&nbsp;Defining style:*
&nbsp; a pass through to the root element of the component.

*&nbsp;Defining style class:*
&nbsp; a pass through to the root element of the component.

*&nbsp;Defining tabindex:*
&nbsp; a pass through to the root element of the component, default=0.

*&nbsp;Defining disabled:*
&nbsp; a pass through to the root element of the component.

*&nbsp;Defining the submission behaviour:*
&nbsp;When singleSubmit attribute is true, the pushbutton only submits an event request a submit call with execute=@this and render=@all, if false then full submit happens where execute being set to @all. default valid is false.


h2. Keyboard and ARIA support:

&nbsp;Pushbutton component supports keyboard short-cuts and ARIA. Aria support can be enabled at page level or at application level. By default ARIA is enabled at application level.

&nbsp;To enable/disable ARIA at page level, the ice:config tag handler can used:

{code:xml}
<ice:config ariaEnabled="true"/>
{code}

&nbsp;To enable/disable ARIA at application level, the following param can be set in web.xml.
{code:xml}
<context-param>
<param-name>org.icefaces.aria.enabled</param-name>
<param-value>false</param-value>
</context-param>
{code}

h3. Keyboard short-cuts supported by pushbutton:

* space or enter key will fire the button's onclick event

&nbsp;Aria role="button", aria-describedby and aria-disabled properties supported


h1. Checkbox (with sam-style it is rendered as checkbutton:
&nbsp;....within form similar to pushbutton above:-
{code:xml}
<h:panelGroup id="overPanel" styleClass="yui-skin-sam">
<ann:checkbox id="chkbox" label="button1"
value="#{button.checked}"
singleSubmit="false"/>
</h:panelGroup>
{code}

h2. Additional attributes(same as pushbutton except for):

*&nbsp;Defining the submission behaviour:*
&nbsp;When singleSubmit attribute is true, the checkbox only submits an event request a submit call with execute=@this and render=@all, if false then only the hidden field is updated on the client and some other component must submit the form for the server model side to be updated.

3. Keyboard short-cuts supported by pushbutton:

* space will toggle the checkbox/checkbutton

&nbsp;Aria role="button", aria-describedby and aria-disabled properties supported as well as aria-checked.