Author: mvitenkov
Date: 2008-07-01 14:30:52 -0400 (Tue, 01 Jul 2008)
New Revision: 9339
Modified:
trunk/test-applications/jsp/src/main/webapp/Paint2D/Paint2DProperty.jsp
Log:
+findComponent
Modified: trunk/test-applications/jsp/src/main/webapp/Paint2D/Paint2DProperty.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/Paint2D/Paint2DProperty.jsp 2008-07-01
18:27:19 UTC (rev 9338)
+++ trunk/test-applications/jsp/src/main/webapp/Paint2D/Paint2DProperty.jsp 2008-07-01
18:30:52 UTC (rev 9339)
@@ -4,82 +4,96 @@
<%@ taglib
uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="Paint2DPropertySubviewID">
- <h:panelGrid columns="2" cellpadding="5px"
border="2">
- <h:outputText value="Text"></h:outputText>
- <h:inputText value="#{paintData.text}">
- <a4j:support event="onchange" reRender="paint2dID" />
- </h:inputText>
+ <h:panelGrid columns="2" cellpadding="5px"
border="2">
+ <h:outputText value="Text"></h:outputText>
+ <h:inputText value="#{paintData.text}">
+ <a4j:support event="onchange" reRender="paint2dID" />
+ </h:inputText>
- <h:outputText value="Width: "></h:outputText>
- <h:inputText value="#{paint2D.width}">
- <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Width: "></h:outputText>
+ <h:inputText value="#{paint2D.width}">
+ <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Height: "></h:outputText>
- <h:inputText value="#{paint2D.height}">
- <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Height: "></h:outputText>
+ <h:inputText value="#{paint2D.height}">
+ <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Vertical space: "></h:outputText>
- <h:inputText value="#{paint2D.vspace}">
- <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Vertical space: "></h:outputText>
+ <h:inputText value="#{paint2D.vspace}">
+ <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Horizontal space: "></h:outputText>
- <h:inputText value="#{paint2D.hspace}">
- <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
- </h:inputText>
-
- <h:outputText value="cacheable:"></h:outputText>
- <h:selectBooleanCheckbox value="#{paint2D.cacheable}"
onchange="submit();"/>
-
- <h:outputText value="Align:"></h:outputText>
- <h:selectOneMenu value="#{paint2D.align}">
- <f:selectItem itemLabel="left" itemValue="left" />
- <f:selectItem itemLabel="middle" itemValue="middle" />
- <f:selectItem itemLabel="right" itemValue="right" />
- <f:selectItem itemLabel="bottom" itemValue="bottom" />
- <f:selectItem itemLabel="top" itemValue="top" />
- <a4j:support event="onclick"
reRender="paint2dID"></a4j:support>
- </h:selectOneMenu>
+ <h:outputText value="Horizontal space: "></h:outputText>
+ <h:inputText value="#{paint2D.hspace}">
+ <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
+ </h:inputText>
- <h:outputText value="Format:"></h:outputText>
- <h:selectOneMenu value="#{paint2D.format}">
- <f:selectItem itemLabel="jpeg" itemValue="jpeg" />
- <f:selectItem itemLabel="gif" itemValue="gif" />
- <f:selectItem itemLabel="png" itemValue="png" />
- <a4j:support event="onclick"
reRender="paint2dID"></a4j:support>
- </h:selectOneMenu>
+ <h:outputText value="cacheable:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{paint2D.cacheable}"
+ onchange="submit();" />
- <h:outputText value="Background Colour"></h:outputText>
- <h:selectOneMenu value="#{paint2D.bgcolor}">
- <f:selectItem itemLabel="aqua" itemValue="aqua" />
- <f:selectItem itemLabel="blue" itemValue="blue" />
- <f:selectItem itemLabel="fuchsia" itemValue="fuchsia" />
- <f:selectItem itemLabel="gray" itemValue="gray" />
- <f:selectItem itemLabel="lime" itemValue="lime" />
- <f:selectItem itemLabel="maroon" itemValue="maroon" />
- <f:selectItem itemLabel="purple" itemValue="purple" />
- <f:selectItem itemLabel="red" itemValue="red" />
- <f:selectItem itemLabel="silver" itemValue="silver" />
- <f:selectItem itemLabel="teal" itemValue="teal" />
- <f:selectItem itemLabel="yellow" itemValue="yellow" />
- <f:selectItem itemLabel="white" itemValue="white" />
- <a4j:support event="onclick"
reRender="paint2dID"></a4j:support>
- </h:selectOneMenu>
+ <h:outputText value="Align:"></h:outputText>
+ <h:selectOneMenu value="#{paint2D.align}">
+ <f:selectItem itemLabel="left" itemValue="left" />
+ <f:selectItem itemLabel="middle" itemValue="middle" />
+ <f:selectItem itemLabel="right" itemValue="right" />
+ <f:selectItem itemLabel="bottom" itemValue="bottom" />
+ <f:selectItem itemLabel="top" itemValue="top" />
+ <a4j:support event="onclick"
reRender="paint2dID"></a4j:support>
+ </h:selectOneMenu>
- <h:outputText value="Style" />
- <h:selectBooleanCheckbox value="#{paint2D.style}">
- <a4j:support event="onclick" reRender="paint2dID,borderID"
/>
- </h:selectBooleanCheckbox>
+ <h:outputText value="Format:"></h:outputText>
+ <h:selectOneMenu value="#{paint2D.format}">
+ <f:selectItem itemLabel="jpeg" itemValue="jpeg" />
+ <f:selectItem itemLabel="gif" itemValue="gif" />
+ <f:selectItem itemLabel="png" itemValue="png" />
+ <a4j:support event="onclick"
reRender="paint2dID"></a4j:support>
+ </h:selectOneMenu>
- <h:outputText value="Border: "></h:outputText>
- <h:inputText id="borderID" disabled="#{paint2D.style}"
value="#{paint2D.border}">
- <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
- </h:inputText>
+ <h:outputText value="Background Colour"></h:outputText>
+ <h:selectOneMenu value="#{paint2D.bgcolor}">
+ <f:selectItem itemLabel="aqua" itemValue="aqua" />
+ <f:selectItem itemLabel="blue" itemValue="blue" />
+ <f:selectItem itemLabel="fuchsia" itemValue="fuchsia" />
+ <f:selectItem itemLabel="gray" itemValue="gray" />
+ <f:selectItem itemLabel="lime" itemValue="lime" />
+ <f:selectItem itemLabel="maroon" itemValue="maroon" />
+ <f:selectItem itemLabel="purple" itemValue="purple" />
+ <f:selectItem itemLabel="red" itemValue="red" />
+ <f:selectItem itemLabel="silver" itemValue="silver" />
+ <f:selectItem itemLabel="teal" itemValue="teal" />
+ <f:selectItem itemLabel="yellow" itemValue="yellow" />
+ <f:selectItem itemLabel="white" itemValue="white" />
+ <a4j:support event="onclick"
reRender="paint2dID"></a4j:support>
+ </h:selectOneMenu>
- <h:outputText value="Rendered"></h:outputText>
- <h:selectBooleanCheckbox value="#{paint2D.rendered}"
onchange="submit();">
- </h:selectBooleanCheckbox>
- </h:panelGrid>
+ <h:outputText value="Style" />
+ <h:selectBooleanCheckbox value="#{paint2D.style}">
+ <a4j:support event="onclick" reRender="paint2dID,borderID"
/>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="Border: "></h:outputText>
+ <h:inputText id="borderID" disabled="#{paint2D.style}"
+ value="#{paint2D.border}">
+ <a4j:support event="onchange"
reRender="paint2dID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="Rendered"></h:outputText>
+ <h:selectBooleanCheckbox value="#{paint2D.rendered}"
+ onchange="submit();">
+ </h:selectBooleanCheckbox>
+ </h:panelGrid>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getData"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
value="#{rich:findComponent('paint2dID').data.text}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file