<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
	<f:subview id="dataScrollerID">
		<h:form dir="DSform">

			<h:dataTable id="dataTableId" value="#{dataScroller.dataTable}"
				var="dT" cellpadding="5px" rows="5" border="1">
				<f:facet name="header">
					<rich:datascroller fastControls="#{dataScroller.fastControls}"
						align="#{dataScroller.align}" rendered="#{dataScroller.render}"
						limitToList="#{dataScroller.limitToList}"
						renderIfSinglePage="#{dataScroller.renderIfSinglePage}"
						maxPages="#{dataScroller.maxPages}"
						scrollerListener="#{dataScroller.ScrollerListener}" />
				</f:facet>
				<h:column>
					<h:outputText value="#{dT.data0}" />
				</h:column>
				<h:column>
					<h:outputText value="#{dT.data1}" />
				</h:column>

			</h:dataTable>
			<h:commandButton action="#{dataScroller.CutArray}" value="CutArray" />
			<h:commandButton action="#{dataScroller.RestoreArray}"
				value="RestoreArray" />

			<h:panelGrid columns="2">
				<h:outputText value="maxPages" />
				<h:inputText value="#{dataScroller.maxPages}">
					<a4j:support event="onchange" reRender="dataScrollerID"></a4j:support>
				</h:inputText>

				<h:outputText value="Rendered:" />
				<h:selectBooleanCheckbox value="#{dataScroller.render}"
					onclick="submit();" />

				<h:outputText value="renderIfSinglePage:" />
				<h:selectBooleanCheckbox value="#{dataScroller.renderIfSinglePage}"
					onclick="submit();" />

				<h:outputText value="limitToList:" />
				<h:selectBooleanCheckbox value="#{dataScroller.limitToList}"
					onclick="submit();" />

				<h:outputText value="fastControls" />
				<h:selectOneRadio value="#{dataScroller.fastControls}">
					<f:selectItem itemLabel="auto" itemValue="auto" />
					<f:selectItem itemLabel="show" itemValue="show" />
					<f:selectItem itemLabel="hide" itemValue="hide" />
					<a4j:support event="onclick" reRender="dataTableId"></a4j:support>
				</h:selectOneRadio>

				<h:outputText value="align" />
				<h:selectOneRadio value="#{dataScroller.align}">
					<f:selectItem itemLabel="left" itemValue="left" />
					<f:selectItem itemLabel="right" itemValue="right" />
					<f:selectItem itemLabel="center" itemValue="center" />
					<a4j:support event="onclick" reRender="dataTableId"></a4j:support>
				</h:selectOneRadio>

			</h:panelGrid>
			<h:commandLink value="Back" action="main"></h:commandLink>
		</h:form>
	</f:subview>

