Author: nbelaevski
Date: 2007-08-31 20:21:05 -0400 (Fri, 31 Aug 2007)
New Revision: 2680
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
Log:
http://jira.jboss.com/jira/browse/RF-798 fixed
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
---
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-09-01
00:20:02 UTC (rev 2679)
+++
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-09-01
00:21:05 UTC (rev 2680)
@@ -21,71 +21,50 @@
package org.richfaces.renderkit.html;
-import org.ajax4jsf.javascript.JSFunction;
-import org.ajax4jsf.renderkit.AjaxRendererUtils;
-import org.ajax4jsf.renderkit.ComponentVariables;
-import org.ajax4jsf.renderkit.ComponentsVariableResolver;
-import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
-import org.richfaces.component.UIDatascroller;
-import org.richfaces.event.DataScrollerEvent;
+import java.io.IOException;
+import java.util.Map;
import javax.faces.component.UIComponent;
import javax.faces.component.UIData;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.event.PhaseId;
-import java.io.IOException;
-import java.util.Map;
+import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.renderkit.AjaxRendererUtils;
+import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.richfaces.component.UIDatascroller;
+import org.richfaces.event.DataScrollerEvent;
+
public class DataScrollerRenderer extends HeaderResourcesRendererBase {
protected Class getComponentClass() {
return UIDatascroller.class;
}
-
- public void encodeBegin(FacesContext context, UIComponent component)
- throws IOException {
-
- UIDatascroller scroller = (UIDatascroller) component;
-
- UIData dataTable = scroller.getDataTable();
-
- ComponentVariables variables = ComponentsVariableResolver.getVariables(
- this, component);
- variables.setVariable("dataTable", dataTable);
- if (scroller.isRendered()) {
- variables.setVariable("rendered", Boolean.TRUE);
- super.encodeBegin(context, component);
- }
+
+ protected boolean isRenderedOnSinglePage(UIDatascroller scroller, UIData dataTable)
{
+ return (scroller.getPageCount(dataTable) != 1 ||
scroller.isRenderIfSinglePage());
}
- public void encodeEnd(FacesContext context, UIComponent component)
- throws IOException {
- ComponentVariables variables = ComponentsVariableResolver.getVariables(
- this, component);
-
- if (Boolean.TRUE.equals(variables.getVariable("rendered"))) {
- super.encodeEnd(context, component);
- }
- }
-
public void doDecode(FacesContext context, UIComponent component) {
- String param = (String) getParamMap(context).get(
- component.getClientId(context));
UIDatascroller scroller = (UIDatascroller) component;
- if (param != null) {
- DataScrollerEvent event = new DataScrollerEvent(scroller,
- String.valueOf(scroller.getPageIndex()), param);
- if (scroller.isImmediate()) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else {
- event.setPhaseId(PhaseId.INVOKE_APPLICATION);
- }
+ if (isRenderedOnSinglePage(scroller, scroller.getDataTable())) {
+ String param = (String) getParamMap(context).get(
+ component.getClientId(context));
+ if (param != null) {
+ DataScrollerEvent event = new DataScrollerEvent(scroller,
+ String.valueOf(scroller.getPageIndex()), param);
+ if (scroller.isImmediate()) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else {
+ event.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
- component.queueEvent(event);
+ component.queueEvent(event);
+ }
}
}
@@ -179,12 +158,8 @@
return controlsState;
}
- public void renderPager(FacesContext context, UIComponent component)
+ public void renderPager(FacesContext context, UIComponent component, UIData data)
throws IOException {
- ComponentVariables variables = ComponentsVariableResolver.getVariables(
- this, component);
- UIData data = (UIData) variables.getVariable("dataTable");
-
ResponseWriter out = context.getResponseWriter();
UIDatascroller scroller = (UIDatascroller) component;
int currentPage = scroller.getPageIndex(data);
@@ -258,13 +233,8 @@
}
- public void renderPages(FacesContext context, UIComponent component)
+ public void renderPages(FacesContext context, UIComponent component, UIData data)
throws IOException {
- ComponentVariables variables = ComponentsVariableResolver.getVariables(
- this, component);
- UIData data = (UIData) variables.getVariable("dataTable");
-
- ResponseWriter out = context.getResponseWriter();
UIDatascroller scroller = (UIDatascroller) component;
int currentPage = scroller.getPageIndex(data);
Modified: trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
---
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-09-01
00:20:02 UTC (rev 2679)
+++
trunk/ui/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-09-01
00:21:05 UTC (rev 2680)
@@ -20,302 +20,327 @@
<jsp:scriptlet>
<![CDATA[org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
</jsp:scriptlet>
- <div id="#{clientId}"
- x:passThruWithExclusions="value,name,type,id,styleClass,class"
- class="dr-dscr rich-datascr
#{component.attributes['styleClass']}">
- <table id="#{clientId}_table"
align="#{component.attributes['align']}" border="0"
cellpadding="0" cellspacing="1" class="dr-dscr-t
rich-dtascroller-table #{component.attributes['tableStyleClass']}">
- <tbody>
- <tr>
- <jsp:scriptlet><![CDATA[
- String facet;
- org.richfaces.renderkit.html.ControlsState controlsState =
getControlsState(context, component,
- (javax.faces.component.UIData)
variables.getVariable("dataTable"));
-
- if (controlsState.isFirstRendered()){
- if (controlsState.isFirstEnabled()){
- variables.setVariable("buttonClass", "");
- variables.setVariable("onclick",
getOnClick(context,component,component.FIRST_FACET_NAME));
- variables.setVariable("facet", component.FIRST_FACET_NAME);
- facet=component.FIRST_FACET_NAME;
- }else{
- variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
- variables.setVariable("onclick", "");
- variables.setVariable("facet",
component.FIRST_DISABLED_FACET_NAME);
- facet=component.FIRST_DISABLED_FACET_NAME;
- };
- if(component.getFacet(facet)!=null ) {
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet>
- <![CDATA[if(component.FIRST_FACET_NAME.equals(facet)){]]>
- </jsp:scriptlet>
- <u:insertFacet name="first"/>
- <jsp:scriptlet>
- <![CDATA[}else{]]>
- </jsp:scriptlet>
- <u:insertFacet name="first_disabled"/>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }else{
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet><![CDATA[
- writer.write("««");
- ]]></jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }
- if (controlsState.isControlsSeparatorRendered() &&
- (controlsState.isFastRewindRendered() ||
controlsState.isPreviousRendered())) {
- ]]></jsp:scriptlet>
- <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
- <jsp:scriptlet><![CDATA[
- }
- }
- ]]></jsp:scriptlet>
- <jsp:scriptlet><![CDATA[
- if (controlsState.isFastRewindRendered()){
- if (controlsState.isFastRewindEnabled()){
- variables.setVariable("buttonClass", "");
- variables.setVariable("onclick",
getOnClick(context,component,component.FAST_REWIND_FACET_NAME));
- variables.setVariable("facet",
component.FAST_REWIND_FACET_NAME);
- facet=component.FAST_REWIND_FACET_NAME;
- }else{
- variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
- variables.setVariable("onclick", "");
- variables.setVariable("facet",
component.FAST_REWIND_DISABLED_FACET_NAME);
- facet=component.FAST_REWIND_DISABLED_FACET_NAME;
- }
- if(component.getFacet(facet)!=null ) {
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet>
- <![CDATA[if(component.FAST_REWIND_FACET_NAME.equals(facet)){]]>
- </jsp:scriptlet>
- <u:insertFacet name="fastrewind"/>
- <jsp:scriptlet>
- <![CDATA[}else{]]>
- </jsp:scriptlet>
- <u:insertFacet name="fastrewind_disabled"/>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }else{
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet><![CDATA[
- writer.write("«");
- ]]></jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }
-
- if (controlsState.isControlsSeparatorRendered() &&
controlsState.isPreviousRendered()) {
- ]]></jsp:scriptlet>
- <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
- <jsp:scriptlet><![CDATA[
- }
- }
- ]]></jsp:scriptlet>
-
- <jsp:scriptlet><![CDATA[
- if (controlsState.isPreviousRendered()){
- if (controlsState.isPreviousEnabled()){
- variables.setVariable("buttonClass", "");
- variables.setVariable("onclick",
getOnClick(context,component,component.PREVIOUS_FACET_NAME));
- variables.setVariable("facet",
component.PREVIOUS_FACET_NAME);
- facet=component.PREVIOUS_FACET_NAME;
- }else{
- variables.setVariable("onclick", "");
- variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
- variables.setVariable("facet",
component.PREVIOUS_DISABLED_FACET_NAME);
- facet=component.PREVIOUS_DISABLED_FACET_NAME;
- }
- if(component.getFacet(facet)!=null ) {
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet>
- <![CDATA[if(component.PREVIOUS_FACET_NAME.equals(facet)){]]>
- </jsp:scriptlet>
- <u:insertFacet name="previous"/>
- <jsp:scriptlet>
- <![CDATA[}else{]]>
- </jsp:scriptlet>
- <u:insertFacet name="previous_disabled"/>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }else{
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- </td>
- <jsp:scriptlet><![CDATA[
- }
- }
- ]]></jsp:scriptlet>
+ <c:object var="singlePageRenderStyle" type="java.lang.String"
/>
- <jsp:scriptlet><![CDATA[
- UIComponent pagesFacet = component.getFacet("pages");
- if (pagesFacet !=null && pagesFacet.isRendered()) {
- renderPages(context,component);
- ]]></jsp:scriptlet>
- <td>
- <jsp:scriptlet><![CDATA[
- renderChild(context, pagesFacet);
- ]]></jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- } else {
- renderPager(context,component);
- }
- ]]></jsp:scriptlet>
+ <jsp:scriptlet>
+ <![CDATA[
+ javax.faces.component.UIData dataTable = component.getDataTable();
+ boolean singlePageRender = true;
+
+ if (!isRenderedOnSinglePage(component, dataTable)) {
+ singlePageRenderStyle = "; display: none";
+ singlePageRender = false;
+ }
+ ]]>
+ </jsp:scriptlet>
- <jsp:scriptlet><![CDATA[
- if (controlsState.isNextRendered()){
- if (controlsState.isNextEnabled()){
- variables.setVariable("onclick",
getOnClick(context,component,component.NEXT_FACET_NAME));
- variables.setVariable("buttonClass", "");
- variables.setVariable("facet", component.NEXT_FACET_NAME);
- facet=component.NEXT_FACET_NAME;
- }else{
- variables.setVariable("onclick", "");
- variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
- variables.setVariable("facet",
component.NEXT_DISABLED_FACET_NAME);
- facet=component.NEXT_DISABLED_FACET_NAME;
- }
- if(component.getFacet(facet)!=null ) {
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet>
- <![CDATA[if(component.NEXT_FACET_NAME.equals(facet)){]]>
- </jsp:scriptlet>
- <u:insertFacet name="next"/>
- <jsp:scriptlet>
- <![CDATA[}else{]]>
- </jsp:scriptlet>
- <u:insertFacet name="next_disabled"/>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }else{
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- </td>
- <jsp:scriptlet><![CDATA[
- }
-
- if (controlsState.isControlsSeparatorRendered() &&
- (controlsState.isFastForwardRendered() ||
controlsState.isLastRendered())) {
- ]]></jsp:scriptlet>
- <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
- <jsp:scriptlet><![CDATA[
- }
- }
- ]]></jsp:scriptlet>
-
- <jsp:scriptlet><![CDATA[
- if (controlsState.isFastForwardRendered()){
- if (controlsState.isFastForwardEnabled()){
- variables.setVariable("onclick",
getOnClick(context,component,component.FAST_FORWARD_FACET_NAME));
- variables.setVariable("buttonClass", "");
- variables.setVariable("facet",
component.FAST_FORWARD_FACET_NAME);
- facet=component.FAST_FORWARD_FACET_NAME;
- }
- else{
- variables.setVariable("onclick", "");
- variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
- variables.setVariable("facet",
component.FAST_FORWARD_DISABLED_FACET_NAME);
- facet=component.FAST_FORWARD_DISABLED_FACET_NAME;
- }
- if(component.getFacet(facet)!=null ) {
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet>
- <![CDATA[if(component.FAST_FORWARD_FACET_NAME.equals(facet)){]]>
- </jsp:scriptlet>
- <u:insertFacet name="fastforward"/>
- <jsp:scriptlet>
- <![CDATA[}else{]]>
- </jsp:scriptlet>
- <u:insertFacet name="fastforward_disabled"/>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }else{
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet><![CDATA[
- writer.write("»");
- ]]></jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }
-
- if (controlsState.isControlsSeparatorRendered() &&
controlsState.isLastRendered()) {
- ]]></jsp:scriptlet>
- <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
- <jsp:scriptlet><![CDATA[
- }
- }
- ]]></jsp:scriptlet>
-
- <jsp:scriptlet><![CDATA[
- if (controlsState.isLastRendered()){
- if (controlsState.isLastEnabled()){
- variables.setVariable("onclick",
getOnClick(context,component,component.LAST_FACET_NAME));
- variables.setVariable("buttonClass", "");
- variables.setVariable("facet", component.LAST_FACET_NAME);
- facet=component.LAST_FACET_NAME;
- }else{
- variables.setVariable("onclick", "");
- variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
- variables.setVariable("facet",
component.LAST_DISABLED_FACET_NAME);
- facet=component.LAST_DISABLED_FACET_NAME;
- }
- if(component.getFacet(facet)!=null ) {
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet>
- <![CDATA[if(component.LAST_FACET_NAME.equals(facet)){]]>
- </jsp:scriptlet>
- <u:insertFacet name="last"/>
- <jsp:scriptlet>
- <![CDATA[}else{]]>
- </jsp:scriptlet>
- <u:insertFacet name="last_disabled"/>
- <jsp:scriptlet>
- <![CDATA[}]]>
- </jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }else{
- ]]></jsp:scriptlet>
- <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
- <jsp:scriptlet><![CDATA[
- writer.write("»»");
- ]]></jsp:scriptlet>
- </td>
- <jsp:scriptlet><![CDATA[
- }
- }
- ]]></jsp:scriptlet>
- </tr>
- <vcp:body>
- </vcp:body>
- </tbody>
- </table>
+ <div id="#{clientId}"
+ x:passThruWithExclusions="value,name,type,id,styleClass,class,style"
+ style="#{component.attributes['style']} #{singlePageRenderStyle}"
+ class="dr-dscr rich-datascr
#{component.attributes['styleClass']}">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ if (singlePageRender) {
+ ]]>
+ </jsp:scriptlet>
+
+ <table id="#{clientId}_table"
align="#{component.attributes['align']}" border="0"
cellpadding="0" cellspacing="1" class="dr-dscr-t
rich-dtascroller-table #{component.attributes['tableStyleClass']}">
+ <tbody>
+ <tr>
+ <jsp:scriptlet><![CDATA[
+ String facet;
+ org.richfaces.renderkit.html.ControlsState controlsState =
getControlsState(context, component, dataTable);
+
+ if (controlsState.isFirstRendered()){
+ if (controlsState.isFirstEnabled()){
+ variables.setVariable("buttonClass", "");
+ variables.setVariable("onclick",
getOnClick(context,component,component.FIRST_FACET_NAME));
+ variables.setVariable("facet", component.FIRST_FACET_NAME);
+ facet=component.FIRST_FACET_NAME;
+ }else{
+ variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
+ variables.setVariable("onclick", "");
+ variables.setVariable("facet",
component.FIRST_DISABLED_FACET_NAME);
+ facet=component.FIRST_DISABLED_FACET_NAME;
+ };
+ if(component.getFacet(facet)!=null ) {
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.FIRST_FACET_NAME.equals(facet)){]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="first"/>
+ <jsp:scriptlet>
+ <![CDATA[}else{]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="first_disabled"/>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }else{
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet><![CDATA[
+ writer.write("««");
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+ if (controlsState.isControlsSeparatorRendered() &&
+ (controlsState.isFastRewindRendered() ||
controlsState.isPreviousRendered())) {
+ ]]></jsp:scriptlet>
+ <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
+ <jsp:scriptlet><![CDATA[
+ }
+ }
+ ]]></jsp:scriptlet>
+ <jsp:scriptlet><![CDATA[
+ if (controlsState.isFastRewindRendered()){
+ if (controlsState.isFastRewindEnabled()){
+ variables.setVariable("buttonClass", "");
+ variables.setVariable("onclick",
getOnClick(context,component,component.FAST_REWIND_FACET_NAME));
+ variables.setVariable("facet",
component.FAST_REWIND_FACET_NAME);
+ facet=component.FAST_REWIND_FACET_NAME;
+ }else{
+ variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
+ variables.setVariable("onclick", "");
+ variables.setVariable("facet",
component.FAST_REWIND_DISABLED_FACET_NAME);
+ facet=component.FAST_REWIND_DISABLED_FACET_NAME;
+ }
+ if(component.getFacet(facet)!=null ) {
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.FAST_REWIND_FACET_NAME.equals(facet)){]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="fastrewind"/>
+ <jsp:scriptlet>
+ <![CDATA[}else{]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="fastrewind_disabled"/>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }else{
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet><![CDATA[
+ writer.write("«");
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+
+ if (controlsState.isControlsSeparatorRendered() &&
controlsState.isPreviousRendered()) {
+ ]]></jsp:scriptlet>
+ <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
+ <jsp:scriptlet><![CDATA[
+ }
+ }
+ ]]></jsp:scriptlet>
+
+ <jsp:scriptlet><![CDATA[
+ if (controlsState.isPreviousRendered()){
+ if (controlsState.isPreviousEnabled()){
+ variables.setVariable("buttonClass", "");
+ variables.setVariable("onclick",
getOnClick(context,component,component.PREVIOUS_FACET_NAME));
+ variables.setVariable("facet",
component.PREVIOUS_FACET_NAME);
+ facet=component.PREVIOUS_FACET_NAME;
+ }else{
+ variables.setVariable("onclick", "");
+ variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
+ variables.setVariable("facet",
component.PREVIOUS_DISABLED_FACET_NAME);
+ facet=component.PREVIOUS_DISABLED_FACET_NAME;
+ }
+ if(component.getFacet(facet)!=null ) {
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.PREVIOUS_FACET_NAME.equals(facet)){]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="previous"/>
+ <jsp:scriptlet>
+ <![CDATA[}else{]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="previous_disabled"/>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }else{
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+ }
+ ]]></jsp:scriptlet>
+
+ <jsp:scriptlet><![CDATA[
+ UIComponent pagesFacet = component.getFacet("pages");
+ if (pagesFacet !=null && pagesFacet.isRendered()) {
+ renderPages(context,component,dataTable);
+ ]]></jsp:scriptlet>
+ <td>
+ <jsp:scriptlet><![CDATA[
+ renderChild(context, pagesFacet);
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ } else {
+ renderPager(context,component,dataTable);
+ }
+ ]]></jsp:scriptlet>
+
+ <jsp:scriptlet><![CDATA[
+ if (controlsState.isNextRendered()){
+ if (controlsState.isNextEnabled()){
+ variables.setVariable("onclick",
getOnClick(context,component,component.NEXT_FACET_NAME));
+ variables.setVariable("buttonClass", "");
+ variables.setVariable("facet", component.NEXT_FACET_NAME);
+ facet=component.NEXT_FACET_NAME;
+ }else{
+ variables.setVariable("onclick", "");
+ variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
+ variables.setVariable("facet",
component.NEXT_DISABLED_FACET_NAME);
+ facet=component.NEXT_DISABLED_FACET_NAME;
+ }
+ if(component.getFacet(facet)!=null ) {
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.NEXT_FACET_NAME.equals(facet)){]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="next"/>
+ <jsp:scriptlet>
+ <![CDATA[}else{]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="next_disabled"/>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }else{
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+
+ if (controlsState.isControlsSeparatorRendered() &&
+ (controlsState.isFastForwardRendered() ||
controlsState.isLastRendered())) {
+ ]]></jsp:scriptlet>
+ <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
+ <jsp:scriptlet><![CDATA[
+ }
+ }
+ ]]></jsp:scriptlet>
+
+ <jsp:scriptlet><![CDATA[
+ if (controlsState.isFastForwardRendered()){
+ if (controlsState.isFastForwardEnabled()){
+ variables.setVariable("onclick",
getOnClick(context,component,component.FAST_FORWARD_FACET_NAME));
+ variables.setVariable("buttonClass", "");
+ variables.setVariable("facet",
component.FAST_FORWARD_FACET_NAME);
+ facet=component.FAST_FORWARD_FACET_NAME;
+ }
+ else{
+ variables.setVariable("onclick", "");
+ variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
+ variables.setVariable("facet",
component.FAST_FORWARD_DISABLED_FACET_NAME);
+ facet=component.FAST_FORWARD_DISABLED_FACET_NAME;
+ }
+ if(component.getFacet(facet)!=null ) {
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.FAST_FORWARD_FACET_NAME.equals(facet)){]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="fastforward"/>
+ <jsp:scriptlet>
+ <![CDATA[}else{]]>
+ </jsp:scriptlet>
+ <u:insertFacet
name="fastforward_disabled"/>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }else{
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet><![CDATA[
+ writer.write("»");
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+
+ if (controlsState.isControlsSeparatorRendered() &&
controlsState.isLastRendered()) {
+ ]]></jsp:scriptlet>
+ <td class="dr-dscr-sepctrl
rich-datascr-ctrls-separator"><u:insertFacet name="controlsSeparator"
/></td>
+ <jsp:scriptlet><![CDATA[
+ }
+ }
+ ]]></jsp:scriptlet>
+
+ <jsp:scriptlet><![CDATA[
+ if (controlsState.isLastRendered()){
+ if (controlsState.isLastEnabled()){
+ variables.setVariable("onclick",
getOnClick(context,component,component.LAST_FACET_NAME));
+ variables.setVariable("buttonClass", "");
+ variables.setVariable("facet", component.LAST_FACET_NAME);
+ facet=component.LAST_FACET_NAME;
+ }else{
+ variables.setVariable("onclick", "");
+ variables.setVariable("buttonClass",
"dr-dscr-button-dsbld rich-datascr-button-dsbld");
+ variables.setVariable("facet",
component.LAST_DISABLED_FACET_NAME);
+ facet=component.LAST_DISABLED_FACET_NAME;
+ }
+ if(component.getFacet(facet)!=null ) {
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet>
+ <![CDATA[if(component.LAST_FACET_NAME.equals(facet)){]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="last"/>
+ <jsp:scriptlet>
+ <![CDATA[}else{]]>
+ </jsp:scriptlet>
+ <u:insertFacet name="last_disabled"/>
+ <jsp:scriptlet>
+ <![CDATA[}]]>
+ </jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }else{
+ ]]></jsp:scriptlet>
+ <td class="#{buttonClass} dr-dscr-button
rich-datascr-button" onclick="#{onclick}">
+ <jsp:scriptlet><![CDATA[
+ writer.write("»»");
+ ]]></jsp:scriptlet>
+ </td>
+ <jsp:scriptlet><![CDATA[
+ }
+ }
+ ]]></jsp:scriptlet>
+ </tr>
+ </tbody>
+ </table>
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
</div>
</f:root>
\ No newline at end of file