深蓝的天空下,有你有我...
共享酸、甜、苦、辣
posts - 23,comments - 19,trackbacks - 0
If care is not taken with the quoting of literals, the expression language (OGNL) will misinterpret a char as a String. Wrong: Why doesn't this work when myString is equal to A? The solution is simple: flip the double and single quotes. Right: This works! Another solution is to escape the double quotes in the String. Also Right: This works too! 来自官方的FAQ: http://struts.apache.org/2.x/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html
posted on 2009-10-05 10:55 三刀流の逆风 阅读(780) 评论(1)  编辑  收藏 所属分类: Struts

FeedBack:
# re: struts2的标签如何判断单个字符?(Why won't the 'if' tag evaluate a one char string)[未登录]
2012-02-23 13:45 | 鹏鹏
<s:if test='caseCondition.caseGrade eq "C"'>checked="checked"</s:if>

我试过了,这个写法可以  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: