深藍的天空下,有你有我...
          共享酸、甜、苦、辣
          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 三刀流の逆風 閱讀(790) 評論(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>

          我試過了,這個寫法可以  回復  更多評論
            
          主站蜘蛛池模板: 闵行区| 汨罗市| 宁陕县| 托克逊县| 舒城县| 临桂县| 永平县| 城步| 乐安县| 象州县| 攀枝花市| 朝阳市| 贵溪市| 营口市| 泰州市| 襄垣县| 湾仔区| 盈江县| 南安市| 姜堰市| 红河县| 尤溪县| 连山| 安庆市| 循化| 泸西县| 吴江市| 同德县| 建宁县| 北海市| 靖州| 杭锦旗| 长丰县| 荔浦县| 贡觉县| 麟游县| 沙雅县| 恭城| 金秀| 塘沽区| 河北区|