myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1738908 - /myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
Date Wed, 13 Apr 2016 08:10:01 GMT
Author: lofwyr
Date: Wed Apr 13 08:10:01 2016
New Revision: 1738908

URL: http://svn.apache.org/viewvc?rev=1738908&view=rev
Log:
TOBAGO-1524: Use standard AJAX mechanism
* Hotfix for "suggest"

Modified:
    myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java

Modified: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java?rev=1738908&r1=1738907&r2=1738908&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
(original)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/AbstractUIPage.java
Wed Apr 13 08:10:01 2016
@@ -217,17 +217,22 @@ public abstract class AbstractUIPage ext
     // find the form of the action command and set submitted to it and all
     // children
 
+    final UIViewRoot viewRoot = facesContext.getViewRoot();
+
     // reset old submitted state
     setSubmitted(false);
 
     String sourceId = facesContext.getExternalContext().getRequestParameterMap().get("javax.faces.source");
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("sourceId = '" + sourceId + "'");
+    UIComponent command = null;
+    if (sourceId != null) {
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("sourceId = '" + sourceId + "'");
+      }
+      command = viewRoot.findComponent(sourceId);
+    } else {
+      LOG.warn("No sourceId found!");
     }
 
-    final UIViewRoot viewRoot = facesContext.getViewRoot();
-    UIComponent command = viewRoot.findComponent(sourceId);
-
     // TODO: remove this if block if proven this never happens anymore
     if (command == null
         && sourceId != null && sourceId.matches(".*:\\d+:.*")) {



Mime
View raw message