You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/01/20 16:53:47 UTC
svn commit: r498131 -
/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/UIPage.java
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) {