myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r498131 - /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
Date Sat, 20 Jan 2007 15:53:47 GMT
Author: bommel
Date: Sat Jan 20 07:53:46 2007
New Revision: 498131

URL: http://svn.apache.org/viewvc?view=rev&rev=498131
Log:
(TOBAGO-253) Allow setting the focusId of UIPage with a ValueBinding

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java?view=diff&rev=498131&r1=498130&r2=498131
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
Sat Jan 20 07:53:46 2007
@@ -23,6 +23,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_FOCUS_ID;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_HEIGHT;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STATE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_WIDTH;
@@ -283,7 +284,15 @@
 // ///////////////////////////////////////////// bean getter + setter
 
   public String getFocusId() {
-    return focusId;
+    if (focusId != null) {
+      return focusId;
+    }
+    ValueBinding vb = getValueBinding(ATTR_FOCUS_ID);
+    if (vb != null) {
+      return (String) vb.getValue(getFacesContext());
+    } else {
+      return null;
+    }
   }
 
   public void setFocusId(String focusId) {



Mime
View raw message