Author: ilya_shaikovsky
Date: 2007-12-06 07:18:31 -0500 (Thu, 06 Dec 2007)
New Revision: 4547
Modified:
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml
Log:
Component control and context menu demos updated
Modified:
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml
===================================================================
---
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml 2007-12-06
12:18:01 UTC (rev 4546)
+++
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml 2007-12-06
12:18:31 UTC (rev 4547)
@@ -11,7 +11,7 @@
</style>
<h:form id="form">
- <rich:contextMenu attached="false" id="menu">
+ <rich:contextMenu attached="false" id="menu"
submitMode="none">
<rich:menuItem>
<b>{car} {model}</b> details
</rich:menuItem>
Modified:
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml
===================================================================
---
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml 2007-12-06
12:18:01 UTC (rev 4546)
+++
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml 2007-12-06
12:18:31 UTC (rev 4547)
@@ -13,21 +13,38 @@
with their client side JS API.
</p>
<p>
- In this simple example Component Control components attached to links and just calls
"show" and "hide"
- functions on Modal Panel.
+ In this simple example <b>componentControl</b> components used to open and
close modal panel.
+ The component attached to links and just calls "show" and "hide"
functions on Modal Panel.
</p>
<ui:include src="/richfaces/componentControl/examples/mpusage.xhtml"
/>
<rich:separator/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath"
value="/richfaces/componentControl/examples/mpusage.xhtml"/>
</ui:include>
-
<p>
- Another usefull feature - that Component Control component allows to transfer
+ <b>Main component attributes:</b>
+ <ul>
+ <li><b>for</b> - specifies client identifier of the target
component.</li>
+ <li><b>attachTo</b> - specifies client identifier of the component
or id of the existing DOM element that is a source
+ for given event. If <b>attachTo</b> is not defined, the event is
attached on the server to the closest in the
+ component tree parent component.</li>
+ <li><b>event</b> - The event that is used to trigger the
<b>operation</b> on the target component </li>
+ <li><b>operation</b> - name of the javascript function that will be
invoked on target component. The API method
+ is attached to the 'component' property of the root DOM element that
represents
+ the target component. The function has two parameters - <b>event</b> and
<b>params</b>.</li>
+ <li><b>params</b> -The set of parameters passed to the function of
Javascript API that will be invoked.
+ The JSON syntax is used to define the parameters, but without open and closed curve
+ bracket.
+ As an alternative, the set of f:param can be used to define the parameters passed to
the
+ API function. </li>
+ </ul>
+ </p>
+ <p>
+ So, one of the main features - that Component Control component allows to transfer
parameters to managed components.
</p>
<p>
- You may put <b>f:param</b> components as nested to component control
component
+ You may put <b>f:param</b> components as nested to component control
component (instead of <b>params</b> attribute usage)
and all the parameters that defined will be available from target component.
</p>
<p>
@@ -44,5 +61,5 @@
<rich:separator/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath"
value="/richfaces/componentControl/examples/cmenuusage.xhtml"/>
- </ui:include>
+ </ui:include>
</ui:composition>
\ No newline at end of file
Show replies by date