You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/02/01 21:17:31 UTC
svn commit: r374158 - in /myfaces/tomahawk/trunk/sandbox:
core/src/main/java/org/apache/myfaces/custom/selectOneRow/
core/src/main/resources-facesconfig/META-INF/ core/src/main/tld/
examples/src/main/java/org/apache/myfaces/examples/selectOneRow/ examp...
Author: mmarinschek
Date: Wed Feb 1 12:16:26 2006
New Revision: 374158
URL: http://svn.apache.org/viewcvs?rev=374158&view=rev
Log:
Added SelectOneRow component to the sandbox
this Component allows to select one row of a datatable with a radio button
Added:
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java
myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/
myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java
myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java
myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml
myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java?rev=374158&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRow.java Wed Feb 1 12:16:26 2006
@@ -0,0 +1,139 @@
+package org.apache.myfaces.custom.selectOneRow;
+
+import javax.faces.component.UIInput;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.util.Map;
+import java.io.IOException;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Ernst
+ * Date: 01.02.2006
+ * Time: 15:55:59
+ * To change this template use File | Settings | File Templates.
+ */
+public class SelectOneRow extends UIInput
+{
+ private String groupName;
+
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.SelectOneRow";
+
+ public static final String COMPONENT_FAMILY = "org.apache.myfaces.SelectOneRow";
+
+ public SelectOneRow() {
+ setRendererType(null);
+
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+
+ public void restoreState(FacesContext context, Object state) {
+
+ Object[] values = (Object[]) state;
+ super.restoreState(context, values[0]);
+ groupName = (String) values[1];
+
+ }
+
+ public Object saveState(FacesContext context) {
+ Object[] values = new Object[2];
+ values[0] = super.saveState(context);
+ values[1] = groupName;
+ return values;
+ }
+
+ public void encodeBegin(FacesContext context) throws IOException {
+
+ if (!isRendered()) {
+ return;
+ }
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ writer.write("<input class=\"selectOneRadio\" type=\"radio\" name=\"");
+ writer.write(getGroupName());
+ writer.write("\"");
+
+ writer.write(" id=\"");
+ String clientId = getClientId(context);
+ writer.write(clientId);
+ writer.write("\"");
+
+ writer.write(" value=\"");
+ writer.write(clientId);
+ writer.write("\"");
+
+ if (isRowSelected(this)) {
+ writer.write(" checked");
+ }
+
+ writer.write(" \\>");
+
+ }
+
+ private boolean isRowSelected(UIComponent component) {
+ UIInput input = (UIInput) component;
+ Object value = input.getValue();
+
+ int currentRowIndex = getCurrentRowIndex();
+
+ return (value != null)
+ && (currentRowIndex == ((Integer) value).intValue());
+
+ }
+
+ private int getCurrentRowIndex() {
+ UIData uidata = findUIData(this);
+ if (uidata == null)
+ return -1;
+ else
+ return uidata.getRowIndex();
+ }
+
+ protected UIData findUIData(UIComponent uicomponent) {
+ if (uicomponent == null)
+ return null;
+ if (uicomponent instanceof UIData)
+ return (UIData) uicomponent;
+ else
+ return findUIData(uicomponent.getParent());
+ }
+
+ public void decode(FacesContext context) {
+
+ if (!isRendered()) {
+ return;
+ }
+
+ Map requestMap = context.getExternalContext().getRequestParameterMap();
+ String postedValue;
+
+ if (requestMap.containsKey(getGroupName())) {
+ postedValue = (String) requestMap.get(getGroupName());
+ String clientId = getClientId(context);
+ if (clientId.equals(postedValue)) {
+
+ String[] postedValueArray = postedValue.split(":");
+ String rowIndex = postedValueArray[postedValueArray.length - 2];
+
+ Integer newValue = Integer.valueOf(rowIndex);
+ //the value to go in conversion&validation
+ setSubmittedValue(newValue);
+ setValid(true);
+ }
+ }
+ }
+}
Added: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java?rev=374158&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java (added)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/selectOneRow/SelectOneRowTag.java Wed Feb 1 12:16:26 2006
@@ -0,0 +1,73 @@
+package org.apache.myfaces.custom.selectOneRow;
+
+import javax.faces.webapp.UIComponentTag;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.el.ValueBinding;
+import javax.faces.application.Application;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: Ernst
+ * Date: 01.02.2006
+ * Time: 15:49:56
+ * To change this template use File | Settings | File Templates.
+ */
+public class SelectOneRowTag extends UIComponentTag
+{
+ private String groupName;
+
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ private String value;
+
+ public String getComponentType() {
+
+ return SelectOneRow.COMPONENT_TYPE;
+ }
+
+ public String getRendererType() {
+ return null;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public void setGroupName(String groupName) {
+ this.groupName = groupName;
+ }
+
+ public void release() {
+ super.release();
+ groupName = null;
+ }
+
+ protected void setProperties(UIComponent component) {
+
+ super.setProperties(component);
+ UIInput singleInputRowSelect = (UIInput) component;
+ singleInputRowSelect.getAttributes().put("groupName", groupName);
+
+ if (getValue() != null) {
+
+ if (isValueReference(getValue())) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ Application app = context.getApplication();
+ ValueBinding binding = app.createValueBinding(getValue());
+ singleInputRowSelect.setValueBinding("value",binding);
+
+ }
+
+ }
+
+ }
+}
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml?rev=374158&r1=374157&r2=374158&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml Wed Feb 1 12:16:26 2006
@@ -57,12 +57,12 @@
<component>
<component-type>org.apache.myfaces.Schedule</component-type>
<component-class>org.apache.myfaces.custom.schedule.HtmlSchedule</component-class>
- </component>
-
- <component>
- <component-type>org.apache.myfaces.Script</component-type>
- <component-class>org.apache.myfaces.custom.script.Script</component-class>
- </component>
+ </component>
+
+ <component>
+ <component-type>org.apache.myfaces.Script</component-type>
+ <component-class>org.apache.myfaces.custom.script.Script</component-class>
+ </component>
<component>
@@ -110,6 +110,10 @@
<component-class>org.apache.myfaces.custom.subform.SubForm</component-class>
</component>
+ <component>
+ <component-type>org.apache.myfaces.SelectOneRow</component-type>
+ <component-class>org.apache.myfaces.custom.selectOneRow.SelectOneRow</component-class>
+ </component>
<!-- sandbox converters -->
<converter>
@@ -150,12 +154,12 @@
<renderer-type>org.apache.myfaces.InputSuggestAjax</renderer-type>
<renderer-class>org.apache.myfaces.custom.inputsuggestajax.InputSuggestAjaxRenderer</renderer-class>
</renderer>
-
- <renderer>
- <component-family>javax.faces.Output</component-family>
- <renderer-type>org.apache.myfaces.Script</renderer-type>
- <renderer-class>org.apache.myfaces.custom.script.ScriptRenderer</renderer-class>
- </renderer>
+
+ <renderer>
+ <component-family>javax.faces.Output</component-family>
+ <renderer-type>org.apache.myfaces.Script</renderer-type>
+ <renderer-class>org.apache.myfaces.custom.script.ScriptRenderer</renderer-class>
+ </renderer>
<renderer>
<component-family>javax.faces.SelectMany</component-family>
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld?rev=374158&r1=374157&r2=374158&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld Wed Feb 1 12:16:26 2006
@@ -917,6 +917,39 @@
&ui_form_attributes;
</tag>
+ <!-- selectOneRow -->
+ <tag>
+ <name>selectOneRow</name>
+ <tag-class>org.apache.myfaces.custom.selectOneRow.SelectOneRowTag</tag-class>
+ <body-content>JSP</body-content>
+ <description>
+ Enhancement for a data-table to select one Row with a radio button.
+ The row-index is stored in the vealu-binding
+ </description>
+ <attribute>
+ <name>groupName</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>java.lang.String</type>
+ <description>The Name of the radio-button-group to use</description>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>rendered</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description>the Value-Binding to store/retrive the selected Row Index</description>
+ </attribute>
+ </tag>
<!-- <tag>
<name>messages</name>
<tag-class>org.apache.myfaces.custom.inputAjax.HtmlMessagesTag</tag-class>
Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java?rev=374158&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SelectOneRowList.java Wed Feb 1 12:16:26 2006
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.selectOneRow;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.apache.myfaces.custom.datascroller.ScrollerActionEvent;
+
+/**
+ * DOCUMENT ME!
+ * @author Ernst Fastl
+ * @version
+ */
+public class SelectOneRowList
+{
+ private List _list = new ArrayList();
+
+ private Integer _selectedRowIndex;
+
+ public Integer getSelectedRowIndex()
+ {
+ return _selectedRowIndex;
+ }
+
+ public void setSelectedRowIndex(Integer selectedRowIndex)
+ {
+ _selectedRowIndex = selectedRowIndex;
+ }
+
+ public String getSelectionMessage()
+ {
+ if(getSelectedRowIndex()==null)
+ {
+ return "Currently there is no Row selected!";
+ }
+ else
+ {
+ return "Row number: " + _selectedRowIndex.toString() + " selected!";
+ }
+ }
+
+ public SelectOneRowList()
+ {
+ for (int i = 1; i < 10; i++)
+ {
+ _list.add(new SimpleCar(i, "Car Type " + i, "blue"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "red"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "green"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "black"));
+ _list.add(new SimpleCar(i, "Car Type " + i, "white"));
+ }
+ }
+
+ public List getList()
+ {
+ return _list;
+ }
+
+ public void scrollerAction(ActionEvent event)
+ {
+ ScrollerActionEvent scrollerEvent = (ScrollerActionEvent) event;
+ FacesContext.getCurrentInstance().getExternalContext().log(
+ "scrollerAction: facet: "
+ + scrollerEvent.getScrollerfacet()
+ + ", pageindex: "
+ + scrollerEvent.getPageIndex());
+ }
+}
Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java?rev=374158&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/selectOneRow/SimpleCar.java Wed Feb 1 12:16:26 2006
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.selectOneRow;
+
+import java.io.Serializable;
+
+/**
+ * DOCUMENT ME!
+ * @author Thomas Spiegl (latest modification by $Author: werpu $)
+ * @version $Revision: 371731 $ $Date: 2006-01-24 01:18:44 +0100 (Di, 24 Jän 2006) $
+ */
+public class SimpleCar
+ implements Serializable
+{
+ /**
+ * serial id for serialisation versioning
+ */
+ private static final long serialVersionUID = 1L;
+ private int _id;
+ private String _type;
+ private String _color;
+
+ public SimpleCar(int id, String type, String color)
+ {
+ _id = id;
+ _type = type;
+ _color = color;
+ }
+
+ public int getId()
+ {
+ return _id;
+ }
+
+ public void setId(int id)
+ {
+ _id = id;
+ }
+
+ public String getType()
+ {
+ return _type;
+ }
+
+ public void setType(String type)
+ {
+ _type = type;
+ }
+
+ public String getColor()
+ {
+ return _color;
+ }
+
+ public void setColor(String color)
+ {
+ _color = color;
+ }
+}
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml?rev=374158&r1=374157&r2=374158&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml Wed Feb 1 12:16:26 2006
@@ -8,6 +8,14 @@
<faces-config>
+ <!-- managed bean for singleRowSelectList-->
+
+ <managed-bean>
+ <managed-bean-name>selectOneRowList</managed-bean-name>
+ <managed-bean-class>org.apache.myfaces.examples.selectOneRow.SelectOneRowList</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
+
<!-- managed bean for subForm-->
<managed-bean>
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp?rev=374158&r1=374157&r2=374158&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp Wed Feb 1 12:16:26 2006
@@ -32,6 +32,8 @@
<h:outputLink value="picklist.jsf"><f:verbatim>selectManyPicklist - a picklist</f:verbatim></h:outputLink>
<h:outputLink value="dateTimeConverter.jsf"><f:verbatim>DateTimeConverter - a datetime converter that uses system timezone as default</f:verbatim></h:outputLink>
<h:outputLink value="focus.jsf"><f:verbatim>Focus - a component to set a target component as the focus on page load.</f:verbatim></h:outputLink>
+ <h:outputLink value="subForm.jsf"><f:verbatim>SubForm - Partial validation and model update with SubForms</f:verbatim></h:outputLink>
+ <h:outputLink value="selectOneRow.jsf"><f:verbatim>selectOneRow - a DataTable Enhancement</f:verbatim></h:outputLink>
</h:panelGrid>
</f:view>
Added: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp?rev=374158&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp (added)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/selectOneRow.jsp Wed Feb 1 12:16:26 2006
@@ -0,0 +1,139 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
+<html>
+
+<!--
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<%@include file="inc/head.inc" %>
+
+<body>
+
+<f:view>
+
+ <h:form>
+
+
+ <h:panelGroup id="body">
+
+ <t:dataTable id="data"
+ styleClass="scrollerTable"
+ headerClass="standardTable_Header"
+ footerClass="standardTable_Header"
+ rowClasses="standardTable_Row1,standardTable_Row2"
+ columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
+ var="car"
+ value="#{selectOneRowList.list}"
+ preserveDataModel="false"
+ rows="10"
+ >
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Select"/>
+ </f:facet>
+ <s:selectOneRow groupName="selection" id="hugo" value="#{selectOneRowList.selectedRowIndex}"/>
+ </h:column>
+ <h:column>
+ <f:facet name="header">
+ </f:facet>
+ <h:outputText value="#{car.id}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Cars" />
+ </f:facet>
+ <h:outputText value="#{car.type}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="Color" />
+ </f:facet>
+ <h:outputText value="#{car.color}" />
+ </h:column>
+
+ </t:dataTable>
+
+ <h:panelGrid columns="1" styleClass="scrollerTable2" columnClasses="standardTable_ColumnCentered" >
+ <t:dataScroller id="scroll_1"
+ for="data"
+ fastStep="10"
+ pageCountVar="pageCount"
+ pageIndexVar="pageIndex"
+ styleClass="scroller"
+ paginator="true"
+ paginatorMaxPages="9"
+ paginatorTableClass="paginator"
+ paginatorActiveColumnStyle="font-weight:bold;"
+ actionListener="#{selectOneRowList.scrollerAction}"
+ >
+ <f:facet name="first" >
+ <h:outputText value="First" />
+ </f:facet>
+ <f:facet name="last">
+ <h:outputText value="Last" />
+ </f:facet>
+ <f:facet name="previous">
+ <h:outputText value="Prev" />
+ </f:facet>
+ <f:facet name="next">
+ <h:outputText value="Next" />
+ </f:facet>
+ <f:facet name="fastforward">
+ <h:outputText value="FFW" />
+ </f:facet>
+ <f:facet name="fastrewind">
+ <h:outputText value="FRW" />
+ </f:facet>
+ </t:dataScroller>
+ <t:dataScroller id="scroll_2"
+ for="data"
+ rowsCountVar="rowsCount"
+ displayedRowsCountVar="displayedRowsCountVar"
+ firstRowIndexVar="firstRowIndex"
+ lastRowIndexVar="lastRowIndex"
+ pageCountVar="pageCount"
+ immediate="true"
+ pageIndexVar="pageIndex"
+ >
+ <h:outputFormat value="#{example_messages['dataScroller_pages']}" styleClass="standard" >
+ <f:param value="#{rowsCount}" />
+ <f:param value="#{displayedRowsCountVar}" />
+ <f:param value="#{firstRowIndex}" />
+ <f:param value="#{lastRowIndex}" />
+ <f:param value="#{pageIndex}" />
+ <f:param value="#{pageCount}" />
+ </h:outputFormat>
+ </t:dataScroller>
+ <h:outputText value="#{selectOneRowList.selectionMessage}" />
+ <h:commandButton value="Select" />
+ </h:panelGrid>
+
+ </h:panelGroup>
+ </h:form>
+</f:view>
+
+<%@include file="inc/page_footer.jsp" %>
+
+</body>
+
+</html>