Author: mvitenkov
Date: 2008-07-02 09:16:18 -0400 (Wed, 02 Jul 2008)
New Revision: 9394
Modified:
trunk/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/OrderingList/OrderingListProperty.xhtml
trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml
Log:
+findComponent
Modified:
trunk/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml 2008-07-02
13:10:22 UTC (rev 9393)
+++
trunk/test-applications/facelets/src/main/webapp/ListShuttle/ListShuttleProperty.xhtml 2008-07-02
13:16:18 UTC (rev 9394)
@@ -1,10 +1,16 @@
-<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
id="listShuttlePropertySubviewID">
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rich="http://richfaces.org/rich"
+ id="listShuttlePropertySubviewID">
<h:panelGrid columns="2">
<h:column></h:column>
<h:panelGroup>
<a4j:commandButton value="reRender"
reRender="listShuttleID"></a4j:commandButton>
- <a4j:commandButton immediate="true" reRender="listShuttleID"
value="immediate submit(); (a4j)"></a4j:commandButton>
+ <a4j:commandButton immediate="true" reRender="listShuttleID"
+ value="immediate submit(); (a4j)"></a4j:commandButton>
<h:commandButton value="submit();" />
<h:commandButton immediate="true" value="immediate submit();"
/>
</h:panelGroup>
@@ -12,7 +18,8 @@
<h:outputText value="Enter quantity of lines" />
<h:panelGroup>
<h:inputText value="#{listShuttle.lenght}" />
- <a4j:commandButton action="#{listShuttle.addNewItem}"
reRender="listShuttleID" value="ok" />
+ <a4j:commandButton action="#{listShuttle.addNewItem}"
+ reRender="listShuttleID" value="ok" />
</h:panelGroup>
<h:outputText value="first" />
@@ -21,22 +28,28 @@
</h:inputText>
<h:outputText value="showButtonLabels" />
- <h:selectBooleanCheckbox value="#{listShuttle.showButtonLabels}"
onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{listShuttle.showButtonLabels}"
+ onchange="submit();" />
<h:outputText value="orderControlsVisible" />
- <h:selectBooleanCheckbox value="#{listShuttle.orderControlsVisible}"
onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{listShuttle.orderControlsVisible}"
+ onchange="submit();" />
<h:outputText value="moveControlsVisible" />
- <h:selectBooleanCheckbox value="#{listShuttle.moveControlsVisible}"
onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{listShuttle.moveControlsVisible}"
+ onchange="submit();" />
<h:outputText value="fastOrderControlsVisible" />
- <h:selectBooleanCheckbox value="#{listShuttle.fastOrderControlsVisible}"
onchange="submit();" />
+ <h:selectBooleanCheckbox
+ value="#{listShuttle.fastOrderControlsVisible}"
onchange="submit();" />
<h:outputText value="fastMoveControlsVisible" />
- <h:selectBooleanCheckbox value="#{listShuttle.fastMoveControlsVisible}"
onchange="submit();" />
+ <h:selectBooleanCheckbox
+ value="#{listShuttle.fastMoveControlsVisible}"
onchange="submit();" />
<h:outputText value="switchByClick" />
- <h:selectBooleanCheckbox value="#{listShuttle.switchByClick}"
onchange="submit();" />
+ <h:selectBooleanCheckbox value="#{listShuttle.switchByClick}"
+ onchange="submit();" />
<h:outputText value="sourceCaptionLabel" />
<h:inputText value="#{listShuttle.sourceCaptionLabel}">
@@ -107,21 +120,65 @@
<h:column></h:column>
<h:outputText value="JavaScript API"></h:outputText>
<h:column></h:column>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.doHide()"
value="Hide"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.doShow()"
value="Show"></a4j:commandLink>
- <a4j:commandLink
onclick="alert($('formID:listShuttleSubviewID:listShuttleID').component.isShown)"
value="isShown"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.Enable()"
value="Enable"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.Disable()"
value="Disable"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.isEnabled()"
value="isEnabled"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveUp"
value="moveUp"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveDown"
value="moveDown"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveTop"
value="moveTop"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveBottom"
value="moveBottom"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copy"
value="copy"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.remove"
value="remove"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copyAll"
value="copyAll"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.removeAll"
value="removeAll"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getSelection"
value="getSelection"></a4j:commandLink>
- <a4j:commandLink
onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getItems"
value="getItems"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.doHide()"
+ value="Hide"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.doShow()"
+ value="Show"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="alert($('formID:listShuttleSubviewID:listShuttleID').component.isShown)"
+ value="isShown"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.Enable()"
+ value="Enable"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.Disable()"
+ value="Disable"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.isEnabled()"
+ value="isEnabled"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveUp"
+ value="moveUp"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveDown"
+ value="moveDown"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveTop"
+ value="moveTop"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.moveBottom"
+ value="moveBottom"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copy"
+ value="copy"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.remove"
+ value="remove"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.copyAll"
+ value="copyAll"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.removeAll"
+ value="removeAll"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getSelection"
+ value="getSelection"></a4j:commandLink>
+ <a4j:commandLink
+ onclick="$('formID:listShuttleSubviewID:listShuttleID').component.getItems"
+ value="getItems"></a4j:commandLink>
</h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getActiveItem"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
+ value="#{rich:findComponent('listShuttleID').activeItem}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
Modified:
trunk/test-applications/facelets/src/main/webapp/OrderingList/OrderingListProperty.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/OrderingList/OrderingListProperty.xhtml 2008-07-02
13:10:22 UTC (rev 9393)
+++
trunk/test-applications/facelets/src/main/webapp/OrderingList/OrderingListProperty.xhtml 2008-07-02
13:16:18 UTC (rev 9394)
@@ -1,10 +1,16 @@
-<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
id="orderingListPropertySubviewID">
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rich="http://richfaces.org/rich"
+ id="orderingListPropertySubviewID">
<h:panelGrid columns="2">
<h:outputText value="Enter quantity of lines" />
<h:panelGroup>
<h:inputText value="#{orderingList.lenght}" />
- <a4j:commandButton action="#{orderingList.addNewItem}"
reRender="orderingListID" value="ok" />
+ <a4j:commandButton action="#{orderingList.addNewItem}"
+ reRender="orderingListID" value="ok" />
</h:panelGroup>
<h:outputText value="controlsType" />
@@ -70,7 +76,8 @@
</h:selectBooleanCheckbox>
<h:outputText value="fastOrderControlsVisible" />
- <h:selectBooleanCheckbox
value="#{orderingList.fastOrderControlsVisible}">
+ <h:selectBooleanCheckbox
+ value="#{orderingList.fastOrderControlsVisible}">
<a4j:support event="onclick"
reRender="orderingListID"></a4j:support>
</h:selectBooleanCheckbox>
@@ -80,7 +87,20 @@
</h:selectBooleanCheckbox>
<h:outputText value="rendered" />
- <h:selectBooleanCheckbox value="#{orderingList.rendered}"
onclick="submit();">
+ <h:selectBooleanCheckbox value="#{orderingList.rendered}"
+ onclick="submit();">
</h:selectBooleanCheckbox>
</h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getActiveItem"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
+ value="#{rich:findComponent('orderingListID').activeItem}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
Modified:
trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml 2008-07-02
13:10:22 UTC (rev 9393)
+++
trunk/test-applications/facelets/src/main/webapp/PickList/PickListProperty.xhtml 2008-07-02
13:16:18 UTC (rev 9394)
@@ -1,67 +1,95 @@
-<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
id="pickListPropertySubviewID">
- <h:panelGrid columns="2">
- <a4j:commandButton reRender="pickListTargenID" value="refresh
target"></a4j:commandButton>
- <h:dataTable id="pickListTargenID" value="#{pickList.value}"
var="list" border="1">
- <h:column>
- <h:outputText value="#{list}"></h:outputText>
- </h:column>
- </h:dataTable>
-
- <h:outputText value="title:"></h:outputText>
- <h:inputText value="#{pickList.title}"
onchange="submit();"></h:inputText>
-
- <h:outputText
value="moveControlsVerticalAlign:"></h:outputText>
- <h:inputText value="#{pickList.moveControlsVerticalAlign}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="showButtonLabels:"></h:outputText>
- <h:selectBooleanCheckbox value="#{pickList.showButtonLabels}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="copyAllControlLabel:"></h:outputText>
- <h:inputText value="#{pickList.copyAllControlLabel}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="copyControlLabel:"></h:outputText>
- <h:inputText value="#{pickList.copyControlLabel}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="removeControlLabel:"></h:outputText>
- <h:inputText value="#{pickList.removeControlLabel}"
onchange="submit();"></h:inputText>
-
- <h:outputText
value="removeAllControlLabel:"></h:outputText>
- <h:inputText value="#{pickList.removeAllControlLabel}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="switchByClick:"></h:outputText>
- <h:selectBooleanCheckbox value="#{pickList.switchByClick}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="listsHeight:"></h:outputText>
- <h:inputText value="#{pickList.listsHeight}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="sourceListWidth:"></h:outputText>
- <h:inputText value="#{pickList.sourceListWidth}"
onchange="submit();"></h:inputText>
-
- <h:outputText value="targetListWidth:"></h:outputText>
- <h:inputText value="#{pickList.targetListWidth}"
onchange="submit();"></h:inputText>
-
- <h:outputText
value="fastOrderControlsVisible:"></h:outputText>
- <h:selectBooleanCheckbox
value="#{pickList.fastOrderControlsVisible}"
-
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="rendered:"></h:outputText>
-
- <h:selectBooleanCheckbox value="#{pickList.rendered}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="immediate:"></h:outputText>
- <h:selectBooleanCheckbox value="#{pickList.immediate}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="disabled:"></h:outputText>
- <h:selectBooleanCheckbox value="#{pickList.disabled}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="required:"></h:outputText>
- <h:selectBooleanCheckbox value="#{pickList.required}"
onchange="submit();"></h:selectBooleanCheckbox>
-
- <h:outputText value="requiredMessage:"></h:outputText>
- <h:inputText value="#{pickList.requiredMessage}"
onchange="submit();"></h:inputText>
-
- <h:commandButton actionListener="#{pickList.checkBinding}"
value="Binding"></h:commandButton>
- <h:outputText
value="#{pickList.bindLabel}"></h:outputText>
-
- </h:panelGrid>
+<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:rich="http://richfaces.org/rich"
id="pickListPropertySubviewID">
+ <h:panelGrid columns="2">
+ <a4j:commandButton reRender="pickListTargenID" value="refresh
target"></a4j:commandButton>
+ <h:dataTable id="pickListTargenID" value="#{pickList.value}"
+ var="list" border="1">
+ <h:column>
+ <h:outputText value="#{list}"></h:outputText>
+ </h:column>
+ </h:dataTable>
+
+ <h:outputText value="title:"></h:outputText>
+ <h:inputText value="#{pickList.title}"
onchange="submit();"></h:inputText>
+
+ <h:outputText value="moveControlsVerticalAlign:"></h:outputText>
+ <h:inputText value="#{pickList.moveControlsVerticalAlign}"
+ onchange="submit();"></h:inputText>
+
+ <h:outputText value="showButtonLabels:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickList.showButtonLabels}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="copyAllControlLabel:"></h:outputText>
+ <h:inputText value="#{pickList.copyAllControlLabel}"
+ onchange="submit();"></h:inputText>
+
+ <h:outputText value="copyControlLabel:"></h:outputText>
+ <h:inputText value="#{pickList.copyControlLabel}"
onchange="submit();"></h:inputText>
+
+ <h:outputText value="removeControlLabel:"></h:outputText>
+ <h:inputText value="#{pickList.removeControlLabel}"
+ onchange="submit();"></h:inputText>
+
+ <h:outputText value="removeAllControlLabel:"></h:outputText>
+ <h:inputText value="#{pickList.removeAllControlLabel}"
+ onchange="submit();"></h:inputText>
+
+ <h:outputText value="switchByClick:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickList.switchByClick}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="listsHeight:"></h:outputText>
+ <h:inputText value="#{pickList.listsHeight}"
onchange="submit();"></h:inputText>
+
+ <h:outputText value="sourceListWidth:"></h:outputText>
+ <h:inputText value="#{pickList.sourceListWidth}"
onchange="submit();"></h:inputText>
+
+ <h:outputText value="targetListWidth:"></h:outputText>
+ <h:inputText value="#{pickList.targetListWidth}"
onchange="submit();"></h:inputText>
+
+ <h:outputText value="fastOrderControlsVisible:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickList.fastOrderControlsVisible}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="rendered:"></h:outputText>
+
+ <h:selectBooleanCheckbox value="#{pickList.rendered}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="immediate:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickList.immediate}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="disabled:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickList.disabled}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="required:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{pickList.required}"
+ onchange="submit();"></h:selectBooleanCheckbox>
+
+ <h:outputText value="requiredMessage:"></h:outputText>
+ <h:inputText value="#{pickList.requiredMessage}"
onchange="submit();"></h:inputText>
+
+ <h:commandButton actionListener="#{pickList.checkBinding}"
+ value="Binding"></h:commandButton>
+ <h:outputText value="#{pickList.bindLabel}"></h:outputText>
+
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getSelectedValues"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
+ value="#{rich:findComponent('pickListID').selectedValues}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file