JBoss Rich Faces SVN: r22018 - in branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region: samples and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2011-03-02 10:06:48 -0500 (Wed, 02 Mar 2011)
New Revision: 22018
Modified:
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml
branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml
Log:
http://jira.jboss.org/browse/RF-10512
@akolonitsky - looked through, but most of the review related to Sean future demo review.
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml 2011-03-02 14:09:48 UTC (rev 22017)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/region.xhtml 2011-03-02 15:06:48 UTC (rev 22018)
@@ -4,7 +4,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
-<ui:composition>
+<ui:composition>
<p><b>a4j:region</b> component designed for marking zones which
should be processed during Ajax requests without using execute
definitions at Ajax behaviors/components. This allow to decouple the
@@ -12,15 +12,19 @@
wrapping by this tag instead.</p>
<p>In <b>RichFaces 3.3</b> all the view was processed if no regions
specified as <b>ViewRoot itself was region by default</b>. And in <b>RichFaces
- 4.x</b> - all the controls has <b>execute="@this" by default</b> according
- to JSF 2 specifications. But if the <b>controls wrapped with
- a4j:region</b> component and has no execute definitions - them uses<b>
+ 4.x</b> - all the controls except some specific ones(<i>e.g.
+ a4j:command* normally used to submit whole form so has @form by default</i>)
+ has <b>execute="@this" by default</b> according to JSF 2
+ specifications. But if the <b>controls wrapped with a4j:region</b>
+ component and has no explicit execute definitions - them uses<b>
execute="@region"</b></p>
<p>Look to the simple example below. There are two similar user
- info panels. But the <b><u>button inside the first panel will not works</u> </b>as not uses execute
- declarations and by default execut equals to @this. Separate definition needed to start working properly.
- And the <b>second panel inputs
- just wrapped to region with the commandButton and works</b> without any additional execute definitions.</p>
+ info panels. But the <b><u>button with <a4j:ajax/> inside
+ the first panel will not works</u> </b> as not uses execute declarations and by
+ default execute equals to @this. Separate definition needed to start
+ working properly. And the <b>second panel with the same button and
+ inputs just wrapped to region and works</b> without any additional execute
+ definitions.</p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
@@ -28,5 +32,8 @@
<ui:param name="openLabel" value="View Source" />
<ui:param name="hideLabel" value="Hide Source" />
</ui:include>
+ <p><i>Again, as it was mentioned if you will use
+ <a4j:commandButton> both panels will start to work properly as
+ command controls has specific execute = @form by default. </i></p>
</ui:composition>
</html>
\ No newline at end of file
Modified: branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml
===================================================================
--- branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml 2011-03-02 14:09:48 UTC (rev 22017)
+++ branches/4.0.X/examples/richfaces-showcase/src/main/webapp/richfaces/region/samples/region-sample.xhtml 2011-03-02 15:06:48 UTC (rev 22018)
@@ -18,7 +18,9 @@
<h:outputText value="User email: " />
<h:inputText value="#{regionBean.user1.email}"/>
</h:panelGrid>
- <a4j:commandButton render="echopanel1" value="submit"/>
+ <h:commandButton value="submit">
+ <a4j:ajax render="echopanel1"/>
+ </h:commandButton>
</h:panelGrid>
<h:panelGrid columns="2" id="echopanel1">
<f:facet name="header">
@@ -44,7 +46,9 @@
<h:outputText value="User email: " />
<h:inputText value="#{regionBean.user2.email}"/>
</h:panelGrid>
- <a4j:commandButton render="echopanel2" value="submit"/>
+ <h:commandButton render="echopanel2" value="submit">
+ <a4j:ajax render="echopanel2"/>
+ </h:commandButton>
</a4j:region>
</h:panelGrid>
<h:panelGrid columns="2" id="echopanel2">
13 years, 10 months
JBoss Rich Faces SVN: r22017 - branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-03-02 09:09:48 -0500 (Wed, 02 Mar 2011)
New Revision: 22017
Modified:
branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java
Log:
RF-10650 a4j:ajax - makes request though @disabled=true
-reviewed by Anton Belevich
Modified: branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java
===================================================================
--- branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java 2011-03-02 12:49:47 UTC (rev 22016)
+++ branches/4.0.X/ui/core/ui/src/main/java/org/ajax4jsf/renderkit/AjaxBehaviorRenderer.java 2011-03-02 14:09:48 UTC (rev 22017)
@@ -117,7 +117,7 @@
@Override
public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) {
String script = null;
- if (behavior instanceof AjaxBehavior) {
+ if (behavior instanceof AjaxBehavior && !((AjaxBehavior)behavior).isDisabled()) {
script = buildAjaxCommand(behaviorContext, (AjaxBehavior) behavior);
}
13 years, 10 months
JBoss Rich Faces SVN: r22016 - in branches/4.0.X/ui/output/ui/src: main/templates and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-03-02 07:49:47 -0500 (Wed, 02 Mar 2011)
New Revision: 22016
Modified:
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
branches/4.0.X/ui/output/ui/src/main/templates/dropdownmenu.template.xml
branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml
branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml
Log:
https://issues.jboss.org/browse/RF-10630 dropDownMenu: menu label not highlighted on hover/menu expansion . Add base hover functionality. Reviewed by Alex Kolonitsky.
Modified: branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss
===================================================================
--- branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss 2011-03-02 12:22:58 UTC (rev 22015)
+++ branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss 2011-03-02 12:49:47 UTC (rev 22016)
@@ -3,10 +3,22 @@
font-size:11px;
position:relative;
}
-.rf-ddm-lbl-unsel {
- border:0 solid transparent;
+.rf-ddm-unsel {
+ border:1px solid transparent;
padding:3px 6px;
}
+.rf-ddm-sel {
+ background-image: "url(#{resource['org.richfaces.images:menu_item_bg.gif']})";
+ background-repeat: repeat-x;
+ background-position: bottom left;
+ background-color: '#{richSkin.additionalBackgroundColor}';
+ /*from additionalBackgroundColor (top) to tabBackgroundColor (bottom) additionalBackgroundColor*/
+ border : 1px solid; /*headerBackgroundColor*/
+ border-color: '#{richSkin.headerBackgroundColor}';
+ cursor:pointer;
+ padding:3px 6px;
+}
+
.rf-ddm-lbl, .rf-ddm-lbl-dis {
height:auto;
padding:2px 5px;
@@ -65,9 +77,9 @@
border-color: '#{richSkin.headerBackgroundColor}';
cursor : pointer;
padding : 1px 36px 2px 2px;
- background-color: '#{richSkin.tabBackgroundColor}';
+ background-color: '#{richSkin.additionalBackgroundColor}';
background-repeat: repeat-x;
- background-position: top;
+ background-position: bottom left;
background-image: "url(#{resource['org.richfaces.images:menu_item_bg.gif']})";
z-index:10;
}
@@ -89,7 +101,7 @@
}
.rf-ddm-sep {
font-size : 0px;
- border-top: 1px solid; /* #bfbfc0;*/ /*panelBorderColor*/
+ border-top: 1px solid; /* #BED6F8;*/ /*panelBorderColor*/
border-top-color: '#{richSkin.panelBorderColor}';
margin : 2px 0px 2px 24px;
}
Modified: branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
===================================================================
--- branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-03-02 12:22:58 UTC (rev 22015)
+++ branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-03-02 12:49:47 UTC (rev 22016)
@@ -4,27 +4,29 @@
var defaultOptions = {
positionType : "DROPDOWN",
direction : "AA",
- jointPoint : "AA"
+ jointPoint : "AA",
+ selectMenuCss : "rf-ddm-sel",
+ unselectMenuCss : "rf-ddm-unsel"
};
// constructor definition
- rf.ui.Menu = function(componentId, options) {
- this.options = {};
- $.extend(this.options, defaultOptions, options || {});
- $super.constructor.call(this, componentId, this.options);
- this.id = componentId;
- this.namespace = this.namespace || "."
- + rf.Event.createNamespace(this.name, this.id);
- this.groupList = new Array();
+ rf.ui.Menu = function(componentId, options) {
+ this.options = {};
+ $.extend(this.options, defaultOptions, options || {});
+ $super.constructor.call(this, componentId, this.options);
+ this.id = componentId;
+ this.namespace = this.namespace || "."
+ + rf.Event.createNamespace(this.name, this.id);
+ this.groupList = new Array();
- rf.Event.bindById(this.id + "_label", this.options.showEvent, $.proxy(
- this.__showHandler, this), this);
+ rf.Event.bindById(this.id + "_label", this.options.showEvent, $.proxy(
+ this.__showHandler, this), this);
+ this.element = $(rf.getDomElement(this.id));
- this.attachToDom(componentId);
- if (!rf.ui.MenuManager)
- rf.ui.MenuManager = {};
- this.menuManager = rf.ui.MenuManager;
- };
+ if (!rf.ui.MenuManager)
+ rf.ui.MenuManager = {};
+ this.menuManager = rf.ui.MenuManager;
+ };
rf.ui.MenuBase.extend(rf.ui.Menu);
@@ -67,13 +69,32 @@
this.menuManager.deletedMenuId();
},
- destroy : function() {
- // clean up code here
- this.detach(this.id);
+ select : function() {
+ this.element.removeClass(this.options.unselectMenuCss);
+ this.element.addClass(this.options.selectMenuCss);
+ },
+ unselect : function() {
+ this.element.removeClass(this.options.selectMenuCss);
+ this.element.addClass(this.options.unselectMenuCss);
+ },
- rf.Event.unbindById(this.id + "_label", this.options.showEvent);
+ __overHandler : function() {
+ $super.__overHandler.call(this);
+ this.select();
+ },
- // call parent's destroy method
+ __leaveHandler : function() {
+ $super.__leaveHandler.call(this);
+ this.unselect();
+ },
+
+ destroy : function() {
+ // clean up code here
+ this.detach(this.id);
+
+ rf.Event.unbindById(this.id + "_label", this.options.showEvent);
+
+ // call parent's destroy method
$super.destroy.call(this);
}
@@ -107,6 +128,5 @@
getActiveSubMenu : function() {
return this.activeSubMenu;
}
-
}
})(jQuery, RichFaces);
\ No newline at end of file
Modified: branches/4.0.X/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- branches/4.0.X/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-03-02 12:22:58 UTC (rev 22015)
+++ branches/4.0.X/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-03-02 12:49:47 UTC (rev 22016)
@@ -21,7 +21,7 @@
<cdk:object name="label" value="#{getLabelFacet(facesContext, component)}" type="javax.faces.component.UIComponent" />
<cdk:object name="isDisabled" type="boolean" value="#{isDisabled(facesContext, component)}" />
- <div id="#{clientId}" class="rf-ddm-lbl #{isDisabled ? 'rf-ddm-dis' : 'rf-ddm-lbl-unsel '+styleClass} " style="#{style}"
+ <div id="#{clientId}" class="rf-ddm-lbl #{isDisabled ? 'rf-ddm-dis' : 'rf-ddm-unsel '+styleClass} " style="#{style}"
cdk:passThroughWithExclusions="">
<div id="#{clientId}_label" class="#{isDisabled ? 'rf-ddm-lbl-dis' : 'rf-ddm-lbl-dec'}">
Modified: branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml
===================================================================
--- branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml 2011-03-02 12:22:58 UTC (rev 22015)
+++ branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_ajaxMode.xmlunit.xml 2011-03-02 12:49:47 UTC (rev 22016)
@@ -1,4 +1,4 @@
- <div class="rf-ddm-lbl rf-ddm-lbl-unsel " id="form:ddmenu">
+ <div class="rf-ddm-lbl rf-ddm-unsel " id="form:ddmenu">
<div id="form:ddmenu_label" class="rf-ddm-lbl-dec">
<img src="/images/ddmenu/copy.gif" class="pic"/>
File
Modified: branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml
===================================================================
--- branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml 2011-03-02 12:22:58 UTC (rev 22015)
+++ branches/4.0.X/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/dropDownMenu_serverMode.xmlunit.xml 2011-03-02 12:49:47 UTC (rev 22016)
@@ -1,4 +1,4 @@
- <div class="rf-ddm-lbl rf-ddm-lbl-unsel " id="form:ddmenu">
+ <div class="rf-ddm-lbl rf-ddm-unsel " id="form:ddmenu">
<div id="form:ddmenu_label" class="rf-ddm-lbl-dec">
<img src="/images/ddmenu/copy.gif" class="pic"/>
File
13 years, 10 months
JBoss Rich Faces SVN: r22015 - in modules/tests/metamer/trunk: ftest and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-02 07:22:58 -0500 (Wed, 02 Mar 2011)
New Revision: 22015
Modified:
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
tied back to development versions
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-03-02 08:52:28 UTC (rev 22014)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-03-02 12:22:58 UTC (rev 22015)
@@ -25,7 +25,7 @@
<parent>
<artifactId>functional-test-jboss-ci-template</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.2.SP5</version>
+ <version>1.5.3-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-03-02 08:52:28 UTC (rev 22014)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-03-02 12:22:58 UTC (rev 22015)
@@ -37,7 +37,7 @@
<dependency>
<artifactId>root</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.2.SP5</version>
+ <version>1.5.3-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-03-02 08:52:28 UTC (rev 22014)
+++ modules/tests/metamer/trunk/pom.xml 2011-03-02 12:22:58 UTC (rev 22015)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.richfaces.examples</groupId>
<artifactId>richfaces-example-parent</artifactId>
- <version>4.0.0.20110227-CR1</version>
+ <version>4.0.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
@@ -124,7 +124,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>2</richfaces.checkstyle.version>
- <version.richfaces>4.0.0.20110227-CR1</version.richfaces>
+ <version.richfaces>4.0.0-SNAPSHOT</version.richfaces>
</properties>
<dependencyManagement>
13 years, 10 months
JBoss Rich Faces SVN: r22014 - branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-03-02 03:52:28 -0500 (Wed, 02 Mar 2011)
New Revision: 22014
Modified:
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
Log:
RF-10639 Panel menu: top-level panel menu item styled wrong on mouseover
- reviewed by Anton Belevich
Modified: branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
--- branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-03-02 08:11:05 UTC (rev 22013)
+++ branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-03-02 08:52:28 UTC (rev 22014)
@@ -166,7 +166,7 @@
.rf-pm-top-itm:hover {
color: '#{richSkin.headerTextColor}';
- background-color:#ffd700;
+ background-color: '#{richSkin.additionalBackgroundColor}';
}
.rf-pm-top-itm-sel {
13 years, 10 months
JBoss Rich Faces SVN: r22013 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richDataTable and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-02 03:11:05 -0500 (Wed, 02 Mar 2011)
New Revision: 22013
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFacetsTest.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableFacets.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java
Log:
removing testNoDataLabelWithEmptyNoDataFacet since the behavior is incompatible between Mojarra / MyFaces and the test doesn't suit to common scenarios
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFacetsTest.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFacetsTest.java 2011-03-02 08:10:24 UTC (rev 22012)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/abstractions/DataTableFacetsTest.java 2011-03-02 08:11:05 UTC (rev 22013)
@@ -44,13 +44,6 @@
assertEquals(selenium.getText(model.getNoData()), EMPTY_STRING);
}
- public void testNoDataLabelWithEmptyNoDataFacet() {
- attributes.setShowData(false);
- facets.setNoData(EMPTY_STRING);
- attributes.setNoDataLabel(SAMPLE_STRING);
- assertEquals(selenium.getText(model.getNoData()), SAMPLE_STRING);
- }
-
public void testHeaderInstantChange() {
facets.setHeader(SAMPLE_STRING);
assertEquals(selenium.getText(model.getHeader()), SAMPLE_STRING);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableFacets.java 2011-03-02 08:10:24 UTC (rev 22012)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richDataTable/TestDataTableFacets.java 2011-03-02 08:11:05 UTC (rev 22013)
@@ -57,11 +57,6 @@
}
@Test
- public void testNoDataLabelWithEmptyNoDataFacet() {
- super.testNoDataLabelWithEmptyNoDataFacet();
- }
-
- @Test
public void testHeaderInstantChange() {
super.testHeaderInstantChange();
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java 2011-03-02 08:10:24 UTC (rev 22012)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richExtendedDataTable/TestExtendedDataTableFacets.java 2011-03-02 08:11:05 UTC (rev 22013)
@@ -59,12 +59,6 @@
super.testNoDataEmpty();
}
- @Test(groups = "4.0.0.Final")
- @IssueTracking({ "https://issues.jboss.org/browse/RFPL-1193", "https://issues.jboss.org/browse/RF-10627" })
- public void testNoDataLabelWithEmptyNoDataFacet() {
- super.testNoDataLabelWithEmptyNoDataFacet();
- }
-
@Test
public void testHeaderInstantChange() {
super.testHeaderInstantChange();
13 years, 10 months
JBoss Rich Faces SVN: r22012 - modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-03-02 03:10:24 -0500 (Wed, 02 Mar 2011)
New Revision: 22012
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml
Log:
fixed rich:dataGrid - scroller sample - support for iteration templates
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml 2011-03-02 06:43:10 UTC (rev 22011)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataGrid/scroller.xhtml 2011-03-02 08:10:24 UTC (rev 22012)
@@ -27,6 +27,7 @@
-->
<ui:composition template="/templates/template.xhtml">
+ <ui:param name="componentId" value="richDataGrid" />
<ui:define name="view">
<f:metadata>
@@ -44,10 +45,10 @@
<br/>
<h:outputText value="Show data in table: " />
<h:selectBooleanCheckbox id="noDataCheckbox" value="#{richDataGridBean.state}">
- <a4j:ajax render="richDataGrid scroller1"/>
+ <a4j:ajax render="#{nestedComponentId} scroller1"/>
</h:selectBooleanCheckbox>
<br/><br/>
- <rich:dataScroller id="scroller1" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid"/>
+ <rich:dataScroller id="scroller1" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="#{nestedComponentId}"/>
</ui:define>
<ui:define name="component">
@@ -84,7 +85,7 @@
<h:outputText value="#{record.name}" />
<f:facet name="footer">
- <rich:dataScroller id="scroller2" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid" />
+ <rich:dataScroller id="scroller2" for="richDataGrid" page="#{richDataGridBean.page}" maxPages="7" render="richDataGrid scroller1" />
</f:facet>
</rich:dataGrid>
13 years, 10 months
JBoss Rich Faces SVN: r22011 - in modules/docs/trunk/Component_Reference/src/main/docbook/en-US: extras and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-03-02 01:43:10 -0500 (Wed, 02 Mar 2011)
New Revision: 22011
Added:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.java
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Rearranged_columns.png
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Dragging_columns.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Selecting_multiple_rows.png
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richextendedDataTable_example.png
Log:
Edits and additions to rich:extendedDataTable documentation RFPL-983
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-03-01 23:15:28 UTC (rev 22010)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Tables_and_grids.xml 2011-03-02 06:43:10 UTC (rev 22011)
@@ -978,22 +978,22 @@
The <sgmltag><rich:extendedDataTable></sgmltag> component builds on the functionality of the <sgmltag><rich:dataTable></sgmltag> component, adding features such as data scrolling, row and column selection, and rearranging of columns.
</para>
<para>
- The <sgmltag><rich:extendedDataTable></sgmltag> component includes the following attributes not included in the <sgmltag><rich:dataTable></sgmltag> component:
+ The <sgmltag><rich:extendedDataTable></sgmltag> component includes the following main attributes not included in the <sgmltag><rich:dataTable></sgmltag> component:
</para>
<itemizedlist>
<listitem>
<para>
- <varname>frozenColumns</varname>
+ <varname>clientRows</varname>
</para>
</listitem>
<listitem>
<para>
- <varname>height</varname>
+ <varname>frozenColumns</varname>
</para>
</listitem>
<listitem>
<para>
- <varname>noDataLabel</varname>
+ <varname>height</varname>
</para>
</listitem>
<listitem>
@@ -1016,16 +1016,19 @@
<varname>selectionMode</varname>
</para>
</listitem>
+ <!--
<listitem>
<para>
<varname>tableState</varname>
</para>
</listitem>
+ -->
</itemizedlist>
<para>
The <sgmltag><rich:extendedDataTable></sgmltag> component does <emphasis>not</emphasis> include the following attributes available with the <sgmltag><rich:dataTable></sgmltag> component:
</para>
<itemizedlist>
+ <!--
<listitem>
<para>
<varname>columns</varname>
@@ -1036,7 +1039,39 @@
<varname>columnsWidth</varname>
</para>
</listitem>
+ -->
+ <listitem>
+ <para>
+ <varname>breakBefore</varname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>columnGroup</varname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>colSpan</varname>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <varname>rowSpan</varname>
+ </para>
+ </listitem>
</itemizedlist>
+
+ <note>
+ <title>Complex sub-tables</title>
+ <para>
+ Due to the complex mark-up involved in the <sgmltag><rich:extendedDataTable></sgmltag> component, it does not support the use of the <sgmltag><rich:collapsibleSubTable></sgmltag> component. The <sgmltag><rich:collapsibleSubTable></sgmltag> component is only available with the <sgmltag><rich:dataTable></sgmltag> component.
+ </para>
+ <para>
+ Similarly, complex row and column spanning using the <varname>breakBefore</varname>, <varname>columnGroup</varname>, <varname>colSpan</varname>, and <varname>rowSpan</varname> attributes is also not available with the <sgmltag><rich:extendedDataTable></sgmltag> component.
+ </para>
+ </note>
+
<section id="sect-Component_Reference-richextendedDataTable-Basic_usage">
<title>Basic usage</title>
<para>
@@ -1047,7 +1082,7 @@
<section id="sect-Component_Reference-richextendedDataTable-Table_appearance">
<title>Table appearance</title>
<para>
- The <varname>height</varname> attribute defines the height of the table on the page. This is set to <literal>100%</literal> by default. The width of the table can be set by using the <varname>width</varname> attribute. As with the <sgmltag><rich:dataTable></sgmltag> component, the look of the <sgmltag><rich:extendedDataTable></sgmltag> component can be customized and skinned using the <literal>header</literal>, <literal>footer</literal>, and <literal>caption</literal> facets.
+ The <varname>height</varname> attribute defines the height of the table on the page. This is set to <literal>100%</literal> by default. The width of the table can be set by using the <varname>width</varname> attribute. As with the <sgmltag><rich:dataTable></sgmltag> component, the look of the <sgmltag><rich:extendedDataTable></sgmltag> component can be customized and skinned using the <literal>header</literal> and <literal>footer</literal> facets.
</para>
</section>
@@ -1055,61 +1090,73 @@
<title>Extended features</title>
<example id="exam-Component_Reference-richextendedDataTable-richextendedDataTable_example">
<title><sgmltag><rich:extendedDataTable></sgmltag> example</title>
+ <para>
+ This example <sgmltag><rich:extendedDataTable></sgmltag> component demonstrates horizontal and vertical scrolling and frozen columns. Each feature is detailed in this section.
+ </para>
<programlisting language="XML" role="XML"><xi:include href="extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
- <blockquote>
- <figure id="figu-Component_Reference-richextendedDataTable_example-richextendedDataTable_example">
- <title><sgmltag><rich:extendedDataTable></sgmltag> example</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-richextendedDataTable_example.png" format="PNG" width="444" />
- </imageobject>
- <textobject>
- <para>
- A data table made using the <sgmltag><rich:extendedDataTable></sgmltag> component. It features scrolling data, column sorting, and a column filter.
- </para>
- </textobject>
- </mediaobject>
- </figure>
- </blockquote>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-richextendedDataTable_example.png" format="PNG" />
+ </imageobject>
+ <textobject>
+ <para>
+ A data table made using the <sgmltag><rich:extendedDataTable></sgmltag> component. It features horizontal and vertical scrolling and frozen columns.
+ </para>
+ </textobject>
+ </mediaobject>
</example>
- <para>
- <xref linkend="exam-Component_Reference-richextendedDataTable-richextendedDataTable_example" /> shows an example extended data table. The implementation features a scrolling data table, selection of one or more rows, sorting by columns, grouping by column, and a filter on the <guilabel>Name</guilabel> column.
- </para>
+
+ <section id="sect-Component_Reference-richextendedDataTable-Scrolling">
+ <title>Scrolling</title>
+ <para>
+ The example table shown in <xref linkend="exam-Component_Reference-richextendedDataTable-richextendedDataTable_example" /> features both horizontal and vertical scrolling. Scrolling occurs automatically when the contents of the table exceed the dimensions specified with the <varname>height</varname> and <varname>width</varname> attributes. Headers and footers remain in place and visible when the table is scrolled.
+ </para>
+ <para>
+ Large tables can use Ajax "lazy" loading to cache data on the client during scrolling. Use the <varname>clientRows</varname> attribute to specify the number of rows to load. The specified number of rows are loaded on the initial rendering and with every vertical scroll. If the <varname>clientRows</varname> attribute is not specified, all the rows are loaded on the client without the use of Ajax.
+ </para>
+ <para>
+ In addition to Ajax scrolling, the <sgmltag><rich:extendedDataTable></sgmltag> component can also be used with the <sgmltag><rich:dataScroller></sgmltag> component in the same way as a regular <sgmltag><rich:dataTable></sgmltag> component. Refer to <xref linkend="sect-Component_Reference-Tables_and_grids-richdataScroller" /> for full details on using the <sgmltag><rich:dataScroller></sgmltag> component.
+ </para>
+ </section>
+
+ <section id="sect-Component_Reference-richextendedDataTable-Frozen_columns">
+ <title>Frozen columns</title>
+ <para>
+ The example table shown in <xref linkend="exam-Component_Reference-richextendedDataTable-richextendedDataTable_example" /> has the first two columns frozen so that they remain visible if the user scrolls horizontally through the table. Note that the horizontal scrollbar does not encompass these frozen columns. To freeze columns, use the <varname>frozenColumns</varname> attribute to specify the number of columns on the left-hand side of the table to freeze.
+ </para>
+ </section>
<section id="sect-Component_Reference-richextendedDataTable-Row_selection">
<title>Row selection</title>
<para>
- Row selection is determined by the <varname>selectionMode</varname> attribute. Setting the attribute to <literal>none</literal> allows for no row selection capability. Setting the <varname>selectionMode</varname> attribute to <literal>single</literal> allows the user to select a single row at a time using the mouse. With the <varname>selectionMode</varname> attribute set to <literal>multi</literal>, the user can select multiple rows by holding down the <keycap function="shift">Shift</keycap> or <keycap function="control">Ctrl</keycap> keys while clicking. The <varname>selection</varname> attribute points to the object that tracks which rows are selected. <xref linkend="figu-Component_Reference-richextendedDataTable-Selecting_multiple_rows" /> shows the table from the example with multiple rows selected.
+ Row selection is determined by the <varname>selectionMode</varname> attribute. Setting the attribute to <literal>none</literal> allows for no row selection capability. The example table shown in <xref linkend="exam-Component_Reference-richextendedDataTable-richextendedDataTable_example" /> does not allow row selection.
</para>
- <figure id="figu-Component_Reference-richextendedDataTable-Selecting_multiple_rows">
+ <para>
+ Setting the <varname>selectionMode</varname> attribute to <literal>single</literal> allows the user to select a single row at a time using the mouse. With the <varname>selectionMode</varname> attribute set to <literal>multi</literal>, the user can select multiple rows. Holding down the <keycap function="control">Ctrl</keycap> key while clicking selects additional rows with each click. Holding down the <keycap function="shift">Shift</keycap> key while clicking selects all the rows in a range.
+ </para>
+ <para>
+ The <varname>selection</varname> attribute points to a collection of objects. It holds the <varname>rowKey</varname> identifiers to track which rows are selected. <xref linkend="exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows" /> shows how to implement multiple row selection in the same table from <xref linkend="exam-Component_Reference-richextendedDataTable-richextendedDataTable_example" />.
+ </para>
+ <example id="exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows">
<title>Selecting multiple rows</title>
+ <programlisting language="XML" role="XML"><xi:include parse="text" href="extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.xml_sample" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
+ <para>
+ The accompanying <classname>ExtSelectionBean</classname> bean handles which rows are selected. The rows are identified by their <varname>rowKey</varname> identifiers.
+ </para>
+ <programlisting language="Java" role="JAVA"><xi:include parse="text" href="extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.java" xmlns:xi="http://www.w3.org/2001/XInclude" /></programlisting>
<mediaobject>
<imageobject>
- <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-Selecting_multiple_rows.png" format="PNG" width="444" />
+ <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-Selecting_multiple_rows.png" format="PNG" />
</imageobject>
<textobject>
<para>
- The example table with rows numbered 1, 2, 3, and 5 selected.
+ The example table with the first, second, third, and fifth rows selected.
</para>
</textobject>
</mediaobject>
- </figure>
+ </example>
</section>
- <section id="sect-Component_Reference-richextendedDataTable-Filtering">
- <title>Filtering</title>
- <para>
- The example table features a text field as part of the header of a column. A user can type their criteria into the text field to customize the filter of the column below. For full details on filtering tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" />.
- </para>
- </section>
-
- <section id="sect-Component_Reference-richextendedDataTable-Sorting">
- <title>Sorting</title>
- <para>
- The example table features controls in the column headers for sorting the the table according to the relevant column. The value of the data model to sort by is specified with the <varname>sortBy</varname> attribute. For full details on sorting tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
- </para>
- </section>
-
<!--
<section id="sect-Component_Reference-richextendedDataTable-Grouping">
<title>Grouping</title>
@@ -1155,7 +1202,7 @@
<section id="sect-Component_Reference-richextendedDataTable-Rearranging_columns">
<title>Rearranging columns</title>
<para>
- Columns in a <sgmltag><rich:extendedDataTable></sgmltag> component can be rearranged by the user by dragging each column to a different position. The <varname>label</varname> attribute for the <sgmltag><rich:column></sgmltag> component is displayed during dragging, as shown in
+ Columns in a <sgmltag><rich:extendedDataTable></sgmltag> component can be rearranged by the user by dragging each column to a different position. A graphical representation of the column is displayed during dragging. <xref linkend="figu-Component_Reference-richextendedDataTable-Dragging_columns" /> illustrates the <guilabel>Price</guilabel> column being dragged to a new location. The small blue arrow indicates where the column will be moved to if it is dropped in the current position. <xref linkend="figu-Component_Reference-richextendedDataTable-Rearranged_columns" /> shows the result of dragging the <guilabel>Price</guilabel> column.
</para>
<figure id="figu-Component_Reference-richextendedDataTable-Dragging_columns">
<title>Dragging columns</title>
@@ -1165,20 +1212,42 @@
</imageobject>
<textobject>
<para>
- Dragging the <guilabel>Name</guilabel> column rearranges the order of the columns.
+ The <guilabel>Price</guilabel> column is dragged to a new position.
</para>
</textobject>
</mediaobject>
</figure>
+ <figure id="figu-Component_Reference-richextendedDataTable-Rearranged_columns">
+ <title>Rearranged columns</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/figu-Component_Reference-Tables_and_grids-Rearranged_columns.png" format="PNG" width="444" />
+ </imageobject>
+ <textobject>
+ <para>
+ The <guilabel>Price</guilabel> column has been moved to the right of the <guilabel>Mileage</guilabel> column.
+ </para>
+ </textobject>
+ </mediaobject>
+ </figure>
</section>
-
+
+ <!--
<section id="sect-Component_Reference-richextendedDataTable-Saving_the_state">
<title>Saving the state</title>
<para>
Once the contents of the table have been rearranged and customized by the user, the <varname>tableState</varname> attribute can be used to preserve the customization so it can be restored later. The <varname>tableState</varname> attribute points to a backing-bean property which can in turn be saved to a database separate from standard JSF state-saving mechanisms.
</para>
</section>
+ -->
+ <section id="sect-Component_Reference-richextendedDataTable-Filtering_and_sorting">
+ <title>Filtering and sorting</title>
+ <para>
+ The <sgmltag><rich:extendedDataTable></sgmltag> component can include filtering and sorting in the same way as a regular <sgmltag><rich:dataTable></sgmltag> component. For full details on filtering tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_filtering" />. For full details on sorting tables, refer to <xref linkend="sect-Component_Reference-Tables_and_grids-Table_sorting" />.
+ </para>
+ </section>
+
</section>
<section id="sect-Component_Reference-richextendedDataTable-JavaScript_API">
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample 2011-03-01 23:15:28 UTC (rev 22010)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-Tables_and_grids-richextendedDataTable_example.xml_sample 2011-03-02 06:43:10 UTC (rev 22011)
@@ -1,27 +1,49 @@
-<rich:extendedDataTable id="edt" value="#{extendedDT.dataModel}" var="edt" width="500px" height="500px" selectedClass="dataTableSelectedRow" sortMode="single" selectionMode="multi" selection="#{extendedDT.selection}" rowKeyVar="rkvar" tableState="#{extendedDT.tableState}">
- <rich:column id="id" headerClass="dataTableHeader" width="50" label="Id" sortBy="#{edt.id}">
+<rich:extendedDataTable value="#{carsBean.allInventoryItems}"
+ var="car" id="table" frozenColumns="2"
+ style="height:300px; width:500px;" selectionMode="none">
+ <f:facet name="header">
+ <h:outputText value="Cars marketplace" />
+ </f:facet>
+ <rich:column>
<f:facet name="header">
- <h:outputText value="Id" />
+ <h:outputText value="vendor" />
</f:facet>
- <h:outputText value="#{edt.id}" />
+ <h:outputText value="#{car.vendor}" />
</rich:column>
- <rich:column id="name" width="300" headerClass="dataTableHeader" label="Name" sortBy="#{edt.name}" filterBy="#{edt.name}" filterEvent="keyup" visible="false">
- <f:facet name="header">
- <h:outputText value="Name" />
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
</f:facet>
- <h:outputText value="#{edt.name}" />
+ <h:outputText value="#{car.model}" />
</rich:column>
- <rich:column id="date" width="100" headerClass="dataTableHeader" label="Date" comparator="#{extendedDT.dateComparator}">
+ <rich:column>
<f:facet name="header">
- <h:outputText value="Date" />
+ <h:outputText value="Price" />
</f:facet>
- <h:outputText value="#{edt.date}"><f:convertDateTime pattern="yyyy-MM-dd HH:mm:ss" />
- </h:outputText>
+ <h:outputText value="#{car.price}" />
</rich:column>
- <rich:column id="group" width="50" headerClass="dataTableHeader" label="Group" sortBy="#{edt.group}">
+ <rich:column>
<f:facet name="header">
- <h:outputText value="Group" />
+ <h:outputText value="Mileage" />
</f:facet>
- <h:outputText value="#{edt.group}" />
+ <h:outputText value="#{car.mileage}" />
</rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="VIN Code" />
+ </f:facet>
+ <h:outputText value="#{car.vin}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Items stock" />
+ </f:facet>
+ <h:outputText value="#{car.stock}" />
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="Days Live" />
+ </f:facet>
+ <h:outputText value="#{car.daysLive}" />
+ </rich:column>
</rich:extendedDataTable>
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.java
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.java (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.java 2011-03-02 06:43:10 UTC (rev 22011)
@@ -0,0 +1,62 @@
+package org.richfaces.demo.tables;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ManagedProperty;
+import javax.faces.bean.SessionScoped;
+import javax.faces.event.AjaxBehaviorEvent;
+
+import org.richfaces.component.UIExtendedDataTable;
+import org.richfaces.demo.tables.model.cars.InventoryItem;
+
+@ManagedBean
+@SessionScoped
+
+public class ExtTableSelectionBean implements Serializable{
+
+ private Collection<Object> selection;
+ @ManagedProperty(value = "#{carsBean.allInventoryItems}")
+ private List<InventoryItem> inventoryItems;
+ private List<InventoryItem> selectionItems = new ArrayList<InventoryItem>();
+
+ public void selectionListener(AjaxBehaviorEvent event){
+ UIExtendedDataTable dataTable = (UIExtendedDataTable)event.getComponent();
+ Object originalKey = dataTable.getRowKey();
+ selectionItems.clear();
+ for (Object selectionKey: selection) {
+ dataTable.setRowKey(selectionKey);
+ if (dataTable.isRowAvailable()){
+ selectionItems.add((InventoryItem)dataTable.getRowData());
+ }
+ }
+ dataTable.setRowKey(originalKey);
+ }
+
+ public Collection<Object> getSelection() {
+ return selection;
+ }
+
+ public void setSelection(Collection<Object> selection) {
+ this.selection = selection;
+ }
+
+ public List<InventoryItem> getInventoryItems() {
+ return inventoryItems;
+ }
+
+ public void setInventoryItems(List<InventoryItem> inventoryItems) {
+ this.inventoryItems = inventoryItems;
+ }
+
+ public List<InventoryItem> getSelectionItems() {
+ return selectionItems;
+ }
+
+ public void setSelectionItems(List<InventoryItem> selectionItems) {
+ this.selectionItems = selectionItems;
+ }
+}
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.xml_sample
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.xml_sample (rev 0)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/extras/exam-Component_Reference-richextendedDataTable-Selecting_multiple_rows.xml_sample 2011-03-02 06:43:10 UTC (rev 22011)
@@ -0,0 +1,5 @@
+<rich:extendedDataTable value="#{extTableSelectionBean.inventoryItems}"
+ var="car" selection="#{extTableSelectionBean.selection}"
+ id="table" frozenColumns="2"
+ style="height:300px; width:500px;" selectionMode="multi">
+ ...
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Dragging_columns.png
===================================================================
(Binary files differ)
Added: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Rearranged_columns.png
===================================================================
(Binary files differ)
Property changes on: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Rearranged_columns.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-Selecting_multiple_rows.png
===================================================================
(Binary files differ)
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/images/figu-Component_Reference-Tables_and_grids-richextendedDataTable_example.png
===================================================================
(Binary files differ)
13 years, 10 months
JBoss Rich Faces SVN: r22010 - branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/javascript.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-03-01 18:15:28 -0500 (Tue, 01 Mar 2011)
New Revision: 22010
Modified:
branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/javascript/ClientScriptServiceImpl.java
Log:
RESOLVED - issue RF-10062: CSV: cache results in services , fix negative result cache.
https://issues.jboss.org/browse/RF-10062
Modified: branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/javascript/ClientScriptServiceImpl.java
===================================================================
--- branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/javascript/ClientScriptServiceImpl.java 2011-03-01 23:15:25 UTC (rev 22009)
+++ branches/4.0.X/ui/validator/ui/src/main/java/org/richfaces/javascript/ClientScriptServiceImpl.java 2011-03-01 23:15:28 UTC (rev 22010)
@@ -3,10 +3,12 @@
*/
package org.richfaces.javascript;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentMap;
+import javax.faces.FacesException;
import javax.faces.application.Resource;
import javax.faces.application.ResourceDependency;
import javax.faces.application.ResourceHandler;
@@ -29,6 +31,17 @@
private static final String TEXT_JAVASCRIPT = "text/javascript";
private static final String ORG_RICHFACES_CSV = "org.richfaces.csv";
+
+ private static final LibraryFunction NO_SCRIPT = new LibraryFunction() {
+
+ public Iterable<ResourceKey> getResources() {
+ return Collections.emptySet();
+ }
+
+ public String getName() {
+ return null;
+ }
+ };
private static final Function<Class<?>, ? extends LibraryFunction> RESOURCE_SCRIPT_FUNCTION = new Function<Class<?>, LibraryFunction>() {
@@ -65,33 +78,30 @@
if (null == facesContext || null == javaClass) {
throw new NullPointerException();
}
- LibraryFunction function;
- try {
- function = getFromComputationMap(resourcesMapping, javaClass);
- } catch (ScriptNotFoundException e) {
+ LibraryFunction function = getFromComputationMap(resourcesMapping, javaClass);
+ if(NO_SCRIPT == function) {
if (defaultMapping.containsKey(javaClass)) {
function = defaultMapping.get(javaClass);
} else {
function = getFromComputationMap(annotationsMapping, javaClass);
}
}
+ if(NO_SCRIPT == function) {
+ throw new ScriptNotFoundException("No client-side script for class "+javaClass.getName());
+ }
return function;
}
- private LibraryFunction getFromComputationMap(ConcurrentMap<Class<?>, LibraryFunction> map, Class<?> clazz) throws ScriptNotFoundException {
+ private LibraryFunction getFromComputationMap(ConcurrentMap<Class<?>, LibraryFunction> map, Class<?> clazz){
try {
return map.get(clazz);
} catch (ComputationException e) {
Throwable cause = e.getCause();
- if (cause instanceof ScriptNotFoundException) {
- ScriptNotFoundException snfe = (ScriptNotFoundException) cause;
- throw snfe;
- }
- throw e;
+ throw new FacesException(cause);
}
}
- private static LibraryFunction getScriptFromAnnotation(Class<?> javaClass) throws ScriptNotFoundException {
+ private static LibraryFunction getScriptFromAnnotation(Class<?> javaClass) {
if (javaClass.isAnnotationPresent(ClientSideScript.class)) {
ClientSideScript clientSideScript = javaClass.getAnnotation(ClientSideScript.class);
List<ResourceKey> resources = Lists.newArrayList();
@@ -100,12 +110,11 @@
}
return new LibraryFunctionImplementation(clientSideScript.function(), resources);
} else {
- throw new ScriptNotFoundException();
+ return NO_SCRIPT;
}
}
- private static LibraryFunction getScriptResource(FacesContext facesContext, Class<?> javaClass)
- throws ScriptNotFoundException {
+ private static LibraryFunction getScriptResource(FacesContext facesContext, Class<?> javaClass){
ResourceHandler resourceHandler = facesContext.getApplication().getResourceHandler();
String resourceName = javaClass.getSimpleName() + ".js";
Resource facesResource = resourceHandler.createResource(resourceName, ORG_RICHFACES_CSV, TEXT_JAVASCRIPT);
@@ -113,7 +122,7 @@
final String functionName = Strings.firstToLowerCase(javaClass.getSimpleName());
return new LibraryFunctionImplementation(functionName,resourceName, ORG_RICHFACES_CSV);
} else {
- throw new ScriptNotFoundException();
+ return NO_SCRIPT;
}
}
13 years, 10 months
JBoss Rich Faces SVN: r22009 - branches/4.0.X/ui/validator/api/src/main/java/org/richfaces/javascript.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-03-01 18:15:25 -0500 (Tue, 01 Mar 2011)
New Revision: 22009
Modified:
branches/4.0.X/ui/validator/api/src/main/java/org/richfaces/javascript/ScriptNotFoundException.java
Log:
RESOLVED - issue RF-10062: CSV: cache results in services , fix negative result cache.
https://issues.jboss.org/browse/RF-10062
Modified: branches/4.0.X/ui/validator/api/src/main/java/org/richfaces/javascript/ScriptNotFoundException.java
===================================================================
--- branches/4.0.X/ui/validator/api/src/main/java/org/richfaces/javascript/ScriptNotFoundException.java 2011-03-01 22:55:34 UTC (rev 22008)
+++ branches/4.0.X/ui/validator/api/src/main/java/org/richfaces/javascript/ScriptNotFoundException.java 2011-03-01 23:15:25 UTC (rev 22009)
@@ -1,6 +1,6 @@
package org.richfaces.javascript;
-public class ScriptNotFoundException extends RuntimeException {
+public class ScriptNotFoundException extends Exception {
public ScriptNotFoundException() {
super();
13 years, 10 months