Author: nbelaevski
Date: 2007-12-05 21:03:12 -0500 (Wed, 05 Dec 2007)
New Revision: 4527
Modified:
branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
Log:
onorderchanged event handler updated
Modified: branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-12-06
02:03:08 UTC (rev 4526)
+++ branches/3.1.x/samples/orderingListDemo/src/main/webapp/pages/index.jsp 2007-12-06
02:03:12 UTC (rev 4527)
@@ -54,7 +54,7 @@
ontopclick="#{demoBean.ontopclick}"
onbottomclick="#{demoBean.onbottomclick}"
- onorderchanged="new Effect.Highlight('form:onorderchangedDiv',
{startcolor:'#FF0000', endcolor:'#FF0000', restorecolor:
'green'});"
+ onorderchanged="orderChanged(event); new
Effect.Highlight('form:onorderchangedDiv', {startcolor:'#FF0000',
endcolor:'#FF0000', restorecolor: 'green'});"
ondownclick="new Effect.Highlight('form:ondownclickDiv',
{startcolor:'#FF0000', endcolor:'#FF0000', restorecolor:
'green'});"
onheaderclick="new Effect.Highlight('form:onheaderclickDiv',
{startcolor:'#FF0000', endcolor:'#FF0000', restorecolor:
'green'});"
onupclick="new Effect.Highlight('form:onupclickDiv',
{startcolor:'#FF0000', endcolor:'#FF0000', restorecolor:
'green'});" >
@@ -184,6 +184,19 @@
<h:commandButton value="Add item" action="#{demoBean.addItem}"
/>
<h:commandButton value="Submit" />
<h:commandButton value="Submit immediate" immediate="true"
/>
+
+ <f:verbatim>
+ <div id="cdiv" style="width: 600px; height: 200px; overflow:
auto;"></div>
+
+ <script>
+ function orderChanged(event) {
+ var cdiv = $('cdiv');
+ Element.clearChildren(cdiv);
+ cdiv.appendChild(document.createTextNode(Object.inspect($H(event))));
+ }
+ </script>
+ </f:verbatim>
+
<h3>Ordering lists within a4j:repeat</h3>
<a4j:commandButton reRender="repeat" value="Rerender
a4j:repeat" />
<h:commandButton value="Clear list"
action="#{demoBean.clear}"></h:commandButton>
Show replies by date