incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r405107 - in /incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal: renderkit/core/xhtml/NavigationLevelRenderer.java ui/laf/base/xhtml/XhtmlLafConstants.java
Date Mon, 08 May 2006 17:57:43 GMT
Author: awiner
Date: Mon May  8 10:57:42 2006
New Revision: 405107

URL: http://svn.apache.org/viewcvs?rev=405107&view=rev
Log:
Apply Matt Cooper patch for ADFFACES-3: Disabled styles for NavigationLevel hint="tabs" are
not effectively applied to the DOM Element

Modified:
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/NavigationLevelRenderer.java
    incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/laf/base/xhtml/XhtmlLafConstants.java

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/NavigationLevelRenderer.java
URL: http://svn.apache.org/viewcvs/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/NavigationLevelRenderer.java?rev=405107&r1=405106&r2=405107&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/NavigationLevelRenderer.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/renderkit/core/xhtml/NavigationLevelRenderer.java
Mon May  8 10:57:42 2006
@@ -1036,32 +1036,25 @@
     // Assign the event handlers:
     boolean isDisabled = _getBooleanFromProperty(itemData.get("isDisabled"));
     boolean isActive = _getBooleanFromProperty(itemData.get("isActive"));
-    String sectionStyleClass;
+    String sectionStyleClass1;
+    String sectionStyleClass2 = null;
     if (isActive)
     {
       if (isDisabled)
       {
-        sectionStyleClass =
-          XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_ACTIVE_DISABLED_STYLE_CLASS;
-      }
-      else
-      {
-        sectionStyleClass =
-          XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_ACTIVE_STYLE_CLASS;
+        sectionStyleClass2 = XhtmlConstants.P_AF_DISABLED;
       }
+      sectionStyleClass1 =
+        XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_ACTIVE_STYLE_CLASS;
     }
     else
     {
       if (isDisabled)
       {
-        sectionStyleClass =
-          XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_INACTIVE_DISABLED_STYLE_CLASS;
-      }
-      else
-      {
-        sectionStyleClass =
-          XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_INACTIVE_STYLE_CLASS;
+        sectionStyleClass2 = XhtmlConstants.P_AF_DISABLED;
       }
+      sectionStyleClass1 =
+        XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_INACTIVE_STYLE_CLASS;
     }
     renderStyleClass(context, arc, itemStyleClass.toString());
     String rowKey = _getPossiblyNullString(itemData.get("dataIndex"));
@@ -1086,7 +1079,8 @@
         context,
         arc,
         rw,
-        sectionStyleClass,
+        sectionStyleClass1,
+        sectionStyleClass2,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_START_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_CONTENT_STYLE_CLASS,
@@ -1103,7 +1097,8 @@
         context,
         arc,
         rw,
-        sectionStyleClass,
+        sectionStyleClass1,
+        sectionStyleClass2,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_START_JOIN_FROM_ACTIVE_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_MID_CONTENT_STYLE_CLASS,
@@ -1120,7 +1115,8 @@
         context,
         arc,
         rw,
-        sectionStyleClass,
+        sectionStyleClass1,
+        sectionStyleClass2,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_START_JOIN_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_CONTENT_STYLE_CLASS,
@@ -1137,7 +1133,8 @@
         context,
         arc,
         rw,
-        sectionStyleClass,
+        sectionStyleClass1,
+        sectionStyleClass2,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_START_JOIN_FROM_INACTIVE_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_MID_CONTENT_STYLE_CLASS,
@@ -1153,7 +1150,8 @@
       context,
       arc,
       rw,
-      sectionStyleClass,
+      sectionStyleClass1,
+      sectionStyleClass2,
       XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_MID_STYLE_CLASS,
       XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_MID_STYLE_CLASS,
       XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_MID_CONTENT_STYLE_CLASS,
@@ -1170,7 +1168,8 @@
         context,
         arc,
         rw,
-        sectionStyleClass,
+        sectionStyleClass1,
+        sectionStyleClass2,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_END_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_CONTENT_STYLE_CLASS,
@@ -1187,7 +1186,8 @@
         context,
         arc,
         rw,
-        sectionStyleClass,
+        sectionStyleClass1,
+        sectionStyleClass2,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_END_JOIN_TO_INACTIVE_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_JOIN_STYLE_CLASS,
         XhtmlConstants.AF_NAVIGATION_LEVEL_TABS_BOTTOM_END_CONTENT_STYLE_CLASS,
@@ -1206,7 +1206,8 @@
     FacesContext context,
     AdfRenderingContext arc,
     ResponseWriter rw,
-    String sectionStyleClass,
+    String sectionStyleClass1,
+    String sectionStyleClass2,
     String topStyleClass,
     String bottomStyleClass,
     String bottomContentStyleClass,
@@ -1217,7 +1218,15 @@
   {
     rw.startElement("table", null);
     OutputUtils.renderLayoutTableAttributes(context, arc, "0", null);
-    renderStyleClass(context, arc, sectionStyleClass);
+    if (sectionStyleClass2 == null)
+    {
+      renderStyleClass(context, arc, sectionStyleClass1);
+    }
+    else
+    {
+      String[] sectionStyleClasses = { sectionStyleClass1, sectionStyleClass2 };
+      renderStyleClasses(context, arc, sectionStyleClasses);
+    }
     rw.startElement("tbody", null);
     rw.startElement("tr", null);
     rw.startElement("td", null);

Modified: incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/laf/base/xhtml/XhtmlLafConstants.java
URL: http://svn.apache.org/viewcvs/incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/laf/base/xhtml/XhtmlLafConstants.java?rev=405107&r1=405106&r2=405107&view=diff
==============================================================================
--- incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/laf/base/xhtml/XhtmlLafConstants.java
(original)
+++ incubator/adffaces/trunk/adf-faces/adf-faces-impl/src/main/java/org/apache/myfaces/adfinternal/ui/laf/base/xhtml/XhtmlLafConstants.java
Mon May  8 10:57:42 2006
@@ -599,12 +599,8 @@
     "af|navigationLevelTabs";
   public static final String AF_NAVIGATION_LEVEL_TABS_ACTIVE_STYLE_CLASS =
     "af|navigationLevelTabs::tabs-active";
-  public static final String AF_NAVIGATION_LEVEL_TABS_ACTIVE_DISABLED_STYLE_CLASS =
-    "af|navigationLevelTabs::tabs-active .p_AFDisabled"; // =-= mcc FIXME is there a constant
for ".p_AFDisabled"?
   public static final String AF_NAVIGATION_LEVEL_TABS_INACTIVE_STYLE_CLASS =
     "af|navigationLevelTabs::tabs-inactive";
-  public static final String AF_NAVIGATION_LEVEL_TABS_INACTIVE_DISABLED_STYLE_CLASS =
-    "af|navigationLevelTabs::tabs-inactive .p_AFDisabled"; // =-= mcc FIXME is there a constant
for ".p_AFDisabled"?
   public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_STYLE_CLASS =
     "af|navigationLevelTabs::tabs-bottom-start";
   public static final String AF_NAVIGATION_LEVEL_TABS_BOTTOM_START_CONTENT_STYLE_CLASS =
@@ -633,6 +629,7 @@
     "af|navigationLevelTabs::tabs-start-join";
   public static final String AF_NAVIGATION_LEVEL_TABS_START_STYLE_CLASS =
     "af|navigationLevelTabs::tabs-start";
+  public static final String P_AF_DISABLED = "p_AFDisabled";
 
   // BREADCRUMBS STYLES
   // used in af:navigationPath, af:treeTable



Mime
View raw message