Author: mvitenkov
Date: 2008-07-02 08:36:39 -0400 (Wed, 02 Jul 2008)
New Revision: 9380
Modified:
trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml
Log:
+findComponent
Modified:
trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml 2008-07-02
12:35:20 UTC (rev 9379)
+++
trunk/test-applications/facelets/src/main/webapp/InplaceInput/InplaceInputProperty.xhtml 2008-07-02
12:36:39 UTC (rev 9380)
@@ -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="inplaceInputPropertySubviewID">
-
+<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="inplaceInputPropertySubviewID">
+
<h:panelGrid columns="2">
<h:outputText value="value"></h:outputText>
- <h:outputText id="inplaceInputValueID"
value="#{inplaceInput.value}" onchange="submit();">
+ <h:outputText id="inplaceInputValueID"
value="#{inplaceInput.value}"
+ onchange="submit();">
</h:outputText>
-
+
<h:outputText value="defaultLabel"></h:outputText>
<h:inputText value="#{inplaceInput.defaultLabel}"
onchange="submit();">
</h:inputText>
@@ -14,11 +20,13 @@
</h:inputText>
<h:outputText value="maxInputWidth"></h:outputText>
- <h:inputText value="#{inplaceInput.maxInputWidth}"
onchange="submit();">
+ <h:inputText value="#{inplaceInput.maxInputWidth}"
+ onchange="submit();">
</h:inputText>
<h:outputText value="minInputWidth"></h:outputText>
- <h:inputText value="#{inplaceInput.minInputWidth}"
onchange="submit();">
+ <h:inputText value="#{inplaceInput.minInputWidth}"
+ onchange="submit();">
</h:inputText>
<h:outputText value="tabindex"></h:outputText>
@@ -30,56 +38,89 @@
</h:inputText>
<h:outputText value="controlsVerticalPosition"></h:outputText>
- <h:selectOneRadio value="#{inplaceInput.controlsVerticalPosition}"
onchange="submit();">
- <f:selectItem itemLabel="top" itemValue="top"/>
- <f:selectItem itemLabel="bottom" itemValue="bottom"/>
- <f:selectItem itemLabel="center" itemValue="center"/>
+ <h:selectOneRadio value="#{inplaceInput.controlsVerticalPosition}"
+ onchange="submit();">
+ <f:selectItem itemLabel="top" itemValue="top" />
+ <f:selectItem itemLabel="bottom" itemValue="bottom" />
+ <f:selectItem itemLabel="center" itemValue="center" />
</h:selectOneRadio>
<h:outputText value="controlsHorizontalPosition"></h:outputText>
- <h:selectOneRadio value="#{inplaceInput.controlsHorizontalPosition}"
onchange="submit();">
- <f:selectItem itemLabel="right" itemValue="right"/>
- <f:selectItem itemLabel="center" itemValue="center"/>
- <f:selectItem itemLabel="left" itemValue="left"/>
+ <h:selectOneRadio value="#{inplaceInput.controlsHorizontalPosition}"
+ onchange="submit();">
+ <f:selectItem itemLabel="right" itemValue="right" />
+ <f:selectItem itemLabel="center" itemValue="center" />
+ <f:selectItem itemLabel="left" itemValue="left" />
</h:selectOneRadio>
<h:outputText value="selectOnEdit"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceInput.selectOnEdit}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{inplaceInput.selectOnEdit}"
+ onchange="submit();">
</h:selectBooleanCheckbox>
<h:outputText value="showControls"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceInput.showControls}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{inplaceInput.showControls}"
+ onchange="submit();">
</h:selectBooleanCheckbox>
<h:outputText value="rendered"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceInput.rendered}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{inplaceInput.rendered}"
+ onchange="submit();">
</h:selectBooleanCheckbox>
<h:outputText value="immediate"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceInput.immediate}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{inplaceInput.immediate}"
+ onchange="submit();">
</h:selectBooleanCheckbox>
<h:outputText value="required"></h:outputText>
- <h:selectBooleanCheckbox value="#{inplaceInput.required}"
onchange="submit();">
+ <h:selectBooleanCheckbox value="#{inplaceInput.required}"
+ onchange="submit();">
</h:selectBooleanCheckbox>
<h:outputText value="requiredMessage"></h:outputText>
- <h:inputText value="#{inplaceInput.requiredMessage}"
onchange="submit();">
+ <h:inputText value="#{inplaceInput.requiredMessage}"
+ onchange="submit();">
</h:inputText>
-
- <h:commandButton actionListener="#{inplaceInput.checkBinding}"
value="Binding"></h:commandButton>
+
+ <h:commandButton actionListener="#{inplaceInput.checkBinding}"
+ value="Binding"></h:commandButton>
<h:outputText value="#{inplaceInput.bindLabel}"></h:outputText>
-
+
<h:outputText value="layout"></h:outputText>
<h:inputText value="#{inplaceInput.layout}"
onchange="submit();">
</h:inputText>
-
+
</h:panelGrid>
-
- <a4j:commandLink
onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.edit()"
value="edit"></a4j:commandLink> <br/>
- <a4j:commandLink
onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.save()"
value="save"></a4j:commandLink> <br/>
- <a4j:commandLink
onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.cancel()"
value="cancel"></a4j:commandLink> <br/>
- <a4j:commandLink
onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.getValue()"
value="getValue"></a4j:commandLink> <br/>
- <a4j:commandLink
onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.setValue('setValue')"
value="setValuel"></a4j:commandLink>
-
+
+ <a4j:commandLink
+ onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.edit()"
+ value="edit"></a4j:commandLink>
+ <br />
+ <a4j:commandLink
+ onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.save()"
+ value="save"></a4j:commandLink>
+ <br />
+ <a4j:commandLink
+ onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.cancel()"
+ value="cancel"></a4j:commandLink>
+ <br />
+ <a4j:commandLink
+ onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.getValue()"
+ value="getValue"></a4j:commandLink>
+ <br />
+ <a4j:commandLink
+ onclick="$('formID:inplaceInputSubviewID:inplaceInputId').component.setValue('setValue')"
+ value="setValuel"></a4j:commandLink>
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getValue"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
value="#{rich:findComponent('inplaceInputId').value}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file