You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2007/01/21 21:47:17 UTC
svn commit: r498450 -
/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Author: weber
Date: Sun Jan 21 12:47:16 2007
New Revision: 498450
URL: http://svn.apache.org/viewvc?view=rev&rev=498450
Log:
TOBAGO-252 (Empty string in focusId attribute of tc:page forces the default behavior)
Modified:
myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Modified: myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?view=diff&rev=498450&r1=498449&r2=498450
==============================================================================
--- myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js (original)
+++ myfaces/tobago/trunk/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js Sun Jan 21 12:47:16 2007
@@ -93,7 +93,7 @@
* The id ot the element which should became the focus after loading.
* Set via renderer if requested.
*/
- focusId: null,
+ focusId: undefined,
htmlIdIndex: 0,
@@ -933,8 +933,10 @@
if (focusElement) {
try { // focus() on not visible elements breaks IE
focusElement.focus();
- } catch(ex) { }
- } else {
+ } catch(ex) {
+ LOG.warn("Exception when setting focus on : \"" + this.focusId + "\"");
+ }
+ } else if (typeof this.focusId == "undefined") {
foriLoop: for (var i = 0 ; i < document.forms.length ; i++) {
var form = document.forms[i];
if (form != null){
@@ -951,6 +953,8 @@
}
}
}
+ } else if (this.focusId.length > 0) {
+ LOG.warn("Can't find component to set focus : \"" + this.focusId + "\"");
}
},