Err:The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array
2010-01-07 10:09
941 查看
绑定数据显示下拉列表时,报了个错
The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value
JSP页面代码:
<select name="optype">
<option value="0">--请选择--</option>
<logic:iterate id="opt" name="kindss" scope="request">
<option value="${opt.id }" >${opt.name }</option>
</logic:iterate>
网上找解决方法也找不到合适的
改成下面代码时可以
<select name="optype">
<option value="0">--请选择项目类别--</option>
<logic:iterate id="opt" name="kindss" scope="request">
<option value="${opt[0] }" >${opt[1] }</option>
</logic:iterate>
先用着 有了更好的方法后再说了
The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List or array, but that value
JSP页面代码:
<select name="optype">
<option value="0">--请选择--</option>
<logic:iterate id="opt" name="kindss" scope="request">
<option value="${opt.id }" >${opt.name }</option>
</logic:iterate>
网上找解决方法也找不到合适的
改成下面代码时可以
<select name="optype">
<option value="0">--请选择项目类别--</option>
<logic:iterate id="opt" name="kindss" scope="request">
<option value="${opt[0] }" >${opt[1] }</option>
</logic:iterate>
先用着 有了更好的方法后再说了
相关文章推荐
- The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List
- 问题解决:javax.servlet.jsp.el.ELException: The "." operator was supplied with an index value of type "java.lang.String" to be applie
- Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSON
- Unable to find a value for "dwmc" in object of class "java.lang.String" using operator "." (null
- org.json.JSONException: Value ok of type java.lang.String cannot be converted to JSONObject:
- new JSONObject(str)无法解析 报错:org.json.JSONException: Value of type java.lang.String cannot be converted to JSONObject
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSONArra
- Json解析异常处理方式(JSONException: Value of type java.lang.String cannot be converted to JSONObject)
- Json解析异常处理方式(JSONException: Value of type java.lang.String cannot be converted to JSONObject)
- Value of type java.lang.String cannot be converted to JSONObject 异常
- Value of type java.lang.String cannot be converted to JSONObject
- Cannot convert value of type [java.lang.String] to required type [java.util.Date] for property 'xxx': no matching editors or conversion strategy found
- JSONException: Value of type java.lang.String cannot be converted to JSONObject
- java.lang.RuntimeException: Value <pre>bool(false) of type java.lang.String cannot be converted to J
- JSONException: Value of type java.lang.String cannot be converted to JSONObject
- Json解析异常处理方式(JSONException: Value of type java.lang.String cannot be converted to JSONObject)
- org.json.JSONException: Value of type java.lang.String cannot be converted to JSON
- org.json.JSONException: Value ok of type java.lang.String cannot be converted to JSONObject: [Caugh
- 表单提交时候"Failed to convert property value of type [java.lang.String] to