Author: ilya_shaikovsky
Date: 2010-05-28 04:47:20 -0400 (Fri, 28 May 2010)
New Revision: 17341
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
Removed:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml
Modified:
root/examples/richfaces-showcase/trunk/pom.xml
root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
Log:
https://jira.jboss.org/browse/RF-8292
https://jira.jboss.org/browse/RF-8693
Modified: root/examples/richfaces-showcase/trunk/pom.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/pom.xml 2010-05-28 08:14:16 UTC (rev 17340)
+++ root/examples/richfaces-showcase/trunk/pom.xml 2010-05-28 08:47:20 UTC (rev 17341)
@@ -53,6 +53,11 @@
<artifactId>tables-ui</artifactId>
<version>4.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui-misc-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/resources/META-INF/a4j.taglib.xml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -417,6 +417,39 @@
</attribute>
</tag>
<tag>
+ <tag-name>param</tag-name>
+ <component>
+ <component-type>org.richfaces.UIParameter</component-type>
+ <renderer-type>org.richfaces.UIParameterRenderer</renderer-type>
+
<handler-class>org.richfaces.view.facelets.html.AbstractParameterHandler</handler-class>
+ </component>
+ <attribute>
+ <description>The value binding expression used to wire up this
component to a component property of a JavaBean class</description>
+ <name>binding</name>
+ <type>javax.faces.component.UIComponent</type>
+ </attribute>
+ <attribute>
+ <description>The component identifier for this component. This value
must be unique within the closest parent component that is a naming
container.</description>
+ <name>id</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Name of the parameter associated with this
component.</description>
+ <name>name</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Flag indicating whether or not this component should be
rendered (during Render Response Phase), or processed on any subsequent form submit. The
default value for this property is true.</description>
+ <name>rendered</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>Value of the parameter associated with this
component.</description>
+ <name>value</name>
+ <type>java.lang.Object</type>
+ </attribute>
+ </tag>
+ <tag>
<tag-name>status</tag-name>
<component>
<component-type>org.richfaces.Status</component-type>
@@ -735,6 +768,78 @@
</attribute>
</tag>
<tag>
+ <tag-name>poll</tag-name>
+ <component>
+ <component-type>org.richfaces.Poll</component-type>
+ <renderer-type>org.richfaces.PollRenderer</renderer-type>
+
<handler-class>org.richfaces.view.facelets.html.AjaxPollHandler</handler-class>
+ </component>
+ <attribute>
+ <description>MethodExpression representing the application action to
invoke when this component is activated by the user. The expression must evaluate to a
public method that takes no parameters, and returns an Object (the toString() of which is
called to derive the logical outcome) which is passed to the NavigationHandler for this
application.</description>
+ <name>action</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
+ <description>MethodExpression representing the application action to
invoke when this component is activated by the user. The expression must evaluate to a
public method that takes no parameters, and returns an Object (the toString() of which is
called to derive the logical outcome) which is passed to the NavigationHandler for this
application.</description>
+ <name>actionExpression</name>
+ <type>javax.el.MethodExpression</type>
+ </attribute>
+ <attribute>
+ <description><p> MethodExpression representing an action
listener method that will be notified when this component is activated by the user. The
expression must evaluate to a public method that takes an ActionEvent parameter, with a
return type of void, <span class="changed_added_2_0">or to a
public method that takes no arguments with a return type of void. In the latter case, the
method has no way of easily knowing where the event came from, but this can be useful in
cases where a notification is needed that "some action
happened".</span> </p></description>
+ <name>actionListener</name>
+ <type>javax.faces.el.MethodBinding</type>
+ </attribute>
+ <attribute>
+ <description>The value binding expression used to wire up this
component to a component property of a JavaBean class</description>
+ <name>binding</name>
+ <type>javax.faces.component.UIComponent</type>
+ </attribute>
+ <attribute>
+ <name>enabled</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>The component identifier for this component. This value
must be unique within the closest parent component that is a naming
container.</description>
+ <name>id</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Flag indicating that, if this component is activated by
the user, notifications should be delivered to interested listeners and actions
immediately (that is, during Apply Request Values phase) rather than waiting until Invoke
Application phase.</description>
+ <name>immediate</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <name>interval</name>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <name>onbeforedomupdate</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>onbegin</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>oncomplete</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>ontimer</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>Flag indicating whether or not this component should be
rendered (during Render Response Phase), or processed on any subsequent form submit. The
default value for this property is true.</description>
+ <name>rendered</name>
+ <type>boolean</type>
+ </attribute>
+ <attribute>
+ <description>The current value of this component.</description>
+ <name>value</name>
+ <type>java.lang.Object</type>
+ </attribute>
+ </tag>
+ <tag>
<tag-name>jsFunction</tag-name>
<component>
<component-type>org.richfaces.Function</component-type>
Modified:
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -239,8 +239,8 @@
<name>DataScroller Basic Usage</name>
</sample>
<sample>
- <id>dataScrollerCustomization</id>
- <name>DataScroller Customization</name>
+ <id>dataScrollerAPI</id>
+ <name>DataScroller API</name>
</sample>
</samples>
</demo>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/component-sample.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -17,8 +17,8 @@
<ui:repeat value="#{demoNavigator.currentDemo.samples}" var="s"
varStatus="status">
<h:link value="#{s.name}" includeViewParams="true">
<f:param name="sample" value="#{s.id}" />
+ <f:attribute name="style" value="#{(s.id ==
demoNavigator.currentSample.id) ? 'color:orange' : ''}"/>
</h:link>
- <h:outputText value="CUR" style="color:orange"
rendered="#{s.id == demoNavigator.currentSample.id}"/>
<h:outputText value=" | " />
</ui:repeat>
<fieldset><legend>#{demoNavigator.currentSample.name}</legend>
Copied:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
(from rev 17340,
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml)
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerAPI.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -0,0 +1,42 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:tbl="http://richfaces.org/rich"
+
xmlns:ds="http://richfaces.org/datascroller">
+
+<ui:composition>
+ <style>
+.calign {
+ text-align: center;
+}
+</style>
+<p>dataScroller provides cliens side API functions in order to provide control from
+your JavaScript custom handlers. List of api methods:</p>
+<ul style="font-style: italic">
+ <li>next</li>
+ <li>previous</li>
+ <li>first</li>
+ <li>last</li>
+</ul>
+<p>This simple sample shows how the scroller could be controlled via API from
external controls(arrows images)</p>
+ <h:form id="form">
+ <h:panelGrid columns="1" rowClasses="calign">
+ <h:panelGrid columns="3" id="repeat">
+ <h:graphicImage value="/images/icons/scroller/arr_left.png"
+ onclick="document.getElementById('form:ds').richfaces.component.previous()"
/>
+ <a4j:repeat rows="3" value="#{slidesBean.pictures}"
var="pic"
+ id="pics">
+ <h:graphicImage value="#{pic.uri}" style="padding:5px;"/>
+ </a4j:repeat>
+ <h:graphicImage value="/images/icons/scroller/arr_right.png"
+ onclick="document.getElementById('form:ds').richfaces.component.next()"
/>
+ </h:panelGrid>
+ <ds:dataScroller for="pics" id="ds" render="repeat"
stepControls="false" boundaryControls="false"
fastControls="false" maxPages="10"/>
+ </h:panelGrid>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Deleted:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataScroller/dataScrollerCustomization.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -1,33 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:tbl="http://richfaces.org/rich"
-
xmlns:ds="http://richfaces.org/datascroller">
-
-<ui:composition>
- <style>
-.calign {
- text-align: center;
-}
-</style>
- <h:form id="form">
- <h:panelGrid columns="1" rowClasses="calign">
- <h:panelGrid columns="3" id="repeat">
- <h:graphicImage value="/images/icons/scroller/arr_left.png"
- onclick="document.getElementById('form:ds').richfaces.component.previous()"
/>
- <a4j:repeat rows="3" value="#{slidesBean.pictures}"
var="pic"
- id="pics">
- <h:graphicImage value="#{pic.uri}" style="padding:5px;"/>
- </a4j:repeat>
- <h:graphicImage value="/images/icons/scroller/arr_right.png"
- onclick="document.getElementById('form:ds').richfaces.component.next()"
/>
- </h:panelGrid>
- <ds:dataScroller for="pics" id="ds" render="repeat"
stepControls="false" boundaryControls="false"
fastControls="false" maxPages="10"/>
- </h:panelGrid>
- </h:form>
-</ui:composition>
-
-</html>
\ No newline at end of file
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/poll/poll.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition>
<p>a4j:poll is one of the way how you can organize the periodical
@@ -18,9 +18,12 @@
<p>The following example shows how the date and time is updated on
the page based on the data taken from the server. To turn off polling,
press "Stop Polling" button.</p>
+
<h:form>
+ <a4j:poll id="poll" interval="1500"
enabled="#{pollBean.pollEnabled}"
+ render="poll,grid" />
+ </h:form>
- </h:form>
<h:form>
<h:panelGrid columns="2" width="80%" id="grid">
<h:panelGrid columns="1">
@@ -33,8 +36,9 @@
<a4j:commandButton style="width:120px" id="control"
value="#{pollBean.pollEnabled?'Stop':'Start'} Polling"
- reRender="poll, grid">
-
+ render="poll, grid">
+ <a4j:param name="polling" value="#{!pollBean.pollEnabled}"
+ assignTo="#{pollBean.pollEnabled}" />
</a4j:commandButton>
</h:panelGrid>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/navigation.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -18,10 +18,10 @@
<a4j:repeat value="#{gr.demos}" var="d">
<li>
<h:link outcome="/richfaces/component-sample.xhtml"
value="#{d.name}" includeViewParams="false">
+ <f:attribute name="style" value="#{(d.id ==
demoNavigator.currentDemo.id) ? 'color:orange' : ''}"/>
<f:param name="demo" value="#{d.id}"/>
</h:link>
<h:outputText value="NEW!" rendered="#{d.newItem or
gr.newItem}" style="color:red"/>
- <h:outputText value="CUR!" rendered="#{d.id ==
demoNavigator.currentDemo.id}" style="color:orange"/>
</li>
</a4j:repeat>
</ul>
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-28
08:14:16 UTC (rev 17340)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/includes/skin-chooser.xhtml 2010-05-28
08:47:20 UTC (rev 17341)
@@ -11,9 +11,9 @@
<a4j:repeat var="skin" value="#{skinBean.skins}">
<h:link value="#{skin}" includeViewParams="true">
<f:param name="skin" value="#{skin}"/>
+ <f:attribute name="style" value="#{(skin==skinBean.skin) ?
'color:orange' : ''}"/>
</h:link>
- <h:outputText value="CUR!" rendered="#{skin==skinBean.skin}"
style="color:orange"/>
- <h:outputText value = " | "/>
+ <h:outputText value = " | "/>
</a4j:repeat>
</rich:panel>
</ui:composition>