Author: abelevich
Date: 2009-03-02 12:53:47 -0500 (Mon, 02 Mar 2009)
New Revision: 12793
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlTest.xhtml
Log:
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlAutoTest.xhtml 2009-03-02
17:53:47 UTC (rev 12793)
@@ -0,0 +1,69 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <ui:composition template="#{templateBean.autoTestTemplate}">
+ <ui:define name="component">
+ <h:outputText id="test2" value="#{autoTestBean.text}" />
+
+ <rich:togglePanel id="ajax_panel_one"
+ switchType="ajax"
+ stateOrder="first,second"
initialState="first" label="Ajax">
+
+ <f:facet name="first">
+ <h:outputText id="ajax_state_one" value="First State" />
+ </f:facet>
+ <f:facet name="second">
+ <h:outputText id="ajax_state_two" value="Second State" />
+ </f:facet>
+
+ </rich:togglePanel>
+
+ <rich:toggleControl id="componentId"
+ for="ajax_panel_one"
+ immediate="#{autoTestBean.immediate}"
+ rendered="#{autoTestBean.rendered}"
+ ajaxSingle="#{autoTestBean.ajaxSingle}"
+ actionListener="#{autoTestBean.actionListener}"
+ process="#{autoTestBean.process}"
+ reRender="#{autoTestBean.reRender}, autoTestForm:test2"
+ limitToList="#{autoTestBean.limitToList}"
+ bypassUpdates="#{autoTestBean.bypassUpdate}"
+ style="width: 200px; background-color: blue; color: yellow;"
+ styleClass="className"
+ oncomplete="#{autoTestBean.oncomplete}"
+ onbeforedomupdate="EventQueue.fire('onbeforedomupdate')"
+ onblur="EventQueue.fire('onblur')"
+ onclick="EventQueue.fire('onclick')"
+ ondblclick="EventQueue.fire('ondblclick')"
+ onfocus="EventQueue.fire('onfocus')"
+ onkeydown="EventQueue.fire('onkeydown')"
+ onkeypress="EventQueue.fire('onkeypress')"
+ onkeyup="EventQueue.fire('onkeyup')"
+ onmousedown="EventQueue.fire('onmousedown')"
+ onmousemove="EventQueue.fire('onmousemove')"
+ onmouseout="EventQueue.fire('onmouseout')"
+ onmouseover="EventQueue.fire('onmouseover')"
+ onmouseup="EventQueue.fire('onmouseup')"
+ >
+
+ <h:outputText value="Ajax next" />
+ <h:panelGroup id="content">
+ <h:inputText id="child" value="#{panelBean.content}"
required="true" />
+ </h:panelGroup>
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="ajax_first_one" for="ajax_panel_one"
switchToState="first" action="#{panelBean.increment}">
+ <h:outputText value="Ajax first" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="ajax_second_one" for="ajax_panel_one"
switchToState="second" action="#{panelBean.increment}">
+ <h:outputText value="Ajax second" />
+ </rich:toggleControl>
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlTest.xhtml
===================================================================
---
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlTest.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/toggleControl/toggleControlTest.xhtml 2009-03-02
17:53:47 UTC (rev 12793)
@@ -0,0 +1,197 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+ <ui:composition template="#{templateBean.template}">
+ <ui:define name="style">
+ .link {margin: 0px 5px}
+
+ .component_div {
+ border: 1px solid blue;
+ margin: 2px;
+ }
+ </ui:define>
+ <ui:define name="component">
+ <h:form id="mainForm">
+ <fieldset>
+ <legend>toggleConrol outside togglePanel</legend>
+ <h:panelGroup layout="block" styleClass="component_div">
+ <rich:togglePanel id="client_panel_one"
+ switchType="client"
+ stateOrder="first,second"
initialState="first" label="Client">
+
+ <f:facet name="first">
+ <h:outputText id="client_state_one" value="First
State" />
+ </f:facet>
+ <f:facet name="second">
+ <h:outputText id="client_state_two"
value="Second State" />
+ </f:facet>
+ </rich:togglePanel>
+
+ <rich:toggleControl id="client_next_one"
for="client_panel_one" action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Client next" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="client_first_one"
for="client_panel_one" switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Client first" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="client_second_one"
for="client_panel_one" switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Client second" />
+ </rich:toggleControl>
+ </h:panelGroup>
+
+ <h:panelGroup layout="block" styleClass="component_div">
+ <rich:togglePanel id="server_panel_one"
+ switchType="server"
+ stateOrder="first,second"
initialState="first" label="Server">
+ <f:facet name="first">
+ <h:outputText id="server_state_one" value="First
State" />
+ </f:facet>
+ <f:facet name="second">
+ <h:outputText id="server_state_two"
value="Second State" />
+ </f:facet>
+ </rich:togglePanel>
+
+ <rich:toggleControl id="server_next_one"
for="server_panel_one" action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Server next" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="server_first_one"
for="server_panel_one" switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Server first" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="server_second_one"
for="server_panel_one" switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Server second" />
+ </rich:toggleControl>
+ </h:panelGroup>
+
+ <h:panelGroup layout="block" styleClass="component_div">
+ <rich:togglePanel id="ajax_panel_one"
+ switchType="ajax"
+ stateOrder="first,second"
initialState="first" label="Ajax">
+ <f:facet name="first">
+ <h:outputText id="ajax_state_one" value="First
State" />
+ </f:facet>
+ <f:facet name="second">
+ <h:outputText id="ajax_state_two" value="Second
State" />
+ </f:facet>
+ </rich:togglePanel>
+
+ <rich:toggleControl id="ajax_next_one"
for="ajax_panel_one" action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Ajax next" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="ajax_first_one"
for="ajax_panel_one" switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Ajax first" />
+ </rich:toggleControl>
+ <br/>
+ <rich:toggleControl id="ajax_second_one"
for="ajax_panel_one" switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}">
+ <h:outputText value="Ajax second" />
+ </rich:toggleControl>
+ </h:panelGroup>
+ </fieldset>
+
+ <fieldset>
+ <legend>toggleConrol inside togglePanel</legend>
+
+ <h:panelGroup layout="block" styleClass="component_div">
+
+ <rich:togglePanel id="client_panel_two"
initialState="empty" switchType="server">
+
+ <f:facet name="first">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="client_panel_two" value="empty
" switchToState="empty" action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="client_panel_two"
value="second " switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <h:outputText value=" Client First" />
+ </h:panelGroup>
+ </f:facet>
+
+ <f:facet name="second">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="client_panel_two"
value="empty " switchToState="empty"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="client_panel_two"
value="first " switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <h:outputText value=" Client Second" />
+ </h:panelGroup>
+ </f:facet>
+
+ <f:facet name="empty">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="client_panel_two"
value="first " switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="client_panel_two"
value="second " switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ </h:panelGroup>
+ </f:facet>
+ </rich:togglePanel>
+
+ </h:panelGroup>
+
+ <h:panelGroup layout="block" styleClass="component_div">
+
+ <rich:togglePanel id="server_panel_two"
initialState="empty" switchType="server">
+
+ <f:facet name="first">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="server_panel_two"
value="empty " switchToState="empty"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="server_panel_two"
value="second " switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <h:outputText value=" Server First" />
+ </h:panelGroup>
+ </f:facet>
+
+ <f:facet name="second">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="server_panel_two"
value="empty " switchToState="empty"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="server_panel_two"
value="first " switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <h:outputText value=" Server Second" />
+ </h:panelGroup>
+ </f:facet>
+
+ <f:facet name="empty">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="server_panel_two"
value="first " switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="server_panel_two" value="
second " switchToState="second" action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ </h:panelGroup>
+ </f:facet>
+ </rich:togglePanel>
+ </h:panelGroup>
+
+ <h:panelGroup layout="block" styleClass="component_div">
+
+ <rich:togglePanel id="ajax_panel_two"
initialState="empty" switchType="ajax">
+
+ <f:facet name="first">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="ajax_panel_two"
value="empty " switchToState="empty"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="ajax_panel_two"
value="second " switchToState="second"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <h:outputText value=" Ajax First" />
+ </h:panelGroup>
+ </f:facet>
+
+ <f:facet name="second">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="ajax_panel_two"
value="empty " switchToState="empty"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="ajax_panel_two"
value="first " switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <h:outputText value=" Ajax Second" />
+ </h:panelGroup>
+ </f:facet>
+
+ <f:facet name="empty">
+ <h:panelGroup layout="block">
+ <rich:toggleControl for="ajax_panel_two"
value="first " switchToState="first"
action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ <rich:toggleControl for="ajax_panel_two" value="
second " switchToState="second" action="#{panelBean.increment}"
actionListener="#{panelBean.actionListener}"/>
+ </h:panelGroup>
+ </f:facet>
+ </rich:togglePanel>
+ </h:panelGroup>
+ </fieldset>
+ <a4j:outputPanel ajaxRendered="true" id="outputPanel" >
+ <h:inputText value="#{panelBean.value}"
id="value"></h:inputText>
+ <h:outputText value="#{panelBean.value2}"
id="value2"></h:outputText>
+ </a4j:outputPanel>
+ </h:form>
+ </ui:define>
+ </ui:composition>
+</html>
\ No newline at end of file