incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sless...@apache.org
Subject svn commit: r518847 - in /incubator/adffaces/trunk/trinidad/trinidad-impl/src: main/java/org/apache/myfaces/trinidadinternal/io/ main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/ main/java/org/apache/myfaces/trinidadinternal/renderkit/...
Date Fri, 16 Mar 2007 02:54:38 GMT
Author: slessard
Date: Thu Mar 15 19:54:37 2007
New Revision: 518847

URL: http://svn.apache.org/viewvc?view=rev&rev=518847
Log:
Applied ADFFACES-135_part1 from me. It adds a class for MIME type constants that were in some
ui package class before and move most skin selectors to SkinSelectors.java instead of splitted
among many classes of ui package like SimpleDesktopConstants and XhtmlLafConstants

Added:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MimeTypes.java
Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java?view=diff&rev=518847&r1=518846&r2=518847
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/HtmlResponseWriter.java
Thu Mar 15 19:54:37 2007
@@ -19,23 +19,19 @@
 package org.apache.myfaces.trinidadinternal.io;
 
 import java.io.IOException;
-import java.io.Writer;
 import java.io.UnsupportedEncodingException;
-
+import java.io.Writer;
 import java.util.ArrayList;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.ResponseWriter;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
 import org.apache.myfaces.trinidad.util.IntegerUtils;
-
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MimeTypes;
 import org.apache.myfaces.trinidadinternal.share.url.EncoderUtils;
 import org.apache.myfaces.trinidadinternal.share.util.CaboHttpUtils;
-
 import org.apache.myfaces.trinidadinternal.ui.io.EscapedText;
-import org.apache.myfaces.trinidadinternal.ui.io.EscapedTextFactory;
 import org.apache.myfaces.trinidadinternal.ui.io.HTMLEscapes;
 
 /**
@@ -416,7 +412,7 @@
     {
       EscapedText escapedText = (EscapedText)value;
 
-      if (EscapedTextFactory.HTML_MIME_TYPE == escapedText.getMimeType())
+      if (MimeTypes.HTML.equals(escapedText.getMimeType()))
       {
         if (isAttribute)
         {

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java?view=diff&rev=518847&r1=518846&r2=518847
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/io/XhtmlResponseWriter.java
Thu Mar 15 19:54:37 2007
@@ -19,22 +19,18 @@
 package org.apache.myfaces.trinidadinternal.io;
 
 import java.io.IOException;
-import java.io.Writer;
 import java.io.UnsupportedEncodingException;
-
+import java.io.Writer;
 import java.util.ArrayList;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.ResponseWriter;
 
-import org.apache.myfaces.trinidad.util.IntegerUtils;
-
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
+import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MimeTypes;
 import org.apache.myfaces.trinidadinternal.share.util.CaboHttpUtils;
-
 import org.apache.myfaces.trinidadinternal.ui.io.EscapedText;
-import org.apache.myfaces.trinidadinternal.ui.io.EscapedTextFactory;
 import org.apache.myfaces.trinidadinternal.ui.io.XMLEscapes;
 
 /**
@@ -361,7 +357,7 @@
     {
       EscapedText escapedText = (EscapedText)value;
 
-      if (EscapedTextFactory.HTML_MIME_TYPE == escapedText.getMimeType())
+      if (MimeTypes.HTML.equals(escapedText.getMimeType()))
       {
         if (isAttribute)
         {

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java?view=diff&rev=518847&r1=518846&r2=518847
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/skin/SimplePortletSkin.java
Thu Mar 15 19:54:37 2007
@@ -27,8 +27,6 @@
 import org.apache.myfaces.trinidadinternal.renderkit.core.skin.BaseDesktopSkin;
 import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SkinSelectors;
 import org.apache.myfaces.trinidadinternal.style.util.StyleUtils;
-import org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafConstants;
-import org.apache.myfaces.trinidadinternal.ui.laf.simple.desktop.SimpleDesktopConstants;
 
 /**
  * Skin implementation for simple portlet
@@ -117,7 +115,7 @@
     "af|selectOneChoice::label",
     "af|selectOneListbox::label",
     "af|selectOneRadio::label",
-    XhtmlLafConstants.AF_MENU_CHOICE_LABEL_STYLE_CLASS,
+    SkinSelectors.AF_MENU_CHOICE_LABEL_STYLE_CLASS,
     SkinSelectors.SHUTTLE_HEADER_STYLE_CLASS,
   };
 
@@ -170,9 +168,9 @@
     SkinSelectors.AF_TABLE_SUB_CONTROL_BAR_STYLE,
     SkinSelectors.AF_TREE_TABLE_SUB_CONTROL_BAR_STYLE,
     "OraHGridLocatorHeader",
-    SimpleDesktopConstants.AF_MENU_TABS_STYLE_CLASS,
-    SimpleDesktopConstants.AF_MENU_BAR_STYLE_CLASS,
-    SimpleDesktopConstants.AF_PANEL_SIDE_BAR_STYLE_CLASS,
+    SkinSelectors.AF_MENU_TABS_STYLE_CLASS,
+    SkinSelectors.AF_MENU_BAR_STYLE_CLASS,
+    SkinSelectors.AF_PANEL_SIDE_BAR_STYLE_CLASS,
   };
 
   // These map to 'portlet-table-body' + itself (add portlet-table-body to the style class
)
@@ -245,7 +243,7 @@
     for (int i=0; i < _PORTLET_FORM_BUTTON.length; i++)
       _STYLES_MAP.put(_PORTLET_FORM_BUTTON[i], "portlet-form-button");
 
-    _STYLES_MAP.put(XhtmlLafConstants.AF_PANEL_FORM_LABEL_CELL_STYLE_CLASS, _NULL_STYLE);
+    _STYLES_MAP.put(SkinSelectors.AF_PANEL_FORM_LABEL_CELL_STYLE_CLASS, _NULL_STYLE);
 
     // End form control mappings
     // -------------------------
@@ -255,20 +253,20 @@
     // ------------------------- //
     _STYLES_MAP.put(SkinSelectors.INLINE_ERROR_TEXT_STYLE_CLASS, "portlet-msg-error");
     _STYLES_MAP.put(SkinSelectors.INLINE_INFO_TEXT_STYLE_CLASS, "portlet-msg-info");
-    _STYLES_MAP.put(XhtmlLafConstants.PROCESS_STATUS_STYLE_CLASS, "portlet-msg-status");
-    _STYLES_MAP.put(XhtmlLafConstants.TIP_TEXT_STYLE_CLASS, "portlet-msg-info");
-    _STYLES_MAP.put(XhtmlLafConstants.TIP_LABEL_STYLE_CLASS, "portlet-msg-info");
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS,"portlet-msg-error");
-    _STYLES_MAP.put(XhtmlLafConstants.ERROR_ICON_STYLE_CLASS, "portlet-msg-error");
-    _STYLES_MAP.put(XhtmlLafConstants.INFO_ICON_STYLE_CLASS, "portlet-msg-info");
-    _STYLES_MAP.put(XhtmlLafConstants.WARNING_ICON_STYLE_CLASS, "portlet-msg-alert");
-    _STYLES_MAP.put(XhtmlLafConstants.AF_MESSAGES_HEADER_STYLE_CLASS, "portlet-msg-error"
);
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS,"portlet-msg-error");
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_LIST_STYLE_CLASS, "portlet-msg-error");
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_BODY_STYLE_CLASS, _NULL_STYLE);
-    _STYLES_MAP.put(XhtmlLafConstants.AF_MESSAGES_ERROR_STYLE_CLASS,"portlet-msg-error");
+    _STYLES_MAP.put(SkinSelectors.PROCESS_STATUS_STYLE_CLASS, "portlet-msg-status");
+    _STYLES_MAP.put(SkinSelectors.TIP_TEXT_STYLE_CLASS, "portlet-msg-info");
+    _STYLES_MAP.put(SkinSelectors.TIP_LABEL_STYLE_CLASS, "portlet-msg-info");
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS,"portlet-msg-error");
+    _STYLES_MAP.put(SkinSelectors.ERROR_ICON_STYLE_CLASS, "portlet-msg-error");
+    _STYLES_MAP.put(SkinSelectors.INFO_ICON_STYLE_CLASS, "portlet-msg-info");
+    _STYLES_MAP.put(SkinSelectors.WARNING_ICON_STYLE_CLASS, "portlet-msg-alert");
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_HEADER_STYLE_CLASS, "portlet-msg-error" );
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS,"portlet-msg-error");
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_LIST_STYLE_CLASS, "portlet-msg-error");
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_BODY_STYLE_CLASS, _NULL_STYLE);
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_ERROR_STYLE_CLASS,"portlet-msg-error");
     // just to give it the same background color as table's header.
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_MESSAGES_STYLE_CLASS, "portlet-table-header");
+    _STYLES_MAP.put(SkinSelectors.AF_MESSAGES_STYLE_CLASS, "portlet-table-header");
     // End message mappings      //
     // ------------------------- //
 
@@ -326,7 +324,7 @@
     _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1101_STYLE, _NULL_STYLE);
     _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1110_STYLE, _NULL_STYLE);
     _STYLES_MAP.put(SkinSelectors.TABLE_BORDER_1111_STYLE, _NULL_STYLE);
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_PANEL_SIDE_BAR_BODY_STYLE_CLASS, _NULL_STYLE);
+    _STYLES_MAP.put(SkinSelectors.AF_PANEL_SIDE_BAR_BODY_STYLE_CLASS, _NULL_STYLE);
     // End table mappings
     // -------------------
 
@@ -345,7 +343,7 @@
 
     _STYLES_MAP.put(SkinSelectors.IN_CONTEXT_TEXT_STYLE_CLASS, _PORTLET_FONT_DIM);
     _STYLES_MAP.put(SkinSelectors.LINK_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
-    _STYLES_MAP.put(XhtmlLafConstants.DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
+    _STYLES_MAP.put(SkinSelectors.DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
     _STYLES_MAP.put(SkinSelectors.AF_SELECT_INPUT_DATE_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
     _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_DISABLED_STYLE_CLASS, _PORTLET_FONT_DIM);
 
@@ -356,8 +354,8 @@
     // keep boldness and alignment
     _STYLES_MAP.put("AFDataNumberDisabled", "portlet-font-dim AFDataNumberDisabled");
     _STYLES_MAP.put("AFFieldNumberDisabled", "portlet-font-dim AFFieldNumberDisabled");
-    _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,"portlet-font-dim
" +
-    StyleUtils.convertToValidSelector(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS));
+    _STYLES_MAP.put(SkinSelectors.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,"portlet-font-dim
" +
+    StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS));
 
 
     // end portlet-font-dim mappings
@@ -374,8 +372,8 @@
     _STYLES_MAP.put("AFAddressFieldText", _PORTLET_FONT);
     // We want to keep certain aspects of these styles:
     // keep boldness
-    _STYLES_MAP.put(XhtmlLafConstants.DATA_TEXT_STYLE_CLASS,
-        "portlet-font " + XhtmlLafConstants.DATA_TEXT_STYLE_CLASS);
+    _STYLES_MAP.put(SkinSelectors.AF_DATA_TEXT_STYLE_CLASS,
+        "portlet-font " + SkinSelectors.AF_DATA_TEXT_STYLE_CLASS);
     // keep boldness and alignment
     _STYLES_MAP.put("AFDataNumber", "portlet-font AFDataNumber");
     _STYLES_MAP.put("AFFieldNumber", "portlet-font AFFieldNumber");
@@ -397,7 +395,7 @@
     _STYLES_MAP.put(SkinSelectors.AF_PANEL_LIST_STYLE_CLASS, _PORTLET_FONT);
     _STYLES_MAP.put(SkinSelectors.AF_TRAIN_LINK_STYLE_CLASS, _PORTLET_FONT);
     _STYLES_MAP.put(SkinSelectors.LINK_STYLE_CLASS, _PORTLET_FONT);
-    _STYLES_MAP.put(XhtmlLafConstants.LINK_TEXT_STYLE_CLASS, _PORTLET_FONT);
+    _STYLES_MAP.put(SkinSelectors.LINK_TEXT_STYLE_CLASS, _PORTLET_FONT);
     _STYLES_MAP.put(SkinSelectors.AF_CHOOSE_DATE_ENABLED_STYLE_CLASS, _PORTLET_FONT);
 
     // keep boldness
@@ -421,17 +419,17 @@
     _STYLES_MAP.put(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_CONTENT_STYLE_CLASS, "portlet-font
" +
     StyleUtils.convertToValidSelector(SkinSelectors.AF_NAVIGATION_LEVEL_BAR_CONTENT_STYLE_CLASS));
     // may need padding + nowrap, so we keep the style
-    _STYLES_MAP.put(XhtmlLafConstants.AF_PANEL_PAGE_PRIVACY_STYLE_CLASS, "portlet-font "
+
-    StyleUtils.convertToValidSelector(XhtmlLafConstants.AF_PANEL_PAGE_PRIVACY_STYLE_CLASS));
-    _STYLES_MAP.put(XhtmlLafConstants.AF_PANEL_PAGE_ABOUT_STYLE_CLASS, "portlet-font " +
-    StyleUtils.convertToValidSelector(XhtmlLafConstants.AF_PANEL_PAGE_ABOUT_STYLE_CLASS));
-    _STYLES_MAP.put(XhtmlLafConstants.AF_PANEL_PAGE_COPYRIGHT_STYLE_CLASS, "portlet-font
" +
-    StyleUtils.convertToValidSelector(XhtmlLafConstants.AF_PANEL_PAGE_COPYRIGHT_STYLE_CLASS));
+    _STYLES_MAP.put(SkinSelectors.AF_PANEL_PAGE_PRIVACY_STYLE_CLASS, "portlet-font " +
+    StyleUtils.convertToValidSelector(SkinSelectors.AF_PANEL_PAGE_PRIVACY_STYLE_CLASS));
+    _STYLES_MAP.put(SkinSelectors.AF_PANEL_PAGE_ABOUT_STYLE_CLASS, "portlet-font " +
+    StyleUtils.convertToValidSelector(SkinSelectors.AF_PANEL_PAGE_ABOUT_STYLE_CLASS));
+    _STYLES_MAP.put(SkinSelectors.AF_PANEL_PAGE_COPYRIGHT_STYLE_CLASS, "portlet-font " +
+    StyleUtils.convertToValidSelector(SkinSelectors.AF_PANEL_PAGE_COPYRIGHT_STYLE_CLASS));
     // keep padding; delete color
-    _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,"portlet-font
" +
-    StyleUtils.convertToValidSelector(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS));
-    _STYLES_MAP.put(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,"portlet-font
" +
-    StyleUtils.convertToValidSelector(XhtmlLafConstants.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS));
+    _STYLES_MAP.put(SkinSelectors.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,"portlet-font
" +
+    StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS));
+    _STYLES_MAP.put(SkinSelectors.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS,"portlet-font
" +
+    StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS));
 
     // end portlet-font
     // -------------------
@@ -452,9 +450,9 @@
     _STYLES_MAP.put(SkinSelectors.AF_PANEL_HEADER_STYLE_CLASS, "portlet-section-header");
     _STYLES_MAP.put(SkinSelectors.AF_PANEL_HEADER_ERROR_STYLE_CLASS, "portlet-section-header");
     _STYLES_MAP.put(SkinSelectors.AF_SHOW_DETAIL_HEADER_STYLE_CLASS, "portlet-section-header");
-    _STYLES_MAP.put(SimpleDesktopConstants.AF_PANEL_BOX_HEADER_STYLE_CLASS,
+    _STYLES_MAP.put(SkinSelectors.AF_PANEL_BOX_HEADER_STYLE_CLASS,
       "portlet-section-subheader " +
-      StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_PANEL_BOX_HEADER_STYLE_CLASS));
+      StyleUtils.convertToValidSelector(SkinSelectors.AF_PANEL_BOX_HEADER_STYLE_CLASS));
     _STYLES_MAP.put(SkinSelectors.AF_PANELACCORDION_TITLE_LINK_STYLE_CLASS,
       "portlet-section-header");
 
@@ -468,35 +466,35 @@
      // was requested by the portal team
      //
      // tabs might be styled, so leave them alone for padding and such.
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_SELECTED_STYLE_CLASS,
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_TABS_SELECTED_STYLE_CLASS,
       "portlet-table-selected " +
-         StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_MENU_TABS_SELECTED_STYLE_CLASS));
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_ENABLED_STYLE_CLASS,
+         StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_TABS_SELECTED_STYLE_CLASS));
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_TABS_ENABLED_STYLE_CLASS,
        "portlet-table-alternate "+
-       StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_MENU_TABS_ENABLED_STYLE_CLASS));
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_DISABLED_STYLE_CLASS,
+       StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_TABS_ENABLED_STYLE_CLASS));
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_TABS_DISABLED_STYLE_CLASS,
        "portlet-table-alternate " +
-       StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_MENU_TABS_DISABLED_STYLE_CLASS));
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_TABS_SEPARATOR_STYLE_CLASS,
+       StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_TABS_DISABLED_STYLE_CLASS));
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_TABS_SEPARATOR_STYLE_CLASS,
        "portlet-table-alternate");
 
 
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_BODY_STYLE_CLASS,
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_BODY_STYLE_CLASS,
        _NULL_STYLE);
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_TITLE_STYLE_CLASS,
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_TITLE_STYLE_CLASS,
        _NULL_STYLE);
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_EMPTY_STYLE_CLASS,
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_EMPTY_STYLE_CLASS,
        _NULL_STYLE);
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_SELECTED_STYLE_CLASS,
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_SELECTED_STYLE_CLASS,
        "portlet-table-selected " +
-       StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_MENU_BAR_SELECTED_STYLE_CLASS));
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_ENABLED_STYLE_CLASS,
+       StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_BAR_SELECTED_STYLE_CLASS));
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_ENABLED_STYLE_CLASS,
        "portlet-table-alternate "+
-       StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_MENU_BAR_ENABLED_STYLE_CLASS));
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_DISABLED_STYLE_CLASS,
+       StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_BAR_ENABLED_STYLE_CLASS));
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_DISABLED_STYLE_CLASS,
        "portlet-table-alternate " +
-       StyleUtils.convertToValidSelector(SimpleDesktopConstants.AF_MENU_BAR_DISABLED_STYLE_CLASS));
-     _STYLES_MAP.put(SimpleDesktopConstants.AF_MENU_BAR_SEPARATOR_STYLE_CLASS,
+       StyleUtils.convertToValidSelector(SkinSelectors.AF_MENU_BAR_DISABLED_STYLE_CLASS));
+     _STYLES_MAP.put(SkinSelectors.AF_MENU_BAR_SEPARATOR_STYLE_CLASS,
        "portlet-table-alternate");
 
 

Added: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MimeTypes.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MimeTypes.java?view=auto&rev=518847
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MimeTypes.java
(added)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/MimeTypes.java
Thu Mar 15 19:54:37 2007
@@ -0,0 +1,36 @@
+/*
+ * MimeTypes.java
+ *
+ * Created 15-Mar-07 10:21:33 PM
+ * 
+ * Copyright  2004-2006 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.trinidadinternal.renderkit.core.xhtml;
+
+/**
+ * This class exposes known MIME types as constants to prevent typos and make 
+ * it easier to lookup for MIME type.
+ */
+public final class MimeTypes
+{
+  public static final String CSS = "text/css";
+  public static final String HTML = "text/html";
+  public static final String JAVASCRIPT = "text/javascript";
+  public static final String X_JAVASCRIPT = "text/x-javascript";
+  public static final String XML = "text/xml";
+  
+  private MimeTypes(){}
+}

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java?view=diff&rev=518847&r1=518846&r2=518847
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SkinSelectors.java
Thu Mar 15 19:54:37 2007
@@ -49,6 +49,8 @@
     "AFComponentMessageCell";
   public static final String AF_CONTENT_CELL_STYLE_CLASS =
     "AFContentCell";
+  public static final String AF_DATA_TEXT_STYLE_CLASS =
+    "AFDataText";
   public static final String AF_FIELD_TEXT_DISABLED_STYLE_CLASS =
     "AFFieldTextDisabled";
   public static final String AF_FIELD_TEXT_STYLE_CLASS =
@@ -93,6 +95,8 @@
     "OraLinkDisabled";
   public static final String LINK_STYLE_CLASS =
     "OraLink";
+  public static final String LINK_TEXT_STYLE_CLASS =
+    "OraLinkText";
   public static final String NAV_BAR_ALINK_STYLE_CLASS =
     "OraNavBarActiveLink";
   public static final String NAV_BAR_ILINK_STYLE_CLASS =
@@ -137,10 +141,17 @@
     "OraTableBorder1111";
   public static final String TABLE_SELECT_CELL_STYLE =
     "OraTableCellSelect";
+  public static final String TIP_TEXT_STYLE_CLASS = 
+    "OraTipText";
+  public static final String TIP_LABEL_STYLE_CLASS  = 
+    "OraTipLabel";
 
-  // ========================= Other ctyle classes ========================= //
+
+  // ========================= Other private style classes ========================= //
   public static final String COLOR_FIELD_SWATCH_STYLE_CLASS =
     "p_OraColorFieldSwatch";
+  public static final String DISABLED_STYLE_CLASS =
+    "p_OraDisabled";
   public static final String HEADER_NEST_STYLE_CLASS = 
     "p_OraHeaderNest";
   public static final String HIDDEN_LABEL_STYLE_CLASS =
@@ -149,6 +160,8 @@
     "p_OraHideShowDisclosedSymbol";
   public static final String IN_CONTEXT_TEXT_STYLE_CLASS =
     "p_InContextBrandingText";
+  public static final String PROCESS_STATUS_STYLE_CLASS =
+    "p_OraProcessingStatus";
   public static final String QUICK_SEARCH_BOX_STYLE_CLASS =
     "p_OraQuickSearchBox";
   public static final String STATE_DISABLED = 
@@ -449,9 +462,74 @@
    // menuBar is not customizable for pda or for oracle.desktop.
    // From the renderered output it looks like oracle.desktop can be
    // simulated by customizing simple.desktops renderer.
+   public static final String AF_MENU_BAR_STYLE_CLASS =
+     "af|menuBar";
+   public static final String AF_MENU_BAR_DISABLED_STYLE_CLASS =
+     "af|menuBar::disabled";
+   public static final String AF_MENU_BAR_ENABLED_STYLE_CLASS =
+     "af|menuBar::enabled";
+   public static final String AF_MENU_BAR_EMPTY_STYLE_CLASS = 
+     "af|menuBar::empty";
+   public static final String AF_MENU_BAR_BODY_STYLE_CLASS = 
+     "af|menuBar::body";
+   public static final String AF_MENU_BAR_TITLE_STYLE_CLASS = 
+     "af|menuBar::title";
+   public static final String AF_MENU_BAR_SELECTED_STYLE_CLASS =
+     "af|menuBar::selected";
+   public static final String AF_MENU_BAR_SEPARATOR_STYLE_CLASS =
+     "af|menuBar::separator";
+   
+   // ================================ Icons ================================ //
    public static final String AF_MENU_BAR_SEPARATOR_ICON_NAME =
      "af|menuBar::separator-icon";
 
+   
+   //                                                                         //
+   //                                                                         //
+   // ============================ tr:menuButtons =========================== //
+   //                                                                         //
+   //                                                                         //
+   
+   // ============================ Style classes ============================ //
+   public static final String AF_MENU_BUTTONS_IMAGE_STYLE_CLASS =
+     "af|menuButtons::icon-style";
+   public static final String AF_MENU_BUTTONS_TEXT_STYLE_CLASS =
+     "af|menuButtons::text";
+   public static final String AF_MENU_BUTTONS_TEXT_SELECTED_STYLE_CLASS =
+     "af|menuButtons::text-selected";
+   public static final String AF_MENU_BUTTONS_TEXT_DISABLED_STYLE_CLASS =
+     "af|menuButtons::text-disabled";
+
+   
+   //                                                                         //
+   //                                                                         //
+   // ============================ tr:menuChoice ============================ //
+   //                                                                         //
+   //                                                                         //
+   
+   // ============================ Style classes ============================ //
+   public static final String AF_MENU_CHOICE_LABEL_STYLE_CLASS =
+     "af|menuChoice::label";
+
+   
+   //                                                                         //
+   //                                                                         //
+   // ============================= tr:menuTabs ============================= //
+   //                                                                         //
+   //                                                                         //
+   
+   // ============================ Style classes ============================ //
+   public static final String AF_MENU_TABS_STYLE_CLASS =
+     "af|menuTabs";
+   public static final String AF_MENU_TABS_SELECTED_STYLE_CLASS =
+     "af|menuTabs::selected";
+   public static final String AF_MENU_TABS_ENABLED_STYLE_CLASS =
+     "af|menuTabs::enabled";
+   public static final String AF_MENU_TABS_DISABLED_STYLE_CLASS =
+     "af|menuTabs::disabled";
+   public static final String AF_MENU_TABS_SEPARATOR_STYLE_CLASS =
+     "af|menuTabs::separator";
+
    //                                                                         //
    //                                                                         //
    // ============================= tr:messages ============================= //
@@ -459,6 +537,18 @@
    //                                                                         //
    
    // ============================ Style classes ============================ //
+   public static final String AF_MESSAGES_STYLE_CLASS =
+     "af|messages";
+   public static final String AF_MESSAGES_BODY_STYLE_CLASS = 
+     "af|messages::body";
+   public static final String AF_MESSAGES_ERROR_STYLE_CLASS =
+     "af|messages::error";
+   public static final String AF_MESSAGES_HEADER_STYLE_CLASS =
+     "af|messages::header";
+   public static final String AF_MESSAGES_MESSAGE_TEXT_STYLE_CLASS =
+     "af|messages::message-text";
+   public static final String AF_MESSAGES_LIST_STYLE_CLASS =
+     "af|messages::list";
    
    // ================================ Icons ================================ //
    public static final String AF_MESSAGES_ERROR_ICON_NAME =
@@ -744,6 +834,33 @@
    public static final String AF_PANEL_LIST_STYLE_CLASS =
      "af|panelList";
    
+   
+   //                                                                         //
+   //                                                                         //
+   // ============================ tr:panelPage ============================= //
+   //                                                                         //
+   //                                                                         //
+   
+   // ============================ Style classes ============================ //
+   public static final String AF_PANEL_PAGE_COPYRIGHT_STYLE_CLASS =
+     "af|panelPage::copyright";
+   public static final String AF_PANEL_PAGE_PRIVACY_STYLE_CLASS =
+     "af|panelPage::privacy";
+   public static final String AF_PANEL_PAGE_ABOUT_STYLE_CLASS =
+     "af|panelPage::about";
+   
+   
+   //                                                                         //
+   //                                                                         //
+   // =========================== tr:panelSideBar =========================== //
+   //                                                                         //
+   //                                                                         //
+   
+   // ============================ Style classes ============================ //
+   public static final String AF_PANEL_SIDE_BAR_STYLE_CLASS =
+     "af|panelSideBar";
+   public static final String AF_PANEL_SIDE_BAR_BODY_STYLE_CLASS = 
+     "af|panelSideBar::body";
    
    //                                                                         //
    //                                                                         //

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java?view=diff&rev=518847&r1=518846&r2=518847
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/TestResponseWriter.java
Thu Mar 15 19:54:37 2007
@@ -19,11 +19,8 @@
 package org.apache.myfaces.trinidadinternal.renderkit;
 
 import java.io.IOException;
-import java.io.Writer;
 import java.io.UnsupportedEncodingException;
-
-import java.util.regex.Pattern;
-
+import java.io.Writer;
 import java.util.ArrayList;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -31,7 +28,7 @@
 import java.util.Map;
 import java.util.Set;
 import java.util.TreeMap;
-
+import java.util.regex.Pattern;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.ResponseWriter;
@@ -40,14 +37,11 @@
 import junit.framework.Test;
 import junit.framework.TestResult;
 
-import org.apache.myfaces.trinidad.util.IntegerUtils;
-
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
-
+import org.apache.myfaces.trinidad.util.IntegerUtils;
+import org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.MimeTypes;
 import org.apache.myfaces.trinidadinternal.share.util.CaboHttpUtils;
-
 import org.apache.myfaces.trinidadinternal.ui.io.EscapedText;
-import org.apache.myfaces.trinidadinternal.ui.io.EscapedTextFactory;
 import org.apache.myfaces.trinidadinternal.ui.io.XMLEscapes;
 
 /**
@@ -469,7 +463,7 @@
     {
       EscapedText escapedText = (EscapedText)value;
 
-      if (EscapedTextFactory.HTML_MIME_TYPE == escapedText.getMimeType())
+      if (MimeTypes.HTML.equals(escapedText.getMimeType()))
       {
         if (isAttribute)
         {



Mime
View raw message