JBoss Rich Faces SVN: r17418 - root/examples/iteration-demo/trunk/src/main/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-31 10:56:46 -0400 (Mon, 31 May 2010)
New Revision: 17418
Modified:
root/examples/iteration-demo/trunk/src/main/webapp/dataTable.xhtml
Log:
remove subTables
Modified: root/examples/iteration-demo/trunk/src/main/webapp/dataTable.xhtml
===================================================================
--- root/examples/iteration-demo/trunk/src/main/webapp/dataTable.xhtml 2010-05-31 14:53:14 UTC (rev 17417)
+++ root/examples/iteration-demo/trunk/src/main/webapp/dataTable.xhtml 2010-05-31 14:56:46 UTC (rev 17418)
@@ -15,7 +15,7 @@
<h:form id="form1">
<it:dataScroller id="scroller1" for="richTable"
page="#{dataBean.page}" maxPages="7"></it:dataScroller>
-
+
<it:dataTable keepSaved="true" id="richTable" var="record"
rowKeyVar="rowKey" value="#{dataBean.employeeList}" rows="20"
sortMode="single">
@@ -33,12 +33,9 @@
<h:outputText id="columnHeader1" value="Column Header Facet" />
</f:facet>
- <it:toggleControl for="expandedSubTable"
- expandControl="resources/images/+.gif"
- collapseControl="resources/images/-.gif">
+ <!-- it:subTableToggleControl for="expandedSubTable">
+ </it:subTableToggleControl -->
- </it:toggleControl>
-
<h:outputText value="#{record.name}" />
<f:facet name="footer">
<h:outputText id="columnFooter1" value="Column Footer Facet 1" />
@@ -59,7 +56,7 @@
<h:outputText value="#{record.EMail}" />
</it:column>
- <it:subTable id="expandedSubTable" var="company"
+ <!-- it:subTable id="expandedSubTable" var="company"
value="#{record.companies}" rows="1" switchType="ajax"
expanded="true">
<f:facet name="header">
@@ -82,7 +79,7 @@
<it:column id="column_company_phone">
<h:outputText value="#{company.phone}" />
</it:column>
- </it:subTable>
+ </it:subTable -->
<f:facet name="footer">
<it:dataScroller id="scroller3" for="richTable"
@@ -90,6 +87,8 @@
</f:facet>
</it:dataTable>
+
+
<br />
14 years, 6 months
JBoss Rich Faces SVN: r17417 - in root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces: componentControl and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-31 10:53:14 -0400 (Mon, 31 May 2010)
New Revision: 17417
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml
Log:
attachQueue correction
componentControl sample
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml 2010-05-31 14:30:43 UTC (rev 17416)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/attachQueue/attachQueue.xhtml 2010-05-31 14:53:14 UTC (rev 17417)
@@ -12,17 +12,20 @@
request delay from 500ms to 1500ms.
</p>
-<a4j:queue name="buttons_queue" requestDelay="500"></a4j:queue>
+<p>If you will click the buttons fast - requests will be combined and only last click will
+be processed</p>
+
+<a4j:queue requestDelay="500"></a4j:queue>
<h:form>
<rich:panel>
<h:panelGrid columns="2">
<a4j:commandButton value="Set Name to Alex" render="rep">
- <a4j:attachQueue queueName="buttons_queue" requestGroupingId="group1"/>
+ <a4j:attachQueue requestGroupingId="group1"/>
<a4j:param name="username" value="Alex" assignTo="#{userBean.name}" />
</a4j:commandButton>
<a4j:commandButton value="Set Name to John" render="rep">
- <a4j:attachQueue queueName="buttons_queue" requestGroupingId="group1" requestDelay="1500"/>
+ <a4j:attachQueue requestGroupingId="group1" requestDelay="1500"/>
<a4j:param name="username" value="John"
assignTo="#{userBean.name}" />
</a4j:commandButton>
@@ -33,6 +36,5 @@
<h:outputText id="rep" value="Selected Name:#{userBean.name}" />
</rich:panel>
</h:form>
- <a4j:log/>
</ui:composition>
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml 2010-05-31 14:30:43 UTC (rev 17416)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml 2010-05-31 14:53:14 UTC (rev 17417)
@@ -10,6 +10,7 @@
xmlns:rfn="http://richfaces.org/misc">
<ui:composition>
+
<h:form id="form">
<h:panelGrid columns="2">
<rich:panel>
@@ -20,7 +21,7 @@
<ul>
<a4j:repeat value="#{carsBean.allVendors}" var="vendor">
<li><h:outputLink value="#">#{vendor}
- <rfn:componentControl target="table" operation="filter" event="click">
+ <rfn:componentControl target="#{rfn:clientId('table')}" operation="filter" event="click">
<f:param value="vendor"/>
<f:param value="#{vendor}"/>
</rfn:componentControl>
14 years, 6 months
JBoss Rich Faces SVN: r17416 - root/ui/misc/trunk/componentcontrol/src/main/resources/META-INF/resources/script.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-31 10:30:43 -0400 (Mon, 31 May 2010)
New Revision: 17416
Modified:
root/ui/misc/trunk/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js
Log:
fix richfaces.ui
Modified: root/ui/misc/trunk/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js
===================================================================
--- root/ui/misc/trunk/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js 2010-05-31 14:29:27 UTC (rev 17415)
+++ root/ui/misc/trunk/componentcontrol/src/main/resources/META-INF/resources/script/component-control.js 2010-05-31 14:30:43 UTC (rev 17416)
@@ -1,6 +1,7 @@
(function ($, richfaces) {
- richfaces = richfaces || {};
+ richfaces.ui = richfaces.ui || {};
+
richfaces.ui.ComponentControl = richfaces.ui.ComponentControl || {};
$.extend(richfaces.ui.ComponentControl, {
14 years, 6 months
JBoss Rich Faces SVN: r17415 - in root/ui/iteration/trunk/datascroller/ui/src/main: java/org/richfaces/taglib and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-05-31 10:29:27 -0400 (Mon, 31 May 2010)
New Revision: 17415
Added:
root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java
Modified:
root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java
root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java
root/ui/iteration/trunk/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
Log:
fix scrollListener, fix RF-8705
Modified: root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java
===================================================================
--- root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java 2010-05-31 14:28:31 UTC (rev 17414)
+++ root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/component/UIDataScroller.java 2010-05-31 14:29:27 UTC (rev 17415)
@@ -26,7 +26,6 @@
import java.util.Map;
import javax.el.ELException;
-import javax.el.MethodExpression;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.FacesMessage;
@@ -139,7 +138,7 @@
}
public void broadcast(FacesEvent event) throws AbortProcessingException {
- super.broadcast(event);
+
if (event instanceof DataScrollerEvent) {
DataScrollerEvent dataScrollerEvent = (DataScrollerEvent) event;
@@ -148,11 +147,6 @@
FacesContext facesContext = getFacesContext();
- MethodExpression scrollerListener = (MethodExpression) getStateHelper().eval(PropertyKeys.scrollerListener);
- if (scrollerListener != null) {
- scrollerListener.invoke(facesContext.getELContext(), new Object[] {event });
- }
-
UIComponent dataTable = getDataTable();
List<UIDataScroller> dataScrollers = DataScrollerUtils.findDataScrollers(dataTable);
@@ -170,7 +164,16 @@
}
facesContext.getPartialViewContext().getRenderIds().add(dataTableId);
+
+ //add datascroller to render
+ String dataScrollerId = getClientId(facesContext);
+ if(!facesContext.getPartialViewContext().getRenderIds().contains(dataScrollerId)) {
+ facesContext.getPartialViewContext().getRenderIds().add(dataScrollerId);
+ }
+
}
+
+ super.broadcast(event);
}
/**
Modified: root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java
===================================================================
--- root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java 2010-05-31 14:28:31 UTC (rev 17414)
+++ root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/DatascrollerTagHandler.java 2010-05-31 14:29:27 UTC (rev 17415)
@@ -52,9 +52,40 @@
return null;
}
}
+ };
+ private static final MetaRule SCROLL_LISTENER_RULE = new MetaRule() {
+
+ @Override
+ public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIDataScroller.class)) {
+ if ("scrollListener".equals(name)) {
+ return new ScrollListenerMapper(attribute);
+ }
+ }
+ return null;
+ }
+
};
+ private static final class ScrollListenerMapper extends Metadata {
+
+ private static final Class[] SIGNATURE = new Class[] { org.richfaces.event.DataScrollerEvent.class };
+
+ private final TagAttribute attribute;
+
+ public ScrollListenerMapper(TagAttribute attribute) {
+ this.attribute = attribute;
+ }
+
+ @Override
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+
+ ((UIDataScroller) instance).addScrollerListener((new MethodExpressionScrollListener(this.attribute
+ .getMethodExpression(ctx, null, SIGNATURE))));
+ }
+ }
+
private static final class PageMapper extends Metadata {
private final TagAttribute page;
@@ -65,6 +96,7 @@
public void applyMetadata(FaceletContext ctx, Object instance) {
UIDataScroller datascroller = (UIDataScroller) instance;
+
ValueExpression ve = page.getValueExpression(ctx, int.class);
if (ve.isLiteralText()) {
Integer value = (Integer) ve.getValue(ctx.getFacesContext().getELContext());
@@ -83,6 +115,7 @@
protected MetaRuleset createMetaRuleset(Class type) {
MetaRuleset ruleset = super.createMetaRuleset(type);
ruleset.addRule(PAGERULE);
+ ruleset.addRule(SCROLL_LISTENER_RULE);
return ruleset;
}
}
Added: root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java
===================================================================
--- root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java (rev 0)
+++ root/ui/iteration/trunk/datascroller/ui/src/main/java/org/richfaces/taglib/MethodExpressionScrollListener.java 2010-05-31 14:29:27 UTC (rev 17415)
@@ -0,0 +1,30 @@
+package org.richfaces.taglib;
+
+import javax.el.MethodExpression;
+import javax.faces.context.FacesContext;
+
+import org.richfaces.event.DataScrollerEvent;
+import org.richfaces.event.DataScrollerListener;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class MethodExpressionScrollListener implements DataScrollerListener {
+
+ private MethodExpression methodExpression;
+
+ public MethodExpressionScrollListener() {
+ super();
+ }
+
+ MethodExpressionScrollListener(MethodExpression methodExpression) {
+ super();
+ this.methodExpression = methodExpression;
+ }
+
+ public void processScroller(DataScrollerEvent dataScrollerEvent) {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ methodExpression.invoke(facesContext.getELContext(), new Object[] { dataScrollerEvent });
+ }
+}
Modified: root/ui/iteration/trunk/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml
===================================================================
--- root/ui/iteration/trunk/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-05-31 14:28:31 UTC (rev 17414)
+++ root/ui/iteration/trunk/datascroller/ui/src/main/resources/META-INF/datascroller.taglib.xml 2010-05-31 14:29:27 UTC (rev 17415)
@@ -9,6 +9,7 @@
<component>
<component-type>org.richfaces.DataScroller</component-type>
<renderer-type>org.richfaces.DataScrollerRenderer</renderer-type>
+ <handler-class>org.richfaces.taglib.DatascrollerTagHandler</handler-class>
</component>
</tag>
</facelet-taglib>
14 years, 6 months
JBoss Rich Faces SVN: r17414 - root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-31 10:28:31 -0400 (Mon, 31 May 2010)
New Revision: 17414
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml
Log:
queue ignoreDupResponce now not present - removing from options form
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml 2010-05-31 14:25:51 UTC (rev 17413)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/queue/queue.xhtml 2010-05-31 14:28:31 UTC (rev 17414)
@@ -18,17 +18,14 @@
influence Ajax requests. This example is a good start to learn about Ajax requests
flood protection.</p>
-<p>Pay attention to next points in the example:</p>
+<p>Pay attention to next point in the example:</p>
<ul>
-<li>Setting ignoreDupResponces to true reduces the count of DOM updates on typing inside the input. (in initial state count of updates is equals to count of requests)</li>
<li>Setting request delay to greater value reduces the greatly requests count on fast typing. (More similar requests are combined in the result)</li>
</ul>
Also pay your attention to the queue definition. Such definition (inside some form without a name) means that the queue options becomes global for the form.
<rich:panel>
<h:form id="form">
- <a4j:queue requestDelay="#{queueBean.requestDelay}"
- ignoreDupResponses="#{queueBean.ignoreDupResponces}"
- />
+ <a4j:queue requestDelay="#{queueBean.requestDelay}"/>
<h:panelGrid columns="1" width="100%">
<h:panelGrid columns="2">
<h:outputText value="Type here:" />
@@ -54,8 +51,6 @@
converterMessage="Delay field should be a number (Demo input disabled till this resolved)">
<f:convertNumber integerOnly="true"/>
</h:inputText>
- <h:outputText value="Ignore Duplicated Responces" />
- <h:selectBooleanCheckbox value="#{queueBean.ignoreDupResponces}" />
<f:facet name="footer">
<h:commandButton value="Apply" action="#{queueBean.resetText}" />
</f:facet>
14 years, 6 months
JBoss Rich Faces SVN: r17413 - root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-31 10:25:51 -0400 (Mon, 31 May 2010)
New Revision: 17413
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
Log:
label added
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml 2010-05-31 14:20:49 UTC (rev 17412)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/extendedDataTable/simpleTable.xhtml 2010-05-31 14:25:51 UTC (rev 17413)
@@ -7,6 +7,13 @@
xmlns:it="http://richfaces.org/iteration">
<ui:composition>
+<p>ExtendedDataTable component provides next set of features:</p>
+<ul>
+ <li> Horizontal/Vertical scrolling </li>
+ <li> Ajax lazy loading on vertical scroll </li>
+ <li> Support "frozen" columns which are not scrolled on using horizontal scroll</li>
+</ul>
+
<h:form>
<it:extendedDataTable value="#{carsBean.allInventoryItems}" var="car"
id="table" frozenColumns="2" style="height:300px; width:500px;" rowClasses="qwe, qe">
@@ -56,7 +63,6 @@
<h:outputText value="#{car.daysLive}" />
</it:column>
</it:extendedDataTable>
- <a4j:commandButton value="render" render="table" />
</h:form>
</ui:composition>
14 years, 6 months
JBoss Rich Faces SVN: r17412 - root/dist/trunk.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-05-31 10:20:49 -0400 (Mon, 31 May 2010)
New Revision: 17412
Modified:
root/dist/trunk/richfaces.xml
Log:
add examples to root assembler
Modified: root/dist/trunk/richfaces.xml
===================================================================
--- root/dist/trunk/richfaces.xml 2010-05-31 14:15:00 UTC (rev 17411)
+++ root/dist/trunk/richfaces.xml 2010-05-31 14:20:49 UTC (rev 17412)
@@ -78,34 +78,28 @@
<directory>target/dependency/richfaces-components-ui-jsdoc-java-source</directory>
<outputDirectory>docs/jsdoc/richfaces-components-ui/</outputDirectory>
</fileSet>
+
+ <!-- Examples -->
+ <fileSet>
+ <directory>target/dependency/core-demo-sources-java-source</directory>
+ <outputDirectory>examples/core-demo/</outputDirectory>
+ <excludes>
+ <exclude>/META-INF/**</exclude>
+ </excludes>
+ </fileSet>
+ <fileSet>
+ <directory>target/dependency/richfaces-showcase-sources-java-source</directory>
+ <outputDirectory>examples/richfaces-showcase/</outputDirectory>
+ <excludes>
+ <exclude>/META-INF/**</exclude>
+ </excludes>
+ </fileSet>
</fileSets>
<moduleSets>
<moduleSet>
<includeSubModules>true</includeSubModules>
<includes>
- <include>org.richfaces.examples:core-demo</include>
- <include>org.richfaces.examples:richfaces-showcase</include>
- </includes>
-
- <sources>
- <outputDirectoryMapping>examples/${module.artifactId}</outputDirectoryMapping>
- <excludeSubModuleDirectories>false</excludeSubModuleDirectories>
- <fileSets>
- <fileSet>
- <includes>
- <include>src/**</include>
- <include>readme.txt</include>
- <include>pom.xml</include>
- </includes>
- </fileSet>
- </fileSets>
- </sources>
- </moduleSet>
-
- <moduleSet>
- <includeSubModules>true</includeSubModules>
- <includes>
<include>org.richfaces.archetypes:*</include>
</includes>
14 years, 6 months
JBoss Rich Faces SVN: r17411 - in root: examples and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-05-31 10:15:00 -0400 (Mon, 31 May 2010)
New Revision: 17411
Added:
root/examples/core-demo/trunk/assembler.xml
root/examples/richfaces-showcase/trunk/assembler.xml
root/examples/richfaces-showcase/trunk/readme.txt
Modified:
root/dist/trunk/pom.xml
root/examples/core-demo/trunk/pom.xml
root/examples/pom.xml
root/examples/richfaces-showcase/trunk/pom.xml
Log:
root assembler
Modified: root/dist/trunk/pom.xml
===================================================================
--- root/dist/trunk/pom.xml 2010-05-31 13:50:23 UTC (rev 17410)
+++ root/dist/trunk/pom.xml 2010-05-31 14:15:00 UTC (rev 17411)
@@ -38,7 +38,7 @@
<modules>
<!--<module>../../build/parent/tags/richfaces-parent-3</module>-->
<!--<module>../../build/bom/trunk</module>-->
- <module>../../archetypes</module>
+ <!--<module>../../archetypes</module>-->
<!--<module>../../commons/trunk</module>-->
<!--<module>../../core/trunk</module>-->
@@ -47,7 +47,7 @@
<!--<module>../../ui/dist/trunk</module>-->
<!-- for build examples we need some components from sandbox -->
- <module>../../examples</module>
+ <!--<module>../../examples</module>-->
</modules>
<dependencies>
@@ -158,7 +158,6 @@
</configuration>
</execution>
-<!--
<execution>
<id>copy-examples</id>
<goals>
@@ -166,13 +165,14 @@
</goals>
<phase>package</phase>
<configuration>
+ <classifier>sources</classifier>
+
<includeGroupIds>org.richfaces.examples</includeGroupIds>
<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
<useSubDirectoryPerArtifact>true</useSubDirectoryPerArtifact>
<stripVersion>true</stripVersion>
</configuration>
</execution>
--->
</executions>
</plugin>
Added: root/examples/core-demo/trunk/assembler.xml
===================================================================
--- root/examples/core-demo/trunk/assembler.xml (rev 0)
+++ root/examples/core-demo/trunk/assembler.xml 2010-05-31 14:15:00 UTC (rev 17411)
@@ -0,0 +1,22 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <files>
+ <file>
+ <source>pom.xml</source>
+ </file>
+ <file>
+ <source>readme.txt</source>
+ </file>
+ </files>
+
+ <fileSets>
+ <fileSet>
+ <directory>src</directory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Modified: root/examples/core-demo/trunk/pom.xml
===================================================================
--- root/examples/core-demo/trunk/pom.xml 2010-05-31 13:50:23 UTC (rev 17410)
+++ root/examples/core-demo/trunk/pom.xml 2010-05-31 14:15:00 UTC (rev 17411)
@@ -54,4 +54,46 @@
<scope>provided</scope>
</dependency>
</dependencies>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>sources</finalName>
+ <descriptor>assembler.xml</descriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classesDirectory>${basedir}/target/sources/sources</classesDirectory>
+ <classifier>sources</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project>
\ No newline at end of file
Modified: root/examples/pom.xml
===================================================================
--- root/examples/pom.xml 2010-05-31 13:50:23 UTC (rev 17410)
+++ root/examples/pom.xml 2010-05-31 14:15:00 UTC (rev 17411)
@@ -40,7 +40,7 @@
<module>misc-demo/trunk</module>
<module>repeater-demo/trunk</module>
<module>iteration-demo/trunk</module>
- <!--<module>richfaces-showcase/trunk</module>-->
+ <module>richfaces-showcase/trunk</module>
<!--<module>dist/trunk</module>-->
</modules>
@@ -118,12 +118,6 @@
<profiles>
<profile>
- <id>sandbox</id>
- <modules>
- <module>richfaces-showcase/trunk</module>
- </modules>
- </profile>
- <profile>
<id>jee5</id>
<dependencies>
<dependency>
Added: root/examples/richfaces-showcase/trunk/assembler.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/assembler.xml (rev 0)
+++ root/examples/richfaces-showcase/trunk/assembler.xml 2010-05-31 14:15:00 UTC (rev 17411)
@@ -0,0 +1,22 @@
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>dir</format>
+ </formats>
+
+ <files>
+ <file>
+ <source>pom.xml</source>
+ </file>
+ <file>
+ <source>readme.txt</source>
+ </file>
+ </files>
+
+ <fileSets>
+ <fileSet>
+ <directory>src</directory>
+ </fileSet>
+ </fileSets>
+</assembly>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/pom.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/pom.xml 2010-05-31 13:50:23 UTC (rev 17410)
+++ root/examples/richfaces-showcase/trunk/pom.xml 2010-05-31 14:15:00 UTC (rev 17411)
@@ -93,7 +93,41 @@
<classifier>tomcat6</classifier>
</configuration>
</plugin>
+
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>group-sources</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <finalName>sources</finalName>
+ <descriptor>assembler.xml</descriptor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <classesDirectory>${basedir}/target/sources/sources</classesDirectory>
+ <classifier>sources</classifier>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
+
+
</build>
</profile>
<profile>
Added: root/examples/richfaces-showcase/trunk/readme.txt
===================================================================
14 years, 6 months
JBoss Rich Faces SVN: r17410 - in root/examples/richfaces-showcase/trunk/src/main: resources/org/richfaces/demo/data/common and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2010-05-31 09:50:23 -0400 (Mon, 31 May 2010)
New Revision: 17410
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/repeat/
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/repeat/simpleGrid.xhtml
Removed:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java
root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml
Log:
table filtering/sorting + componentControl
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java 2010-05-31 13:43:16 UTC (rev 17409)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java 2010-05-31 13:50:23 UTC (rev 17410)
@@ -13,7 +13,6 @@
import java.util.List;
import javax.faces.bean.ManagedBean;
-import javax.faces.bean.ManagedProperty;
import javax.faces.bean.SessionScoped;
import javax.faces.model.SelectItem;
@@ -33,8 +32,6 @@
private static final int ROUNDING_MODE = BigDecimal.ROUND_HALF_UP;
private List<InventoryItem> allInventoryItems = null;
private List<InventoryVendorList> inventoryVendorLists = null;
- @ManagedProperty("#{carsFilteringBean}")
- private CarsFilteringBean filteringBean;
public List<SelectItem> getVendorOptions() {
List<SelectItem> result = new ArrayList<SelectItem>();
@@ -61,10 +58,7 @@
Collections.sort(inventoryItems, new Comparator<InventoryItem>() {
public int compare(InventoryItem o1, InventoryItem o2) {
- if (o1.getVendor().equals(o2.getVendor())) {
- return 0;
- }
- return 1;
+ return o1.getVendor().compareTo(o2.getVendor());
}
});
Iterator<InventoryItem> iterator = inventoryItems.iterator();
@@ -199,8 +193,4 @@
return iiList;
}
-
- public void setFilteringBean(CarsFilteringBean filteringBean) {
- this.filteringBean = filteringBean;
- }
}
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-31 13:43:16 UTC (rev 17409)
+++ root/examples/richfaces-showcase/trunk/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2010-05-31 13:50:23 UTC (rev 17410)
@@ -192,6 +192,16 @@
<name>Data Iteration</name>
<demos>
<demo>
+ <id>repeat</id>
+ <name>a4j:repeat</name>
+ <samples>
+ <sample>
+ <id>simpleGrid</id>
+ <name>Simple Grid Creation</name>
+ </sample>
+ </samples>
+ </demo>
+ <demo>
<id>dataTable</id>
<name>rich:dataTable</name>
<samples>
@@ -222,10 +232,6 @@
<id>tableFiltering</id>
<name>Data Table Filtering</name>
</sample>
- <sample>
- <id>tableFilteringAPI</id>
- <name>Data Table Filtering API usage</name>
- </sample>
</samples>
</demo>
<demo>
@@ -287,6 +293,16 @@
</sample>
</samples>
</demo>
+ <demo>
+ <id>componentControl</id>
+ <name>rich:componentControl</name>
+ <samples>
+ <sample>
+ <id>tableFilteringAPI</id>
+ <name>Table Filtering using componentControl and API</name>
+ </sample>
+ </samples>
+ </demo>
</demos>
</group>
</root>
Copied: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml (from rev 17400, root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml)
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/componentControl/tableFilteringAPI.xhtml 2010-05-31 13:50:23 UTC (rev 17410)
@@ -0,0 +1,85 @@
+<!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:it="http://richfaces.org/iteration"
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich"
+ xmlns:rfn="http://richfaces.org/misc">
+
+<ui:composition>
+ <h:form id="form">
+ <h:panelGrid columns="2">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Quick Filter Panel" />
+ </f:facet>
+ <fieldset><legend>Filter By Vendor</legend>
+ <ul>
+ <a4j:repeat value="#{carsBean.allVendors}" var="vendor">
+ <li><h:outputLink value="#">#{vendor}
+ <rfn:componentControl target="table" operation="filter" event="click">
+ <f:param value="vendor"/>
+ <f:param value="#{vendor}"/>
+ </rfn:componentControl>
+ </h:outputLink>
+ </li>
+ </a4j:repeat>
+ </ul>
+ </fieldset>
+ </rich:panel>
+ <it:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="20">
+ <it:column id="vendor" filterValue="#{carsFilteringBean.vendorFilter}"
+ filterExpression="#{carsFilteringBean.vendorFilter == '' or carsFilteringBean.vendorFilter == null or carsFilteringBean.vendorFilter == car.vendor}">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Vendor" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vendor}" />
+ </it:column>
+ <it:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}" />
+ </it:column>
+ <it:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </it:column>
+ <it:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Mileage" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.mileage}" />
+ </it:column>
+ <it:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Days Live" />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.daysLive}" />
+ </it:column>
+ <it:column>
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="VIN " />
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </it:column>
+ </it:dataTable>
+ </h:panelGrid>
+
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml 2010-05-31 13:43:16 UTC (rev 17409)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFiltering.xhtml 2010-05-31 13:50:23 UTC (rev 17410)
@@ -5,19 +5,24 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:it="http://richfaces.org/iteration"
- xmlns:fn="http://java.sun.com/jsp/jstl/functions">
+ xmlns:fn="http://java.sun.com/jsp/jstl/functions"
+ xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition>
<h:form id="form">
- <it:dataTable value="#{carsBean.allInventoryItems}" var="car"
- id="table" rows="20">
- <it:column accept="#{carsFiteringBean.acceptVendor}">
- <f:facet name="header">
+ <rich:messages/>
+ <it:dataTable value="#{carsBean.allInventoryItems}" var="car"
+ id="table" rows="30">
+ <f:facet name="noData">
+ Nothing found
+ </f:facet>
+ <it:column filterValue="#{carsFilteringBean.vendorFilter}" filterExpression="#{fn:containsIgnoreCase(car.vendor, carsFilteringBean.vendorFilter)}">
+ <f:facet name="header">
<h:panelGroup>
<h:outputText value="Vendor " />
<h:selectOneMenu value="#{carsFilteringBean.vendorFilter}">
<f:selectItems value="#{carsBean.vendorOptions}" />
- <a4j:ajax render="form:table" execute="@this" event="change"/>
+ <a4j:ajax render="table" execute="@this" event="change"/>
</h:selectOneMenu>
</h:panelGroup>
</f:facet>
@@ -48,13 +53,13 @@
</f:facet>
<h:outputText value="#{car.mileage}" />
</it:column>
- <it:column
- filterExpression="#{fn:containsIgnoreCase(car.vin,carFilteringBean.vinFilter)}">
+ <it:column filterValue="#{carsFilteringBean.vinFilter}"
+ filterExpression="#{fn:containsIgnoreCase(car.vin,carsFilteringBean.vinFilter)}">
<f:facet name="header">
<h:panelGroup>
<h:outputText value="VIN " />
- <h:inputText value="#{carFilteringBean.vinFilter}">
- <a4j:ajax event="blur" render="form:table" execute="@this" />
+ <h:inputText value="#{carsFilteringBean.vinFilter}">
+ <a4j:ajax event="blur" render="table" execute="@this" />
</h:inputText>
</h:panelGroup>
</f:facet>
Deleted: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml 2010-05-31 13:43:16 UTC (rev 17409)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/tableFilteringAPI.xhtml 2010-05-31 13:50:23 UTC (rev 17410)
@@ -1,80 +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:it="http://richfaces.org/iteration"
- xmlns:fn="http://java.sun.com/jsp/jstl/functions"
- xmlns:rich="http://java.sun.com/jsf/composite/rich">
-
-<ui:composition>
- <h:form id="form">
- <h:panelGrid columns="2">
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Quick Filter Panel" />
- </f:facet>
- <fieldset><legend>Filter By Vendor</legend>
- <ul>
- <a4j:repeat value="#{carsBean.allVendors}" var="vendor">
- <li><h:outputLink
- value="javascript:document.getElementById('form:table').richfaces.component.filter('vendor', '#{vendor}')">#{vendor}</h:outputLink>
- </li>
- </a4j:repeat>
- </ul>
- </fieldset>
- </rich:panel>
- <it:dataTable value="#{carsBean.allInventoryItems}" var="car"
- id="table" rows="20">
- <it:column id="vendor"
- filterExpression="#{carsFilteringBean.vendorFilter == '' or carsFilteringBean.vendorFilter == null or carsFilteringBean.vendorFilter == car.vendor}">
- <f:facet name="header">
- <h:panelGroup>
- <h:outputText value="Vendor" />
- </h:panelGroup>
- </f:facet>
- <h:outputText value="#{car.vendor}" />
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:outputText value="Model" />
- </f:facet>
- <h:outputText value="#{car.model}" />
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:outputText value="Price" />
- </f:facet>
- <h:outputText value="#{car.price}" />
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:panelGroup>
- <h:outputText value="Mileage" />
- </h:panelGroup>
- </f:facet>
- <h:outputText value="#{car.mileage}" />
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:panelGroup>
- <h:outputText value="Days Live" />
- </h:panelGroup>
- </f:facet>
- <h:outputText value="#{car.daysLive}" />
- </it:column>
- <it:column>
- <f:facet name="header">
- <h:panelGroup>
- <h:outputText value="VIN " />
- </h:panelGroup>
- </f:facet>
- <h:outputText value="#{car.vin}" />
- </it:column>
- </it:dataTable>
- </h:panelGrid>
-
- </h:form>
-</ui:composition>
-</html>
\ No newline at end of file
Added: root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/repeat/simpleGrid.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/repeat/simpleGrid.xhtml (rev 0)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/repeat/simpleGrid.xhtml 2010-05-31 13:50:23 UTC (rev 17410)
@@ -0,0 +1,35 @@
+<!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:rich="http://java.sun.com/jsf/composite/rich"
+ xmlns:it="http://richfaces.org/iteration">
+
+<ui:composition>
+<p>a4j:repeat is a base iteration component of RichFaces. It allows to create any markups based
+on iterative data. This sample shows simple grid from capitals list.</p>
+ <h:form>
+ <a4j:outputPanel id="panel">
+ <a4j:repeat value="#{capitalsBean.capitals}" var="cap" rows="20" id="repeat">
+ <rich:panel style="float:left; width:200px; padding:5px;">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:graphicImage value="#{cap.stateFlag}" />
+ <h:outputText value="#{cap.state}" style="font-weight:bold" />
+ </h:panelGroup>
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="State Capital" style="font-weight:bold" />
+ <h:outputText value="#{cap.name}" />
+ <h:outputText value="State TimeZone" style="font-weight:bold" />
+ <h:outputText value="#{cap.timeZone}" />
+ </h:panelGrid>
+ </rich:panel>
+ </a4j:repeat>
+ </a4j:outputPanel>
+ <it:dataScroller for="repeat" render="panel" />
+ </h:form>
+</ui:composition>
+</html>
\ No newline at end of file
14 years, 6 months
JBoss Rich Faces SVN: r17409 - root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2010-05-31 09:43:16 -0400 (Mon, 31 May 2010)
New Revision: 17409
Modified:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java
Log:
Fixed disappearing selected item in demo
Modified: root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java 2010-05-31 13:18:36 UTC (rev 17408)
+++ root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/tables/CarsBean.java 2010-05-31 13:43:16 UTC (rev 17409)
@@ -40,10 +40,7 @@
List<SelectItem> result = new ArrayList<SelectItem>();
result.add(new SelectItem("",""));
for (InventoryVendorList vendorList : getInventoryVendorLists()) {
- if ((filteringBean.getVendorFilter()==null)||(!filteringBean.getVendorFilter().equalsIgnoreCase(vendorList.getVendor()))){
- result.add(new SelectItem(vendorList.getVendor()));
-
- }
+ result.add(new SelectItem(vendorList.getVendor()));
}
return result;
}
14 years, 6 months