No result defined for action com.jd.m.cms.web.action.IndexfloorAction and result Input问题
主要是参数的问题,如action中定义的是int类型,有可能vm页面写的是String,这样就会报如上的错误:
错误:
<input type="hidden" id="indexFloorImgIdList" name="indexFloorImgIdList" value="#if($temp<$!indexFloorImgIdList.size())$!indexFloorImgIdList.get($temp) #end "
size="20" />
正确:
<input type="hidden" id="indexFloorImgIdList" name="indexFloorImgIdList"
#if($temp<$!indexFloorImgIdList.size())
value="$!indexFloorImgIdList.get($temp)"
#end
size="20" />
注意蓝色部分,有空格,导致value变成了String。
参考:http://www.360doc.com/content/11/0613/16/6161903_126666872.shtml
本文详细解析了在开发过程中遇到的参数类型不匹配导致的错误问题,通过对比错误实例和正确实例,强调了在使用模板语言时注意数据类型的统一性的重要性。文章深入分析了错误产生的原因,并提供了修正方案,旨在帮助开发者避免此类常见错误。
11万+

被折叠的 条评论
为什么被折叠?



