Author: mvitenkov
Date: 2008-07-02 07:15:33 -0400 (Wed, 02 Jul 2008)
New Revision: 9363
Modified:
trunk/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml
Log:
+findComponent
Modified:
trunk/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml 2008-07-02
11:12:57 UTC (rev 9362)
+++
trunk/test-applications/facelets/src/main/webapp/ComponentControl/ComponentControl.xhtml 2008-07-02
11:15:33 UTC (rev 9363)
@@ -1,16 +1,24 @@
-<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="componentControlSubviewID">
+<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="componentControlSubviewID">
<h:inputText value="test">
- <rich:componentControl name="controlMe" event="onclick"
attachTiming="onload" for="ccToltipID" operation="show"
/>
+ <rich:componentControl name="controlMe" event="onclick"
+ attachTiming="onload" for="ccToltipID" operation="show"
/>
</h:inputText>
<rich:panel>
- <rich:toolTip id="ccToltipID" followMouse="false"
direction="top-right" value="Help me, help!">
+ <rich:toolTip id="ccToltipID" followMouse="false"
+ direction="top-right" value="Help me, help!">
</rich:toolTip>
</rich:panel>
- <rich:modalPanel id="ccModalPanelID"
onshow="alert(event.parameters.show)"
onhide="alert(event.parameters.hide)">
+ <rich:modalPanel id="ccModalPanelID"
+ onshow="alert(event.parameters.show)"
+ onhide="alert(event.parameters.hide)">
<h:outputLink id="hideButton1ID" onclick="return false;"
value="#">
<f:verbatim>Close 1</f:verbatim>
</h:outputLink>
@@ -23,22 +31,27 @@
</rich:modalPanel>
<h:commandButton id="showButtonID" value="show ModalPanel">
- <rich:componentControl for="ccModalPanelID" event="onclick"
disableDefault="true" operation="show"
+ <rich:componentControl for="ccModalPanelID" event="onclick"
+ disableDefault="true" operation="show"
params="show:'componentControl work(show)'" />
</h:commandButton>
- <rich:componentControl attachTiming="onload" attachTo="hideButton1ID,
hideButton2ID" event="onclick" for="ccModalPanelID"
- operation="hide" params="hide:'componentControl
work(hide)'" />
+ <rich:componentControl attachTiming="onload"
+ attachTo="hideButton1ID, hideButton2ID" event="onclick"
+ for="ccModalPanelID" operation="hide"
+ params="hide:'componentControl work(hide)'" />
<f:verbatim>
<br />
<br />
</f:verbatim>
- <rich:calendar popup="#{componentControl.calendarPopup}"
id="ccCalendarID" />
+ <rich:calendar popup="#{componentControl.calendarPopup}"
+ id="ccCalendarID" />
<h:panelGrid columns="2">
<h:outputText value="popup calendar" />
- <h:selectBooleanCheckbox id="calendarSelectID"
value="#{componentControl.calendarPopup}" onchange="submit();" />
+ <h:selectBooleanCheckbox id="calendarSelectID"
+ value="#{componentControl.calendarPopup}" onchange="submit();"
/>
</h:panelGrid>
<f:verbatim>
@@ -55,16 +68,24 @@
<br />
<a href="#" id="doTodayCalendarID">Calendar
(today)</a>
<br />
- <a href="#" id="doTodayCalendarRenderedID">Calendar (today)
rendered="false"</a>
+ <a href="#" id="doTodayCalendarRenderedID">Calendar (today)
+ rendered="false"</a>
</f:verbatim>
- <rich:componentControl attachTo="doExpandCalendarID"
for="ccCalendarID" event="onclick" operation="doExpand"
/>
- <rich:componentControl attachTo="doNextYearCalendarID"
for="ccCalendarID" event="onclick" operation="nextYear"
/>
- <rich:componentControl attachTo="doPrevYearCalendarID"
for="ccCalendarID" event="onclick" operation="prevYear"
/>
- <rich:componentControl attachTo="doNextMonthCalendarID"
for="ccCalendarID" event="onclick" operation="nextMonth"
/>
- <rich:componentControl attachTo="doPrevMonthCalendarID"
for="ccCalendarID" event="onclick" operation="prevMonth"
/>
- <rich:componentControl attachTo="doTodayCalendarID"
for="ccCalendarID" event="onclick" operation="today" />
- <rich:componentControl attachTo="doTodayCalendarRenderedID"
for="ccCalendarID" rendered="false" event="onclick"
operation="today" />
+ <rich:componentControl id="componentID"
attachTo="doExpandCalendarID" for="ccCalendarID"
+ event="onclick" operation="doExpand" />
+ <rich:componentControl attachTo="doNextYearCalendarID"
+ for="ccCalendarID" event="onclick" operation="nextYear"
/>
+ <rich:componentControl attachTo="doPrevYearCalendarID"
+ for="ccCalendarID" event="onclick" operation="prevYear"
/>
+ <rich:componentControl attachTo="doNextMonthCalendarID"
+ for="ccCalendarID" event="onclick" operation="nextMonth"
/>
+ <rich:componentControl attachTo="doPrevMonthCalendarID"
+ for="ccCalendarID" event="onclick" operation="prevMonth"
/>
+ <rich:componentControl attachTo="doTodayCalendarID"
for="ccCalendarID"
+ event="onclick" operation="today" />
+ <rich:componentControl attachTo="doTodayCalendarRenderedID"
+ for="ccCalendarID" rendered="false" event="onclick"
operation="today" />
<f:verbatim>
<br />
@@ -75,7 +96,8 @@
<h:outputText value="click text" />
</rich:panelMenu>
- <rich:contextMenu id="ccContextMenuID" submitMode="ajax"
onexpand="alert(event.parameters.expand)">
+ <rich:contextMenu id="ccContextMenuID" submitMode="ajax"
+ onexpand="alert(event.parameters.expand)">
<rich:menuItem icon="/pics/header.png" value="tab1">
</rich:menuItem>
<rich:menuSeparator />
@@ -86,6 +108,18 @@
<rich:menuItem icon="/pics/info.gif" value="c">
</rich:menuItem>
</rich:contextMenu>
- <rich:componentControl event="oncontextmenu"
attachTo="ccContextMenuPanelMenuID" for="ccContextMenuID"
operation="show"
- params="expand:'show work'" />
+ <rich:componentControl event="oncontextmenu"
+ attachTo="ccContextMenuPanelMenuID" for="ccContextMenuID"
+ operation="show" params="expand:'show work'" />
+ <br />
+ <br />
+ <div style="FONT-WEIGHT: bold;">rich:findComponent</div>
+ <h:panelGrid columns="2">
+ <rich:column>
+ <a4j:commandLink value="getOperation"
reRender="findID"></a4j:commandLink>
+ </rich:column>
+ <rich:column id="findID">
+ <h:outputText
value="#{rich:findComponent('componentID').operation}" />
+ </rich:column>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file