Command Button Tag

Table of Contents

<mobi:commandButton>

A Mobile Styled Button.

Simple Usage.

<mobi:commandButton name="submitB" buttonType="default"
                    value="default"/>
<mobi:commandButton name="submitB" buttonType='important'
                    value="important"/>
<mobi:commandButton name="submitB" buttonType='attention'
                    value="attention"/>
<mobi:commandButton name="submitB" value="plain"/>

Usage with other jsp tags:- commandButtonGroup, panelConfirmation, submitNotification. Must use type="button"

      <mobi:fieldsetGroup>
            <mobi:fieldsetRow>
                <mobi:commandButtonGroup id="group1"
                                         name="selectedId"
                                         selectedId="${buttonGroupInfo.selectedId}"
                                         orientation="${buttonGroupInfo.orientation}"
                                         styleClass="${buttonGroupInfo.styleClass}"
                                         disabled="${buttonGroupInfo.disabled}"
                                         style="${buttonGroupInfo.style}">
                    <mobi:commandButton value="Yes" id="button1"
                             type="button"
                             buttonType="${buttonGroupInfo.buttonType}"/>
                    <mobi:commandButton value="No"
                            type="button"  id="button2"
                            buttonType="${buttonGroupInfo.buttonType}"/>
                    <mobi:commandButton value="Please"
                            type="button" id="button3"
                            buttonType="${buttonGroupInfo.buttonType}" />
                </mobi:commandButtonGroup>
            </mobi:fieldsetRow>
        </mobi:fieldsetGroup>

panelConfirmation and/or submitNotification. Must have page unique id on panelConfirmation and/or submitNotification tag.
and use type="button" on commandButton.

     <mobi:fieldsetGroup>
            <mobi:fieldsetRow>
                <mobi:inputText name="testInput" type="text" autoCorrect="off"
                         placeholder="test input for form submit" value="${pcInfo.testInput}"/>
            </mobi:fieldsetRow>
            <mobi:fieldsetRow>
                    <mobi:commandButton value="TestPanelConfirmation" id="button1"
                             type="button"
                             panelConfirmation="pc1"
                             submitNotification="sn1"
                             buttonType="default"/>
            </mobi:fieldsetRow>
        </mobi:fieldsetGroup>
        <mobi:panelConfirmation id="pc1"
                title="${pcInfo.title}"
                message="${pcInfo.message}"
                type="${pcInfo.type}"
                acceptLabel="${pcInfo.acceptLabel}"
                cancelLabel="${pcInfo.cancelLabel}"
                style="${pcInfo.style}"
                styleClass="${pcInfo.styleClass}"/>
        <mobi:submitNotification id="sn1"
                                style="${submitNotification.style}"
                                styleClass = "${submitNotification.styleClass}"
                                disabled="${submitNotification.disabled}">
            <h3>Working....</h3>
        </mobi:submitNotification>

Also, if type="button", then must include application javascript to branch with whatever application is using for submit.
If no javascript, can just put the following in the application or each jsp page:-

<script type="text/javascript">
        if (options.jspForm){
            options.jspForm.submit();
        }
    }
</script>

The submitNotification tag requires a callback to dismiss the blocking popup so that needs to tie into whatever is used for update with application javascript, or can simply be done in this manner:-

{code:xml}
<script type="text/javascript">
	mobi.AjaxRequest = function( options){
        if (options.oncomplete || options.onComplete){
            var callBack = options.oncomplete || options.onComplete;
            ice.mobi.addListener(document, "DOMSubtreeModified", callBack);
        }
        if (options.jspForm){
            options.jspForm.submit();
        }
    }
</script>

Tag Documentation

commandButton

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2016 ICEsoft Technologies Canada Corp.