myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwald...@apache.org
Subject svn commit: r819634 - in /myfaces/trinidad/branches/1.2.12.1-branch: trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/
Date Mon, 28 Sep 2009 16:28:33 GMT
Author: jwaldman
Date: Mon Sep 28 16:28:33 2009
New Revision: 819634

URL: http://svn.apache.org/viewvc?rev=819634&view=rev
Log:
TRINIDAD-1562 Nokia's S60 web-browser not displaying show/hide icon of panelAccordion
1.2.12.1-branch
The TODO has to be fixed before we check this into trunk.
patch by Mamallan Uthaman

Modified:
    myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
    myfaces/trinidad/branches/1.2.12.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailRenderer.java

Modified: myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java?rev=819634&r1=819633&r2=819634&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.12.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/CoreRenderer.java
Mon Sep 28 16:28:33 2009
@@ -684,6 +684,16 @@
   {
     return (Agent.PLATFORM_GENERICPDA.equals(rc.getAgent().getPlatformName()));
   }
+  
+  /**
+   * This method returns true if a user-agent's platform is NokiaS60 
+   * @param arc - RenderingContext of a request
+   * @return boolean
+   */
+  static public boolean isNokiaS60(RenderingContext rc)
+  {
+    return (Agent.PLATFORM_NOKIA_S60.equals(rc.getAgent().getPlatformName()));
+  }
 
   static public boolean isInaccessibleMode(RenderingContext rc)
   {

Modified: myfaces/trinidad/branches/1.2.12.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailRenderer.java?rev=819634&r1=819633&r2=819634&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailRenderer.java
(original)
+++ myfaces/trinidad/branches/1.2.12.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/ShowDetailRenderer.java
Mon Sep 28 16:28:33 2009
@@ -32,6 +32,8 @@
 import org.apache.myfaces.trinidad.context.RenderingContext;
 import org.apache.myfaces.trinidad.skin.Icon;
 
+import org.apache.myfaces.trinidadinternal.skin.icon.TextIcon;
+
 /**
  * This needs to be massively cleaned up...
  * @todo TEST NON-PPR!  I removed the non-PPR case from the
@@ -256,6 +258,26 @@
     boolean             disclosed
     )
   {
+    // Requests from Nokia's WebKit-browsers are handled by desktop renderer.
+    // But unlike desktop browsers, Nokia's WebKit-browsers don't support icons
+    // that are encoded in unicode. Hence, we need to use text icons for these 
+    // browsers.  
+    // TODO move the new TextIcon code into the Skin object and remove from the renderer
+    if (isNokiaS60(arc))
+    {
+      return disclosed 
+             ? (Icon) new TextIcon(
+                          "[-]", 
+                          null, 
+                          SkinSelectors.HIDE_SHOW_DISCLOSED_SYMBOL_STYLE_CLASS,
+                          null) 
+             : (Icon) new TextIcon(
+                          "[+]", 
+                          null, 
+                          SkinSelectors.HIDE_SHOW_DISCLOSED_SYMBOL_STYLE_CLASS,
+                          null);
+    }
+ 
     String iconName = (disclosed
                        ? SkinSelectors.AF_SHOW_DETAIL_DISCLOSED_ICON_NAME
                        : SkinSelectors.AF_SHOW_DETAIL_UNDISCLOSED_ICON_NAME);



Mime
View raw message