Author: ppitonak
Date: 2014-01-21 02:19:38 -0500 (Tue, 21 Jan 2014)
New Revision: 23286
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen1.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen2.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/rerender.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen1.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen2.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/rerender.xhtml
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/media/MediaData.java
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable.xhtml
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/scrollableDataTable.xhtml
Log:
richfaces-demo: typo in UserBean fixed
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxsupport/UserBean.java 2014-01-21
07:19:38 UTC (rev 23286)
@@ -40,7 +40,7 @@
}
public String nameItJohn() {
- setName("Jonh");
+ setName("John");
return null;
}
public String nameItMark() {
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/extendedDataTable/ExtendedTableBean.java 2014-01-21
07:19:38 UTC (rev 23286)
@@ -4,11 +4,15 @@
package org.richfaces.demo.extendedDataTable;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.richfaces.demo.capitals.Capital;
+import org.richfaces.demo.datafilterslider.DemoInventoryItem;
import org.richfaces.model.DataProvider;
import org.richfaces.model.ExtendedTableDataModel;
+import org.richfaces.model.selection.Selection;
+import org.richfaces.model.selection.SimpleSelection;
/**
* @author Ilya Shaikovsky
@@ -17,9 +21,11 @@
public class ExtendedTableBean {
private String sortMode="single";
private String selectionMode="multi";
-
+ private Object tableState;
+ private Selection selection = new SimpleSelection();
+ private List<Capital> capitals = new ArrayList<Capital>();
private ExtendedTableDataModel<Capital> dataModel;
- private List<Capital> capitals = new ArrayList<Capital>();
+ private List<Capital> selectedCapitals = new ArrayList<Capital>();
public String getSortMode() {
return sortMode;
@@ -40,6 +46,15 @@
public ExtendedTableBean() {
}
+ public void takeSelection(){
+ selectedCapitals.clear();
+ Iterator<Object> iterator = getSelection().getKeys();
+ while (iterator.hasNext()) {
+ Object key = iterator.next();
+ selectedCapitals.add(getCapitalsDataModel().getObjectByKey(key));
+ }
+ }
+
public ExtendedTableDataModel<Capital> getCapitalsDataModel() {
if (dataModel == null) {
dataModel = new ExtendedTableDataModel<Capital>(new
DataProvider<Capital>(){
@@ -76,4 +91,28 @@
this.capitals = capitals;
}
+ public Object getTableState() {
+ return tableState;
+ }
+
+ public void setTableState(Object tableState) {
+ this.tableState = tableState;
+ }
+
+ public Selection getSelection() {
+ return selection;
+ }
+
+ public void setSelection(Selection selection) {
+ this.selection = selection;
+ }
+
+ public List<Capital> getSelectedCapitals() {
+ return selectedCapitals;
+ }
+
+ public void setSelectedCapitals(List<Capital> selectedCapitals) {
+ this.selectedCapitals = selectedCapitals;
+ }
+
}
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java 2014-01-21
07:19:38 UTC (rev 23286)
@@ -93,6 +93,7 @@
HashMap hosts = new HashMap();
hosts.put("localhost", "");
hosts.put("localhost:8080", "");
+ hosts.put("192.168.122.1:8080",
"AIzaSyByj_br3IEFPLFtJJ0qUHYZnAdBVfc-yrg");
hosts.put("showcase3-richfaces.rhcloud.com",
"AIzaSyBEIKdYnmr76M_Hs1rDGFEt4E7WfxSdo9Q");
hosts.put("http://showcase-rf3.richfaces.org/",
"AIzaSyBEIKdYnmr76M_Hs1rDGFEt4E7WfxSdo9Q");
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/media/MediaData.java
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/media/MediaData.java 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/media/MediaData.java 2014-01-21
07:19:38 UTC (rev 23286)
@@ -1,11 +1,10 @@
package org.richfaces.demo.media;
import java.awt.Color;
+import java.io.Serializable;
-import org.ajax4jsf.resource.SerializableResource;
+public class MediaData implements Serializable {
-public class MediaData implements SerializableResource {
-
private static final long serialVersionUID = 1L;
Integer Width=110;
Integer Height=50;
@@ -37,4 +36,4 @@
public void setWidth(Integer width) {
Width = width;
}
-}
\ No newline at end of file
+}
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/java/org/richfaces/demo/paint2d/PaintData.java 2014-01-21
07:19:38 UTC (rev 23286)
@@ -1,8 +1,8 @@
package org.richfaces.demo.paint2d;
-import org.ajax4jsf.resource.SerializableResource;
+import java.io.Serializable;
-public class PaintData implements SerializableResource {
+public class PaintData implements Serializable {
/**
*
*/
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -55,8 +55,8 @@
</f:facet>
<rich:menuItem submitMode="none"
-
onclick="document.location.href='http://labs.jboss.com/jbossrich...
- <h:outputLink
value="http://labs.jboss.com/jbossrichfaces/">
+ onclick="document.location.href='http://richfaces.org'">
+ <h:outputLink value="http://richfaces.org">
<h:outputText value="RichFaces Home Page"></h:outputText>
</h:outputLink>
</rich:menuItem>
@@ -81,4 +81,4 @@
<br />
<rich:spacer width="1" height="25" />
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/extendedDataTable/examples/simple.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -1,64 +1,97 @@
<!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:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
- <ui:composition>
- <h:form>
- <h:panelGrid columns="2" columnClasses="top,top">
- <rich:extendedDataTable value="#{extendedTableBean.capitalsDataModel}"
var="cap" id="table"
- width="580px" height="400px"
sortMode="#{extendedTableBean.sortMode}"
- selectionMode="#{extendedTableBean.selectionMode}">
- <rich:column sortable="false" label="Flag">
- <f:facet name="header">
- <h:outputText value="Flag"/>
- </f:facet>
- <h:graphicImage value="#{cap.stateFlag}"/>
- </rich:column>
- <rich:column sortable="true" sortBy="#{cap.state}"
filterBy="#{cap.state}" filterEvent="onkeyup" width="170px"
label="State Name">
- <f:facet name="header">
- <h:outputText value="State Name"/>
- </f:facet>
- <h:outputText value="#{cap.state}"/>
- </rich:column>
- <rich:column sortable="true" sortBy="#{cap.name}"
filterBy="#{cap.name}" filterEvent="onkeyup" width="170px"
label="State Capital">
- <f:facet name="header">
- <h:outputText value="State Capital"/>
- </f:facet>
- <h:outputText value="#{cap.name}"/>
- </rich:column>
- <rich:column sortable="false" label="Time Zone">
- <f:facet name="header">
- <h:outputText value="Time Zone"/>
- </f:facet>
- <h:outputText value="#{cap.timeZone}"/>
- </rich:column>
- </rich:extendedDataTable>
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Sort/Selection modes changing"/>
- </f:facet>
- <h:panelGrid columns="2">
- <h:outputText value="Sort Mode:"/>
- <h:selectOneMenu value="#{extendedTableBean.sortMode}">
- <f:selectItem itemLabel="Single" itemValue="single"/>
- <f:selectItem itemLabel="Multi" itemValue="multi"/>
- <a4j:support event="onchange" ajaxSingle="true"
reRender="table"/>
- </h:selectOneMenu>
- <h:outputText value="Selection Mode:"/>
- <h:selectOneMenu value="#{extendedTableBean.selectionMode}">
- <a4j:support ajaxSingle="true" event="onchange"
reRender="table"/>
- <f:selectItem itemLabel="Single" itemValue="single"/>
- <f:selectItem itemLabel="Multi" itemValue="multi"/>
- <f:selectItem itemLabel="None" itemValue="none"/>
- </h:selectOneMenu>
- </h:panelGrid>
- </rich:panel>
+<ui:composition>
+ <h:form id="form">
+ <h:panelGrid columns="2" columnClasses="top , top">
+ <rich:extendedDataTable
+ value="#{extendedTableBean.capitalsDataModel}" var="cap"
id="table"
+ width="580px" height="400px"
+ sortMode="#{extendedTableBean.sortMode}"
+ selectionMode="#{extendedTableBean.selectionMode}"
+ tableState="#{extendedTableBean.tableState}"
+ selection="#{extendedTableBean.selection}">
+ <rich:column sortable="false" label="Flag"
id="col_1">
+ <f:facet name="header">
+ <h:outputText value="Flag" id="flag"/>
+ </f:facet>
+ <h:graphicImage value="#{cap.stateFlag}"
id="cap_state_flag"/>
+ </rich:column>
+ <rich:column sortable="true" sortBy="#{cap.state}"
id="col_2"
+ filterBy="#{cap.state}" filterEvent="onkeyup"
width="170px"
+ label="State Name">
+ <f:facet name="header">
+ <h:outputText value="State Name" id="state_name"/>
+ </f:facet>
+ <h:outputText value="#{cap.state}" id="cap_state"/>
+ </rich:column>
+ <rich:column sortable="true" sortBy="#{cap.name}"
id="col_3"
+ filterBy="#{cap.name}" filterEvent="onkeyup"
width="170px"
+ label="State Capital">
+ <f:facet name="header">
+ <h:outputText value="State Capital" id="state_capital"/>
+ </f:facet>
+ <h:outputText value="#{cap.name}" id="cap_name"/>
+ </rich:column>
+ <rich:column sortable="false" label="Time Zone"
id="col_4">
+ <f:facet name="header">
+ <h:outputText value="Time Zone" id="time_zone"/>
+ </f:facet>
+ <h:outputText value="#{cap.timeZone}"
id="cap_time_zone"/>
+ </rich:column>
+ <a4j:support reRender="selectiontable"
id="extended_table_bean_take_selection"
+ action="#{extendedTableBean.takeSelection}"
+ event="onselectionchange" />
+ </rich:extendedDataTable>
+ <h:panelGroup layout="block" style="width:250px">
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Sort/Selection modes changing" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <h:outputText value="Sort Mode:" />
+ <h:selectOneMenu value="#{extendedTableBean.sortMode}">
+ <f:selectItem itemLabel="Single" itemValue="single" />
+ <f:selectItem itemLabel="Multi" itemValue="multi" />
+ <a4j:support event="onchange" ajaxSingle="true"
reRender="table" id="support_sort_onchange"/>
+ </h:selectOneMenu>
+ <h:outputText value="Selection Mode:" />
+ <h:selectOneMenu value="#{extendedTableBean.selectionMode}">
+ <a4j:support ajaxSingle="true" event="onchange"
reRender="table" id="support_select_onchange"/>
+ <f:selectItem itemLabel="Single" itemValue="single" />
+ <f:selectItem itemLabel="Multi" itemValue="multi" />
+ <f:selectItem itemLabel="None" itemValue="none" />
+ </h:selectOneMenu>
+ </h:panelGrid>
+ </rich:panel>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Currently selected rows:" />
+ </f:facet>
+ <rich:dataTable value="#{extendedTableBean.selectedCapitals}"
+ var="sel" id="selectiontable">
+ <rich:column>
+ <h:graphicImage value="#{sel.stateFlag}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.state}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.name}" />
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{sel.timeZone}" />
+ </rich:column>
+ </rich:dataTable>
+ </rich:panel>
+ </h:panelGroup>
</h:panelGrid>
- </h:form>
- </ui:composition>
+ </h:form>
+</ui:composition>
</html>
\ No newline at end of file
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen1.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen1.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen1.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -0,0 +1,49 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <style>
+ .scrolls{
+ width:300px;
+ height:200px;
+ overflow:auto;
+ }
+ </style>
+ <h:form id="form3">
+ <rich:spacer height="30" />
+ <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="0"
height="400px"
+ width="400px" id="carList3" rows="40"
columnClasses="col"
+ value="#{dataTableScrollerBean.allCars}" var="category"
sortMode="single"
+ sortOrder="#{dataTableScrollerBean.order}"
+ selection="#{dataTableScrollerBean.selection}">
+
+ <rich:column id="make3">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Make" /></f:facet>
+ <h:outputText value="#{category.make}" />
+ </rich:column>
+ <rich:column id="model3">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Model" /></f:facet>
+ <h:outputText value="#{category.model}" />
+ </rich:column>
+ <rich:column id="price3">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Price" /></f:facet>
+ <h:outputText value="#{category.price}" />
+ </rich:column>
+ <rich:column id="mileage3">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Mileage" /></f:facet>
+ <h:inputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px" id="vin3">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="VIN" /></f:facet>
+ <h:inputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column id="stock3">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Stock" /></f:facet>
+ <h:inputText value="#{category.stock}" />
+ </rich:column>
+ </rich:scrollableDataTable>
+ </h:form>
+</ui:composition>
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen2.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen2.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/frozen2.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -0,0 +1,49 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <style>
+ .scrolls{
+ width:300px;
+ height:200px;
+ overflow:auto;
+ }
+ </style>
+ <h:form id="form4">
+ <rich:spacer height="30" />
+ <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="2"
height="400px"
+ width="400px" id="carList4" rows="40"
columnClasses="col"
+ value="#{dataTableScrollerBean.allCars}" var="category"
sortMode="single"
+ sortOrder="#{dataTableScrollerBean.order}"
+ selection="#{dataTableScrollerBean.selection}">
+
+ <rich:column id="make4">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Make" /></f:facet>
+ <h:outputText value="#{category.make}" />
+ </rich:column>
+ <rich:column id="model4">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Model" /></f:facet>
+ <h:outputText value="#{category.model}" />
+ </rich:column>
+ <rich:column id="price4">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Price" /></f:facet>
+ <h:outputText value="#{category.price}" />
+ </rich:column>
+ <rich:column id="mileage4">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Mileage" /></f:facet>
+ <h:inputText value="#{category.mileage}" />
+ </rich:column>
+ <rich:column width="200px" id="vin4">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="VIN" /></f:facet>
+ <h:inputText value="#{category.vin}" />
+ </rich:column>
+ <rich:column id="stock4">
+ <f:facet name="header"><h:outputText
styleClass="headerText" value="Stock" /></f:facet>
+ <h:inputText value="#{category.stock}" />
+ </rich:column>
+ </rich:scrollableDataTable>
+ </h:form>
+</ui:composition>
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/rerender.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/rerender.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/rerender.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -0,0 +1,81 @@
+<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:s="http://jboss.com/products/seam/taglib"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+
+ <style>
+ .scrolls{
+ width:300px;
+ height:200px;
+ overflow:auto;
+ }
+ </style>
+ <h:form id="myform">
+
+<rich:simpleTogglePanel id="mypanel" styleClass="cls_sTglPnl"
switchType="client" label="My Test" opened="true">
+ <rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1"
height="400px"
+ width="100%" id="carList2" rows=""
columnClasses="col"
+ value="#{dataTableScrollerBean.allCars}" var="category"
+ >
+
+ <rich:column width="350px">
+
+ <f:facet name="header">
+
+ <h:outputText
styleClass="headerText" value="Make" />
+
+</f:facet>
+
+ <h:outputText value="#{category.make}" />
+
+ </rich:column>
+ <rich:column width="400px">
+
+ <f:facet name="header">
+<s:div>
+<h:outputText styleClass="headerText" value="Model" />
+</s:div>
+</f:facet>
+ <h:outputText value="#{category.model}" />
+
+ </rich:column>
+ <rich:column width="500px">
+
+ <f:facet name="header">
+<s:div>
+<h:outputText styleClass="headerText" value="Price" />
+</s:div></f:facet>
+ <h:outputText value="#{category.price}" />
+
+ </rich:column>
+ <rich:column width="400px">
+
+ <f:facet name="header"><s:div><h:outputText
styleClass="headerText" value="Mileage"
/></s:div></f:facet>
+ <h:outputText value="#{category.mileage}" />
+
+ </rich:column>
+ <rich:column width="200px" >
+
+ <f:facet name="header"><s:div><h:outputText
styleClass="headerText" value="VIN"
/></s:div></f:facet>
+ <h:outputText value="#{category.vin}" />
+
+ </rich:column>
+ <rich:column >
+
+ <f:facet name="header"><s:div><h:outputText
styleClass="headerText" value="Stock"
/></s:div></f:facet>
+ <h:outputText value="#{category.stock}" />
+
+ </rich:column>
+ </rich:scrollableDataTable>
+ <rich:spacer height="20px"/>
+ <a4j:commandButton value="Show Current Selection"
reRender="table"
+ action="#{dataTableScrollerBean.takeSelection}"
+ oncomplete="javascript:Richfaces.showModalPanel('panel');"/>
+ <a4j:commandButton value="test"
reRender="carList2" />
+</rich:simpleTogglePanel>
+ </h:form>
+
+</ui:composition>
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/scrollableDataTable.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/scrollableDataTable.xhtml 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/examples/scrollableDataTable.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -12,7 +12,7 @@
overflow:auto;
}
</style>
- <h:form>
+ <h:form id="form">
<rich:spacer height="30" />
<rich:scrollableDataTable rowKeyVar="rkv" frozenColCount="1"
height="400px"
width="700px" id="carList" rows="40"
columnClasses="col"
@@ -83,4 +83,4 @@
</rich:dataTable>
</h:panelGroup>
</rich:modalPanel>
-</ui:composition>
\ No newline at end of file
+</ui:composition>
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen1.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen1.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen1.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -0,0 +1,27 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+
+ <p>Reproducer for <a
href="https://issues.jboss.org/browse/RF-1107">RF-1107 Scrollable dataTable.
Header scrolled badly on TAB button.</a></p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Scrollable DataTable
example</legend>
+ <div class="sample-container">
+ <ui:include
src="/richfaces/scrollableDataTable/examples/frozen1.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/scrollableDataTable/examples/frozen1.xhtml"/>
+ <ui:param name="openlabel" value="View Source" />
+ </ui:include>
+ </div>
+ </fieldset>
+
+ </ui:define>
+</ui:composition>
+</html>
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen2.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen2.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/frozen2.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -0,0 +1,27 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+
+ <p>Reproducer for <a
href="https://issues.jboss.org/browse/RF-1107">RF-1107 Scrollable dataTable.
Header scrolled badly on TAB button.</a></p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Scrollable DataTable
example</legend>
+ <div class="sample-container">
+ <ui:include
src="/richfaces/scrollableDataTable/examples/frozen2.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/scrollableDataTable/examples/frozen2.xhtml"/>
+ <ui:param name="openlabel" value="View Source" />
+ </ui:include>
+ </div>
+ </fieldset>
+
+ </ui:define>
+</ui:composition>
+</html>
Added:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/rerender.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/rerender.xhtml
(rev 0)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable/rerender.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -0,0 +1,27 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+
+ <p>Reproducer for <a
href="https://issues.jboss.org/browse/RF-13446">RF-13446 Unspecified
javascript error occurs when clicking a4j:commandButton to rerender
rich:scrollableDataTable inside rich:simpleTogglePanel</a></p>
+
+ <fieldset class="demo_fieldset">
+ <legend class="demo_legend">Scrollable DataTable
example</legend>
+ <div class="sample-container">
+ <ui:include
src="/richfaces/scrollableDataTable/examples/rerender.xhtml"/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath"
value="/richfaces/scrollableDataTable/examples/rerender.xhtml"/>
+ <ui:param name="openlabel" value="View Source" />
+ </ui:include>
+ </div>
+ </fieldset>
+
+ </ui:define>
+</ui:composition>
+</html>
Modified:
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable.xhtml
===================================================================
---
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable.xhtml 2014-01-20
11:00:42 UTC (rev 23285)
+++
branches/enterprise/3.3.1.SP4/samples/richfaces-demo/src/main/webapp/richfaces/scrollableDataTable.xhtml 2014-01-21
07:19:38 UTC (rev 23286)
@@ -7,7 +7,25 @@
<ui:composition template="/templates/main.xhtml">
<ui:define name="title">RichFaces - Open Source Rich JSF Components -
Scrollable Data Table</ui:define>
<ui:define name="body">
- <ui:include src="/templates/include/tab-panel.xhtml" />
+ <rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab"
selectedTab="#{componentNavigator.currentComponent.activeTab}"
valueChangeListener="#{componentNavigator.tabPanelSwitched}">
+ <rich:tab label="Usage" name="usage">
+ <ui:include src="/richfaces/scrollableDataTable/usage.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Rerender Reproducer"
name="rf13446">
+ <ui:include src="/richfaces/scrollableDataTable/rerender.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Frozen Columns Reproducer 1"
name="rf1107-1">
+ <ui:include src="/richfaces/scrollableDataTable/frozen1.xhtml"/>
+ </rich:tab>
+ <rich:tab label="Frozen Columns Reproducer 2"
name="rf1107-2">
+ <ui:include src="/richfaces/scrollableDataTable/frozen2.xhtml"/>
+ </rich:tab>
+ <rich:tab name="info" label="Tag
Information">
+ <rich:insert
+
src="/WEB-INF/#{componentNavigator.currentComponent.tagInfoLocation}"
+
errorContent="/templates/include/tagInfoNotes.xhtml" />
+ </rich:tab>
+ </rich:tabPanel>
</ui:define>
</ui:composition>
</html>