深藍的天空下,有你有我...
          共享酸、甜、苦、辣
          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>

          我試過了,這個寫法可以  回復  更多評論
            
          主站蜘蛛池模板: 大冶市| 青神县| 临泉县| 紫金县| 安阳市| 南和县| 陇川县| 克什克腾旗| 芜湖市| 湘潭市| 花莲县| 泰顺县| 全南县| 郯城县| 禹城市| 瓦房店市| 高密市| 宜城市| 平乐县| 桂阳县| 长乐市| 酉阳| 习水县| 淮阳县| 高阳县| 望城县| 涞水县| 荣昌县| 奈曼旗| 申扎县| 北京市| 沙洋县| 纳雍县| 关岭| 兰西县| 云梦县| 梓潼县| 陕西省| 历史| 昔阳县| 昌图县|