You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ma...@apache.org on 2008/11/11 09:17:27 UTC

svn commit: r712987 - in /myfaces/trinidad/branches/1.2.9.1-branch: trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/ trinidad-impl/src/main/java/org/apache/myfaces/tr...

Author: matzew
Date: Tue Nov 11 00:17:27 2008
New Revision: 712987

URL: http://svn.apache.org/viewvc?rev=712987&view=rev
Log:
TRINIDAD-1266 - User Agent String handling enhancements for iPhone, BlackBerry Bold, BlackBerry Strom, Nokia S60, WAP2.0 browsers

Thx to Tadashi Enomori for the patch

Added:
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/blackberry9000.xml
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/nokia_S60.xml
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/pdaGeneric.xml
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/wm6.xml
Modified:
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/NameUtils.java
    myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/capabilities.xml

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java?rev=712987&r1=712986&r2=712987&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java (original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java Tue Nov 11 00:17:27 2008
@@ -109,6 +109,17 @@
   public static final String PLATFORM_BLACKBERRY = "blackberry";
 
   /**
+  /**
+   * Constant for Nokia S60 platform
+   */
+  public static final String PLATFORM_NOKIA_S60 = "nokia_s60";
+
+  /**
+   * Constant for generic PDA device browser
+   */
+  public static final String PLATFORM_GENERICPDA = "genericpda";
+
+  /**
    * Constant for Internet Explorer agent
    */
   public static final String AGENT_IE = "ie";
@@ -133,6 +144,17 @@
    
 
   /**
+   * Constant for Symbian Nokia S60 agent. Used for Nokia Series 60
+   * 3rd Edition or later
+   */
+  public static final String AGENT_NOKIA_S60 = "nokia_s60";
+
+  /**
+   * Constant for basic HTML (without JavaScript) Browser agent.
+   */
+  public static final String AGENT_GENERICPDA = "genericpda";
+
+  /**
    *
    * @return return the Type of Agent. Returns <code>TYPE_UNKNOWN</code> if not available.
    * <br>E.g. desktop, pda, phone

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java?rev=712987&r1=712986&r2=712987&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java (original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java Tue Nov 11 00:17:27 2008
@@ -126,16 +126,6 @@
        return;
     }
 
-    // I need to search for more than just "WebPro" because ie's header can be
-    // altered to include "FunWebProducts" in which case ie desktop was being
-    // mapped to a pda
-    // see bug 3362116
-    if (userAgent.indexOf("NetFront/3.") != -1)
-    {
-      _populateNetFrontAgentImpl(userAgent,agent);
-      return;
-    }
-
     // Web Pro
     //userAgent = "Mozilla/4.76 (compatible; MSIE 6.0; U; Windows 95; PalmSource; PalmOS; WebPro; Tungsten Proxyless 1.1 320x320x16)";
     if ( (userAgent.indexOf( "WebPro") != -1 &&
@@ -185,6 +175,51 @@
       return;
     }
 
+    if(userAgent.startsWith("BlackBerry"))
+    {
+        _populateBlackberryAgentImpl(userAgent,agent);
+        return;
+    }
+
+    if (userAgent.indexOf("Opera") > -1)
+    {
+        _populateOperaAgentImpl(userAgent,agent);
+        return;
+    }
+
+    // Generic Mobile Browser Detection
+    // The user agent signature varies depending on the
+    // device manufacturer and carrier. Use case insensitive
+    // string matching.
+    // Some of the browsers listed below support higher capabilities
+    // than basic HTML browser capabilities. However, those browsers
+    // are treated as basic HTML browser here for maximam compatibility
+    // and performance.
+    // We do not support WAP1.X browsers (WML).
+
+    String userAgentLowercase = userAgent.toLowerCase();
+
+    if ((userAgentLowercase.indexOf("wap1.") < 0) &&
+        (userAgentLowercase.indexOf("wap2.") > -1  ||
+         userAgentLowercase.indexOf("up.browser") > -1 ||
+         userAgentLowercase.indexOf("nokia") > -1 ||
+         userAgentLowercase.startsWith("mot-") ||
+         userAgentLowercase.indexOf("symbian") > -1 ||
+         userAgentLowercase.indexOf("sonyeri") > -1 ||
+         userAgentLowercase.indexOf("netfront/") > -1 ||
+         userAgentLowercase.startsWith("samsang-") ||
+         userAgentLowercase.startsWith("lg-") ||
+         userAgentLowercase.indexOf("obigo") > -1||
+         userAgentLowercase.indexOf("vodafone") > -1 ||
+         userAgentLowercase.indexOf("kddi") > -1 ||
+         userAgentLowercase.indexOf("openwave") > -1))
+    {
+      _populateGenericPDAAgentImpl(userAgent,agent);
+      return;
+    }
+
+    // Gecko and Mozilla tests should be placed following more specific
+    // uiser-agent test.
     if (userAgent.indexOf("Gecko/") != -1)
     {
       _populateGeckoAgentImpl(userAgent,agent);
@@ -197,21 +232,19 @@
       return;
     }
 
-    if (userAgent.startsWith("Opera"))
-    {
-        _populateOperaAgentImpl(userAgent,agent);
-        return;
-    }
-    
-    if(userAgent.startsWith("BlackBerry"))
-    {
-        _populateBlackberryAgentImpl(userAgent,agent);
-        return;
-    }
-
     _populateUnknownAgentImpl(userAgent, agent);
   }
 
+
+  private void _populateGenericPDAAgentImpl(String userAgent, AgentImpl agent)
+  {
+    // Generic PDA browser
+    agent.setType(Agent.TYPE_PDA);
+    agent.setAgent(Agent.AGENT_GENERICPDA);
+    agent.setAgentVersion("1"); // Version does not matter
+    agent.setPlatform(Agent.PLATFORM_GENERICPDA);
+  }
+
   private void _populateUnknownAgentImpl(String userAgent, AgentImpl agent)
   {
     // Log warning message that we are setting the agent entry to unknown attributes
@@ -434,46 +467,6 @@
     }
 
   /**
-   * returns the data for the Palm NetFront browser request
-   */
-  private void _populateNetFrontAgentImpl(String agent, AgentImpl agentObj)
-  {
-    agentObj.setType(Agent.TYPE_PDA);
-    agentObj.setAgent(TrinidadAgent.AGENT_NETFRONT);
-
-    int start = agent.indexOf("NetFront/");
-
-    if (start > -1)
-    {
-      agentObj.setAgentVersion(_getVersion(agent, start + 8));
-    }
-
-    int paren = agent.indexOf('(');
-
-    if (paren >= 0)
-    {
-      // try to determine the OS
-      if (agent.indexOf("Windows CE", paren) > 0)
-      {
-        agentObj.setPlatform(Agent.PLATFORM_PPC);
-      }
-/*
-      //Embedded Linux is not be same as Linux
-      //so leave it as unknown
-      else if (agent.indexOf("Embedix", paren) > 0)
-      {
-        entry._platform = Agent.PLATFORM_LINUX;
-      }
-*/
-      else if (agent.indexOf("Palm", paren) > 0)
-      {
-        agentObj.setPlatform(Agent.PLATFORM_PALM);
-      }
-    }
-
-  }
-
-  /**
    * returns the data for the Palm Web Pro browser request
    */
   private void _populatePalmWebBrowserProAgentImpl(String agent,AgentImpl agentObj)
@@ -663,36 +656,51 @@
   
   private void _populateOperaAgentImpl(String agent,AgentImpl agentObj)
   {
-    agentObj.setType(Agent.TYPE_DESKTOP);
-    agentObj.setAgent(Agent.AGENT_GECKO);
-    
-    int operaIndex = agent.indexOf("Opera/");
-    int firstSpace = agent.indexOf(" ");
-    if (operaIndex >= 0 && firstSpace >=0 )
+    int start = agent.indexOf("Opera Mini");
+    if (start > -1)
     {
-        agentObj.setAgentVersion(agent.substring(operaIndex + 6,firstSpace));
+      // Opera Mini supports JavaScript. However, generic PDA capability
+      // will be assigned to maximize the compatibility until fully certified.
+      start = agent.indexOf('/', start);
+      String version = _getVersion(agent, start);
+      agentObj.setAgentVersion(version);
+      agentObj.setType(Agent.TYPE_PDA);
+      agentObj.setAgent(Agent.AGENT_GENERICPDA);
+      agentObj.setPlatform(Agent.PLATFORM_GENERICPDA);
     }
-
-    int paren = agent.indexOf('(');
-
-    if (paren >= 0)
+    else
     {
-      // try to determine the OS
-      if (agent.indexOf("Win", paren) > 0)
-      {
-        agentObj.setPlatform(Agent.PLATFORM_WINDOWS);
-      }
-      else if (agent.indexOf("Mac", paren) > 0)
-      {
-        agentObj.setPlatform(Agent.PLATFORM_MACOS);
-      }
-      else if (agent.indexOf("Linux", paren) > 0)
+      agentObj.setType(Agent.TYPE_DESKTOP);
+      agentObj.setAgent(Agent.AGENT_GECKO);
+
+      int operaIndex = agent.indexOf("Opera/");
+      int firstSpace = agent.indexOf(" ");
+      if (operaIndex >= 0 && firstSpace >=0 )
       {
-        agentObj.setPlatform(Agent.PLATFORM_LINUX);
+        agentObj.setAgentVersion(agent.substring(operaIndex + 6,firstSpace));
       }
-      else if (agent.indexOf("Sun", paren) > 0)
+
+      int paren = agent.indexOf('(');
+
+      if (paren >= 0)
       {
-        agentObj.setPlatform(Agent.PLATFORM_SOLARIS);
+        // try to determine the OS
+        if (agent.indexOf("Win", paren) > 0)
+        {
+          agentObj.setPlatform(Agent.PLATFORM_WINDOWS);
+        }
+        else if (agent.indexOf("Mac", paren) > 0)
+        {
+          agentObj.setPlatform(Agent.PLATFORM_MACOS);
+        }
+        else if (agent.indexOf("Linux", paren) > 0)
+        {
+          agentObj.setPlatform(Agent.PLATFORM_LINUX);
+        }
+        else if (agent.indexOf("Sun", paren) > 0)
+        {
+          agentObj.setPlatform(Agent.PLATFORM_SOLARIS);
+        }
       }
     }
   }
@@ -737,7 +745,14 @@
 
     String version = _getVersion(agent, start);
     agentObj.setType(Agent.TYPE_DESKTOP);
-    agentObj.setAgent(Agent.AGENT_WEBKIT);
+    if (agent.indexOf("Symbian") > -1)
+    {
+      agentObj.setAgent(Agent.AGENT_NOKIA_S60);
+    }
+    else
+    {
+      agentObj.setAgent(Agent.AGENT_WEBKIT);
+    }
     agentObj.setAgentVersion(version);
   }
 

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java?rev=712987&r1=712986&r2=712987&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java (original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentNameUtil.java Tue Nov 11 00:17:27 2008
@@ -82,6 +82,16 @@
       return TrinidadAgent.APPLICATION_BLACKBERRY;
     }
 
+    if (TrinidadAgent.AGENT_NOKIA_S60.equals(agentName))
+    {
+      return TrinidadAgent.APPLICATION_NOKIA_S60;
+    }
+
+    if(TrinidadAgent.AGENT_GENERICPDA.equals(agentName))
+    {
+      return TrinidadAgent.APPLICATION_GENERICPDA;
+    }
+
     return TrinidadAgent.APPLICATION_UNKNOWN;
   }
 
@@ -133,6 +143,16 @@
         return TrinidadAgent.OS_BLACKBERRY;
     }
 
+    if (TrinidadAgent.PLATFORM_NOKIA_S60.equals(platformName))
+    {
+      return TrinidadAgent.OS_NOKIA_S60;
+    }
+
+    if (TrinidadAgent.PLATFORM_GENERICPDA.equals(platformName))
+    {
+        return TrinidadAgent.OS_GENERICPDA;
+    }
+
     return TrinidadAgent.OS_UNKNOWN;
   }
 
@@ -187,6 +207,10 @@
         return TrinidadAgent.AGENT_WEBKIT;
       case TrinidadAgent.APPLICATION_BLACKBERRY:
         return TrinidadAgent.AGENT_BLACKBERRY;
+      case TrinidadAgent.APPLICATION_NOKIA_S60:
+        return TrinidadAgent.AGENT_NOKIA_S60;
+      case TrinidadAgent.APPLICATION_GENERICPDA:
+        return TrinidadAgent.AGENT_GENERICPDA;
        default:
         return null;
     }
@@ -221,6 +245,10 @@
         return TrinidadAgent.PLATFORM_PPC;
       case TrinidadAgent.OS_BLACKBERRY:
         return TrinidadAgent.PLATFORM_BLACKBERRY;
+      case TrinidadAgent.OS_NOKIA_S60:
+        return TrinidadAgent.PLATFORM_NOKIA_S60;
+      case TrinidadAgent.OS_GENERICPDA:
+        return TrinidadAgent.PLATFORM_GENERICPDA;
       default:
         return null;
     }

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java?rev=712987&r1=712986&r2=712987&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java (original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/TrinidadAgent.java Tue Nov 11 00:17:27 2008
@@ -316,10 +316,20 @@
   static public final int APPLICATION_SAFARI = 11;
 
   /**
-   * Application constant for the Safari browser.
+   * Application constant for the BlackBerry browser.
    */
   static public final int APPLICATION_BLACKBERRY = 12;
 
+  /**
+   * Application constant for the Nokia S60 browser.
+   */
+  static public final int APPLICATION_NOKIA_S60 = 13;
+
+  /**
+   * Application constant for the basic HTMLbrowser.
+   */
+  static public final int APPLICATION_GENERICPDA = 14;
+
 
   /**
    * OS constant for an unknown operating system.
@@ -366,6 +376,16 @@
    */
   static public final int OS_IPHONE   = 8;
 
+  /**
+   * OS constant for Symbian
+   */
+  static public final int OS_NOKIA_S60   = 9;
+
+  /**
+   * OS constant for generic PDA
+   */
+  static public final int OS_GENERICPDA   = 10;
+
 
   /**
    * Name Constant for Netfront agent

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/NameUtils.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/NameUtils.java?rev=712987&r1=712986&r2=712987&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/NameUtils.java (original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/util/NameUtils.java Tue Nov 11 00:17:27 2008
@@ -63,6 +63,10 @@
       browser = TrinidadAgent.APPLICATION_SAFARI;
     else if (_BROWSER_BLACKBERRY.equals(browserName))
       browser = TrinidadAgent.APPLICATION_BLACKBERRY;
+    else if (_BROWSER_NOKIA_S60.equals(browserName))
+      browser = TrinidadAgent.APPLICATION_NOKIA_S60;
+    else if (_BROWSER_GENERICPDA.equals(browserName))
+      browser = TrinidadAgent.APPLICATION_GENERICPDA;
     else
     {
       // Either a new or an invalid browser
@@ -99,6 +103,12 @@
     case TrinidadAgent.APPLICATION_BLACKBERRY:
       name = _BROWSER_BLACKBERRY;
       break;
+    case TrinidadAgent.APPLICATION_NOKIA_S60:
+      name = _BROWSER_NOKIA_S60;
+      break;
+    case TrinidadAgent.APPLICATION_GENERICPDA:
+      name = _BROWSER_GENERICPDA;
+      break;
     case TrinidadAgent.APPLICATION_UNKNOWN:
       // This case is only here to avoid the default assertion
       break;
@@ -198,6 +208,12 @@
       platform = TrinidadAgent.OS_PPC;
     else if (_PLATFORM_BLACKBERRY.equals(platformName))
       platform = TrinidadAgent.OS_BLACKBERRY;
+    else if (_PLATFORM_NOKIA_S60.equals(platformName))
+      platform = TrinidadAgent.OS_NOKIA_S60;
+    else if (_PLATFORM_GENERICPDA.equals(platformName))
+      platform = TrinidadAgent.OS_GENERICPDA;
+
+
     else if (!_PLATFORM_UNIX.equals(platformName))
     {
       // Either a new or an invalid platform
@@ -237,6 +253,12 @@
     case TrinidadAgent.OS_BLACKBERRY:
       name = _PLATFORM_BLACKBERRY;
       break;
+    case TrinidadAgent.OS_NOKIA_S60:
+      name = _PLATFORM_NOKIA_S60;
+      break;
+    case TrinidadAgent.OS_GENERICPDA:
+      name = _PLATFORM_GENERICPDA;
+      break;
     case TrinidadAgent.OS_UNKNOWN:
       // This case is only here to avoid the default assertion
       break;
@@ -729,6 +751,10 @@
 
   private static final String _BROWSER_BLACKBERRY = "blackberry";
   
+  private static final String _BROWSER_NOKIA_S60 = "nokia_s60";
+
+  private static final String _BROWSER_GENERICPDA = "genericpda";
+
   // Platform constants
   private static final String _PLATFORM_WINDOWS = "windows";
 
@@ -746,6 +772,10 @@
 
   private static final String _PLATFORM_BLACKBERRY = "blackberry";
 
+  private static final String _PLATFORM_NOKIA_S60 = "nokia_s60";
+
+  private static final String _PLATFORM_GENERICPDA = "genericpda";
+
   // Accessibility constants
   private static final String _ACC_HIGH_CONTRAST = "hc";
 

Added: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/blackberry9000.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/blackberry9000.xml?rev=712987&view=auto
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/blackberry9000.xml (added)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/blackberry9000.xml Tue Nov 11 00:17:27 2008
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
+<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
+  <capability name="dom" value="level2"/>
+  <capability name="accessKeys" value="true"/>
+  <capability name="-adfinternal-cssSelectors" value="multiple"/> 
+  <capability name="-adfinternal-imageStretch" value="true"/> 
+  <capability name="-adfinternal-partialRendering" value="true"/>
+</capabilityData>

Modified: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/capabilities.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/capabilities.xml?rev=712987&r1=712986&r2=712987&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/capabilities.xml (original)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/capabilities.xml Tue Nov 11 00:17:27 2008
@@ -16,7 +16,7 @@
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
-	   
+     
 -->
 <capabilitiesDocument xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
   <agentCapabilities>
@@ -69,15 +69,23 @@
       <include src="webkit312.xml"/>
     </capabilities>
 
+    <capabilities id="nokia_s60" agents="nokia_s60">
+      <include refid="webkit312"/>
+      <include src="nokia_S60.xml"/>
+    </capabilities>
+
     <capabilities id="netscape" agents="netscape">
       <include refid="html" />
       <include src="netscape.xml"/>
     </capabilities>
-
+    
+    <!-- Netfront browser is treated as basic HTML browser for 
+         performance
     <capabilities id="netfront" agents="netfront/3+ webpro blazer/3+">
       <include refid="pda" />
       <include src="netfront.xml" />
     </capabilities>
+    -->
 
     <capabilities id="pixo" agents="pixo">
       <include refid="pda" />
@@ -90,42 +98,43 @@
       <include src="pocketie.xml"/>
     </capabilities>
 
-    <!-- Windows Mobile 6 only (With PPR support) -->
-    <capabilities id="pocketie03" agents="ie/6+" platforms="ppc">
+    <!-- Windows Mobile 6 only -->
+    <capabilities id="wm6" agents="ie/6+" platforms="ppc">
       <include refid="pocketie"/>
-      <include src="pocketie03.xml"/>
+      <include src="wm6.xml"/>
     </capabilities>
-  </agentCapabilities>
-
    
-   <!-- BlackBerry Browser pre-4.0; 3.6 and 3.7 include support for
-        XHTML Basic; 3.2 and 3.3 support cHTML; we do not provide
-        explicit support for these browsers, but we use the "pda"
-        capabilities because it provides a stripped set of features
-        close to XHTML Basic -->
-   <capabilities id="blackberry" agents="blackberry" platforms="blackberry">
-     <include refid="pda"/>
-   </capabilities>
-
    
-   <!-- BlackBerry Browser 4.0+ on BlackBerry devices -->
-   <capabilities id="blackberry4" agents="blackberry/4+" platforms="blackberry">
-     <include refid="pda"/>
-     <include src="blackberry4.xml"/>
-   </capabilities>
+    <!-- BlackBerry Browser pre-4.0; 3.6 and 3.7 include support for
+    XHTML Basic; 3.2 and 3.3 support cHTML; we do not provide
+    explicit support for these browsers, but we use the "pda"
+    capabilities because it provides a stripped set of features
+    close to XHTML Basic -->
+    <capabilities id="blackberry" agents="blackberry" platforms="blackberry">
+      <include refid="htmlBasic"/>
+      <include src="pdaGeneric.xml"/>
+    </capabilities>
 
+    
+    <!-- BlackBerry Browser BlackBerry Curve and Perl devices -->
+    <!-- BlackBerry Curve and Perl are treated as basic HTML browsers for 
+         performance
+    <capabilities id="blackberry4" agents="blackberry/4+" platforms="blackberry">
+      <include refid="pda"/>
+      <include src="blackberry4.xml"/>
+    </capabilities>
+    -->
 
+    <!-- BlackBerry Browser BlackBerry Bold devices -->
+    <capabilities id="blackberryBold" agents="blackberry/4.6+" platforms="blackberry">
+      <include refid="html"/>
+      <include src="blackberry9000.xml"/>
+    </capabilities>
 
-  <!--devices>
-    <device id="Nokia6600" model="nokia6600">
-      <component type="browser">
-        <include refid="htmlBasic"/>
-        <include src="nokia6600-browser.xml"/>
-      </component>
-      <component type="push">
-        <include src="nokia6600-push.xml"/>
-      </component>
-    </device>
-  </devices-->
+    <capabilities id="genericpda" agents="genericpda">
+      <include refid="htmlBasic"/>
+      <include src="pdaGeneric.xml"/>
+    </capabilities>
 
+  </agentCapabilities>
 </capabilitiesDocument>

Added: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/nokia_S60.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/nokia_S60.xml?rev=712987&view=auto
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/nokia_S60.xml (added)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/nokia_S60.xml Tue Nov 11 00:17:27 2008
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
+<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
+  <capability name="-adfinternal-partialRendering" value="false"/>
+</capabilityData>

Added: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/pdaGeneric.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/pdaGeneric.xml?rev=712987&view=auto
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/pdaGeneric.xml (added)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/pdaGeneric.xml Tue Nov 11 00:17:27 2008
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
+<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
+  <capability name="textPresentation" value="true"/>      
+  <capability name="-adfinternal-nameIdentification" value="true"/>
+  <capability name="-adfinternal-disabledFormElements" value="false"/>
+  <capability name="-adfinternal-readonlyFormElements" value="false"/>
+  <capability name="-adfinternal-advancedButtons" value="false"/>
+  <capability name="-adfinternal-cssSelectors" value="multiple"/>
+  <capability name="-adfinternal-styleAttributes" value="external"/>
+</capabilityData>

Added: myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/wm6.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/wm6.xml?rev=712987&view=auto
==============================================================================
--- myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/wm6.xml (added)
+++ myfaces/trinidad/branches/1.2.9.1-branch/trinidad-impl/src/main/resources/META-INF/agent/wm6.xml Tue Nov 11 00:17:27 2008
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you 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.
+	   
+-->
+<capabilityData xmlns="http://myfaces.apache.org/trinidad/agent/capabilities">
+  <capability name="-adfinternal-id" value="true"/>
+  <capability name="-adfinternal-disabledFormElements" value="true"/>
+  <capability name="-adfinternal-cssSelectors" value="multiple"/>
+  <capability name="-adfinternal-styleAttributes" value="external"/>
+  <capability name="-adfinternal-scriptingSpeed" value="slow"/>
+  <capability name="-adfinternal-partialRendering" value="true"/>
+  <capability name="-adfinternal-xmldom" value="true"/>  
+  <capability name="-adfinternal-onclick-input" value="true"/>  
+  <capability name="-adfinternal-onclickOnImgInput" value="false"/>    
+</capabilityData>