Author: mvitenkov
Date: 2008-06-17 08:07:13 -0400 (Tue, 17 Jun 2008)
New Revision: 9073
Modified:
trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp
Log:
4 JS API with component control test
Modified: trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp
===================================================================
---
trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp 2008-06-17
10:49:09 UTC (rev 9072)
+++
trunk/test-applications/jsp/src/main/webapp/ContextMenu/ContextMenuProperty.jsp 2008-06-17
12:07:13 UTC (rev 9073)
@@ -6,9 +6,11 @@
<f:subview id="contextMenuPropertySubviewID">
<a4j:commandButton value="reRender"
reRender="cmInfoID"></a4j:commandButton>
- <a4j:commandButton action="submit();" immediate="true"
value="immediate submit(); (a4j)"></a4j:commandButton>
+ <a4j:commandButton action="submit();" immediate="true"
+ value="immediate submit(); (a4j)"></a4j:commandButton>
<h:commandButton action="submit();" value="submit();" />
- <h:commandButton action="submit();" immediate="true"
value="immediate submit();" />
+ <h:commandButton action="submit();" immediate="true"
+ value="immediate submit();" />
<h:panelGrid columns="2" style="top">
<h:outputText value="event:" />
@@ -34,22 +36,57 @@
</h:inputText>
<h:outputText value="submitMode:" />
- <h:selectOneRadio value="#{contextMenu.submitMode}"
onchange="submit();">
+ <h:selectOneRadio value="#{contextMenu.submitMode}"
+ onchange="submit();">
<f:selectItem itemLabel="none" itemValue="none" />
<f:selectItem itemLabel="server" itemValue="server" />
<f:selectItem itemLabel="ajax" itemValue="ajax" />
</h:selectOneRadio>
<h:outputText value="attached" />
- <h:selectBooleanCheckbox value="#{contextMenu.attached}"
onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{contextMenu.attached}"
+ onchange="submit();" />
<h:outputText value="disableDefaultMenu:" />
- <h:selectBooleanCheckbox value="#{contextMenu.disableDefaultMenu}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{contextMenu.disableDefaultMenu}"
+ onchange="submit();">
<a4j:support event="onchange"
reRender="contextMenuID"></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{contextMenu.rendered}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{contextMenu.rendered}"
+ onchange="submit();">
</h:selectBooleanCheckbox>
</h:panelGrid>
+ <br />
+ <h:panelGrid columns="2">
+ <a4j:commandLink
+ onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.show(event)"
+ value="show(event)"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.hide(event)"
+ value="hide(event)"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.enable()"
+ value="enable()"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:contextMenuSubviewID:contextMenuDefaultID').component.disable()"
+ value="disable()"></a4j:commandLink>
+ </h:panelGrid>
+ <br />
+ <f:verbatim>
+ <h:outputText value="Component controll test" style="FONT-WEIGHT:
bold;"></h:outputText>
+ <br />
+ <a href="#" id="showID">show(event)</a>
+ <br />
+ <a href="#" id="hideID">hide(event)</a>
+ <br />
+ <a href="#" id="enableID">enable()</a>
+ <br />
+ <a href="#" id="disableID">disable()</a>
+ </f:verbatim>
+ <rich:componentControl attachTo="showID" event="onclick"
for="contextMenuDefaultID"
operation="show"></rich:componentControl>
+ <rich:componentControl attachTo="hideID" event="onclick"
for="contextMenuDefaultID"
operation="hide"></rich:componentControl>
+ <rich:componentControl attachTo="enableID" event="onclick"
for="contextMenuDefaultID"
operation="enable"></rich:componentControl>
+ <rich:componentControl attachTo="disableID" event="onclick"
for="contextMenuDefaultID"
operation="disable"></rich:componentControl>
</f:subview>
\ No newline at end of file
Show replies by date