myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r578858 - /myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java
Date Mon, 24 Sep 2007 15:45:07 GMT
Author: awiner
Date: Mon Sep 24 08:45:07 2007
New Revision: 578858

URL: http://svn.apache.org/viewvc?rev=578858&view=rev
Log:
TRINIDAD-674: Component selectRangeChoiceBar not properly rendered
TRINIDAD-676: Component selectRangeChoiceBar not properly rendered (2nd issue)
- Check in two fixes from Tomas Havelka for selectRangeChoiceBar against an unknown row count

Modified:
    myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java

Modified: myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java?rev=578858&r1=578857&r2=578858&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java
(original)
+++ myfaces/trinidad/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SelectRangeChoiceBarRenderer.java
Mon Sep 24 08:45:07 2007
@@ -371,7 +371,7 @@
       if (hasNextRecords && (maxValue == XhtmlConstants.MAX_VALUE_UNKNOWN))
       {
         // make sure the next range exists in the data model.
-        hasNextRecords = isRowAvailable(component, (int)nextValue);
+        hasNextRecords = isRowAvailable(component, (int)nextValue-1);
       }
 
       boolean showBackButton = hasBackRecords || showDisabledNavigation;
@@ -936,9 +936,9 @@
     String              id) throws IOException
   {
     String text = getBlockString(arc, isNext, records);
-
+    boolean isEnabled = ((onclick != null) && (records > 0));
     ResponseWriter writer = context.getResponseWriter();
-    if (records > 0)
+    if (isEnabled)
     {
       writer.startElement("a", null);
       writer.writeURIAttribute("href", "#", null);
@@ -964,7 +964,7 @@
 
     writer.writeText(text, null);
 
-    if (records > 0)
+    if (isEnabled)
     {
       writer.endElement("a");
     }



Mime
View raw message