我想要在共同财产基金中产生图象的URL,其代码如下......
<c:choose>
<c:when test="#{cc.attrs.index == 0}">
<c:set var="image" value="image.png" />
</c:when>
<c:otherwise>
<c:set var="image" value="image1.png" />
</c:otherwise>
</c:choose>
<img src="#{image}" />
但是,在我执政时,我收到了一份数字表:
java.lang.NumberFormatException: For input string: "image.png"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1241)
at java.lang.Double.valueOf(Double.java:504)
at com.sun.el.lang.ELArithmetic$DoubleDelegate.coerce(ELArithmetic.java:148)
at com.sun.el.lang.ELArithmetic.coerce(ELArithmetic.java:373)
at com.sun.el.lang.ELArithmetic.add(ELArithmetic.java:254)
at com.sun.el.parser.AstPlus.getValue(AstPlus.java:57)
at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:206)
at org.apache.myfaces.view.facelets.el.ELText$ELTextVariable.toString(ELText.java:208)
at org.apache.myfaces.view.facelets.el.ELText$ELTextComposite.toString(ELText.java:140)
...
现在我的问题是: 是否真的,<条码>c:>条码>不接受“价值”?
BTW, 当我使用参数时,例如
<c:set var="image" value="#{cc.attrs.index}" />
一切都属于罚款,但都不是正确的。
我的天候:
- org.apache.myfaces.core.myfaces-api 2.1.7
- org.apache.myfaces.core.myfaces-impl 2.1.7
- javax.el.el-api 2.2