You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2013/10/16 15:35:57 UTC

svn commit: r1532758 - in /myfaces/tobago/trunk: pom.xml tobago-core/pom.xml tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java

Author: lofwyr
Date: Wed Oct 16 13:35:56 2013
New Revision: 1532758

URL: http://svn.apache.org/r1532758
Log:
TOBAGO-633: Portlet support
 - working on portlet support
 - actions are working now
 - Update API to 2.0

Modified:
    myfaces/tobago/trunk/pom.xml
    myfaces/tobago/trunk/tobago-core/pom.xml
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java

Modified: myfaces/tobago/trunk/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/pom.xml?rev=1532758&r1=1532757&r2=1532758&view=diff
==============================================================================
--- myfaces/tobago/trunk/pom.xml (original)
+++ myfaces/tobago/trunk/pom.xml Wed Oct 16 13:35:56 2013
@@ -517,9 +517,9 @@
         <scope>provided</scope>
       </dependency>
       <dependency>
-        <groupId>portlet-api</groupId>
+        <groupId>javax.portlet</groupId>
         <artifactId>portlet-api</artifactId>
-        <version>1.0</version>
+        <version>2.0</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
@@ -1721,7 +1721,7 @@
     <myfaces20.version>2.0.18</myfaces20.version>
     <myfaces21.version>2.1.12</myfaces21.version>
     <mojarra20.version>2.0.11</mojarra20.version>
-    <mojarra21.version>2.1.25</mojarra21.version>
+    <mojarra21.version>2.1.7</mojarra21.version>
     <mojarra22.version>2.2.2</mojarra22.version>
     <slf4j.version>1.7.5</slf4j.version>
     <logback.version>1.0.11</logback.version>

Modified: myfaces/tobago/trunk/tobago-core/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/pom.xml?rev=1532758&r1=1532757&r2=1532758&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/pom.xml (original)
+++ myfaces/tobago/trunk/tobago-core/pom.xml Wed Oct 16 13:35:56 2013
@@ -205,7 +205,6 @@
     <dependency>
       <groupId>javax.portlet</groupId>
       <artifactId>portlet-api</artifactId>
-      <version>1.0</version>
       <scope>provided</scope>
     </dependency>
 

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java?rev=1532758&r1=1532757&r2=1532758&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java Wed Oct 16 13:35:56 2013
@@ -46,6 +46,7 @@ import javax.el.ELContext;
 import javax.el.ValueExpression;
 import javax.faces.application.FacesMessage;
 import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.servlet.ServletRequest;
 import javax.servlet.http.HttpServletRequestWrapper;
@@ -131,12 +132,8 @@ public abstract class AbstractUIPage ext
       LOG.debug("actionId = '" + currentActionId + "'");
     }
 
-    UIComponent command = null;
-    try { // todo: try bock should be removed, when tested, that the warning usually not occure.
-      command = findComponent(currentActionId);
-    } catch (Exception e) {
-      LOG.warn("Should not happen!!! currentActionId='" + currentActionId + "'");
-    }
+    final UIViewRoot viewRoot = facesContext.getViewRoot();
+    UIComponent command = viewRoot.findComponent(currentActionId);
 
     // TODO: remove this if block if proven this never happens anymore
     if (command == null
@@ -147,7 +144,7 @@ public abstract class AbstractUIPage ext
       // related form, so removing the rowIndex will help here.
       currentActionId = currentActionId.replaceAll(":\\d+:", ":");
       try {
-        command = findComponent(currentActionId);
+        command = viewRoot.findComponent(currentActionId);
         //LOG.info("command = \"" + command + "\"", new Exception());
       } catch (Exception e) {
         // ignore
@@ -157,7 +154,7 @@ public abstract class AbstractUIPage ext
     if (LOG.isTraceEnabled()) {
       LOG.trace(currentActionId);
       LOG.trace("command:{}", command);
-      LOG.trace(DebugUtils.toString(facesContext.getViewRoot(), 0));
+      LOG.trace(DebugUtils.toString(viewRoot, 0));
     }
 
     if (command != null) {