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 2010/01/05 13:48:31 UTC

svn commit: r896025 - in /myfaces/trinidad/branches/2.0.1-branch: trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/ trinidad-impl/src/main/java/org/apache/m...

Author: matzew
Date: Tue Jan  5 12:48:21 2010
New Revision: 896025

URL: http://svn.apache.org/viewvc?rev=896025&view=rev
Log:
updates...

Modified:
    myfaces/trinidad/branches/2.0.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
    myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/StyleContextImpl.java
    myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
    myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java

Modified: myfaces/trinidad/branches/2.0.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/2.0.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java?rev=896025&r1=896024&r2=896025&view=diff
==============================================================================
--- myfaces/trinidad/branches/2.0.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java (original)
+++ myfaces/trinidad/branches/2.0.1-branch/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java Tue Jan  5 12:48:21 2010
@@ -664,7 +664,7 @@
       _LOG.fine("Broadcasting event " + event + " to " + this);
 
     UIComponent component = event.getComponent();
-    if (component != null)
+    if (component != null && satisfiesPartialTrigger(event))
     {
       RequestContext adfContext = RequestContext.getCurrentInstance();
       if (adfContext != null)
@@ -689,6 +689,20 @@
     }
   }
 
+  /**
+   * Check if a faces event broadcast to this component should trigger the partial updates of the
+   * target listeners of this component. By default, all events trigger a partial update of the listeners.
+   *
+   * @param event The event to check
+   * @return true if the partial triggers should be updated by this event being broadcast
+   */
+  protected boolean satisfiesPartialTrigger(
+    FacesEvent event)
+  {
+    return true;
+  }
+
+
   // ------------------------------------------- Lifecycle Processing Methods
 
   @Override

Modified: myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/StyleContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/StyleContextImpl.java?rev=896025&r1=896024&r2=896025&view=diff
==============================================================================
--- myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/StyleContextImpl.java (original)
+++ myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/StyleContextImpl.java Tue Jan  5 12:48:21 2010
@@ -18,6 +18,8 @@
  */
 package org.apache.myfaces.trinidadinternal.renderkit.core;
 
+import java.beans.Beans;
+
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentMap;
@@ -109,8 +111,26 @@
   {
     return ((CoreRenderingContext) _arc).getTrinidadAgent();
   }
+
   public boolean checkStylesModified()
   {
+
+    if (Beans.isDesignTime())
+    {
+      // In Design Time mode, if we have a skin-id on the request scope,
+      // then this means we want to check if the skin css files are modified.
+      // This is an alternative to the initParam (CHECK_TIMESTAMP_PARAM) which
+      // is set in web.xml. Design Time cannot set the web.xml file.
+      FacesContext context = FacesContext.getCurrentInstance();
+      Object requestSkinId = 
+        ((CoreRenderingContext) _arc).getRequestMapSkinId(context);
+
+      if (requestSkinId != null)
+      {
+        return true;
+      }
+    }
+
     // TODO: similar code is present in the ViewHanlder;
     // this needs to be factored out into a common util.
     // See TRINIDAD-1662

Modified: myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java?rev=896025&r1=896024&r2=896025&view=diff
==============================================================================
--- myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java (original)
+++ myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/pda/PdaTableRenderer.java Tue Jan  5 12:48:21 2010
@@ -317,7 +317,7 @@
                                 IntegerUtils.getString(tContext.getActualColumnCount()),
                                 null);
 
-              // out.writeAttribute(CLASS_ATTRIBUTE, TABLE_DETAIL_STYLE);
+              renderStyleClass(fc, arc, SkinSelectors.AF_TABLE_DETAIL_STYLE);
 
               encodeChild(fc, detail);
 

Modified: myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java?rev=896025&r1=896024&r2=896025&view=diff
==============================================================================
--- myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java (original)
+++ myfaces/trinidad/branches/2.0.1-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/NavigationPaneRenderer.java Tue Jan  5 12:48:21 2010
@@ -897,7 +897,8 @@
 
       // In Safari and webkit browsers display:inline doesn't work as expected, and
       // display:inline-block need to be used to make the table inline.
-      if (rc.getAgent().getAgentName() == Agent.AGENT_WEBKIT)
+      // NokiaS60 has a webkit based browser
+      if (arc.getAgent().getAgentName() == Agent.AGENT_WEBKIT || isNokiaS60(arc))
       {
         appendedStyle = "display: inline-block;";
       }
@@ -1095,7 +1096,8 @@
 
     // In Safari and webkit browsers display:inline doesn't work as expected, and
     // display:inline-block need to be used to make the table inline.
-    if (rc.getAgent().getAgentName() == Agent.AGENT_WEBKIT)
+    // NokiaS60 has a webkit based browser
+    if (arc.getAgent().getAgentName() == Agent.AGENT_WEBKIT || isNokiaS60(arc))
     {
       appendedStyle = "display: inline-block;";
     }
@@ -1372,7 +1374,8 @@
 
     // In Safari and webkit browsers display:inline doesn't work as expected, and
     // display:inline-block need to be used to make the table inline.
-    if (rc.getAgent().getAgentName() == Agent.AGENT_WEBKIT)
+    // NokiaS60 has a webkit based browser
+    if (arc.getAgent().getAgentName() == Agent.AGENT_WEBKIT || isNokiaS60(arc))
     {
       appendedStyle = "display: inline-block;";
     }