You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mm...@apache.org on 2006/03/03 19:51:49 UTC
svn commit: r382908 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/inputsuggestajax/resource/tableSuggest.js
Author: mmarinschek
Date: Fri Mar 3 10:51:47 2006
New Revision: 382908
URL: http://svn.apache.org/viewcvs?rev=382908&view=rev
Log:
slight change to tableSuggest javascript
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/inputsuggestajax/resource/tableSuggest.js
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/inputsuggestajax/resource/tableSuggest.js
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/inputsuggestajax/resource/tableSuggest.js?rev=382908&r1=382907&r2=382908&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/inputsuggestajax/resource/tableSuggest.js (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources/org/apache/myfaces/custom/inputsuggestajax/resource/tableSuggest.js Fri Mar 3 10:51:47 2006
@@ -30,16 +30,19 @@
var idToPutValue = trElem.childNodes[j].id.substr(11);
var elemToPutValue = document.getElementById(idToPutValue);
- if(trElem.childNodes[j].childNodes[1] == null)
- elemToPutValue.value = trElem.childNodes[j].childNodes[0].innerHTML;
- else
- { //quick fix to put the value in a selectOneMenu; todo: more generic and embedding in dojo
- for(i=0;i<elemToPutValue.options.length;i++)
- {
- if(elemToPutValue.options[i].value == trElem.childNodes[j].childNodes[1].innerHTML)
- elemToPutValue.options[i].selected = true;
+ if (elemToPutValue && idToPutValue)
+ {
+ if (trElem.childNodes[j].childNodes[1] == null)
+ elemToPutValue.value = trElem.childNodes[j].childNodes[0].innerHTML;
+ else
+ { //quick fix to put the value in a selectOneMenu; todo: more generic and embedding in dojo
+ for (i = 0; i < elemToPutValue.options.length; i++)
+ {
+ if (elemToPutValue.options[i].value == trElem.childNodes[j].childNodes[1].innerHTML)
+ elemToPutValue.options[i].selected = true;
+ }
}
- }
+ }
}
};