报错不一定问题就出在报错的那段代码

出错信息如下:

java.lang.IllegalArgumentException: Value binding '#{selectSourceFieldBB.sourceTableList}'of UISelectItems with component-path {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /page/mapping/selectSourceField.jsp][Class: javax.faces.component.html.HtmlForm,Id: MyForm][Class: cn.ccb.tag.panelgrid.HtmlPanelGrid,Id: _id0][Class: javax.faces.component.html.HtmlSelectOneMenu,Id: sel_sourceTable][Class: javax.faces.component.UISelectItems,Id: _id6]} does not reference an Object of type SelectItem, SelectItem[], Collection or Map but of type : null

其实是前面程序就出错了,本来selectItem是可以取到值的但后来我在程序加了

var trtSysObj=document.getElementById("MyForm:targetSystem");    
   trtSysObj.value=targetSystem;

脚本出错,导致要在后面 selectItem取不到值,但还没进入页面,又不会报JS的错,所以就报出上面的错误信息了

你可能感兴趣的:(html,jsp,脚本)