我在页面上有一个treeTable组件,组件的节点用node变量来表示,页面上还有一个参数#{bindings.quantity},我想计算#{node.unit_cost}乘以#{bindings.quantity}的值再赋给treeTable上的一个outputText组件。可是我用表达式#{bindings.quantity * node.unit_cost}时就会报错,提示:
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key el.convert
at java.util.ResourceBundle.getObject(ResourceBundle.java:384)
at java.util.ResourceBundle.getString(ResourceBundle.java:344)
at com.sun.el.util.MessageFactory.getArray(MessageFactory.java:75)
at com.sun.el.util.MessageFactory.get(MessageFactory.java:55)
at com.sun.el.lang.ELArithmetic.coerce(ELArithmetic.java:373)我要怎样才能用EL表达式来计算这个值呢?

解决方案 »

  1.   


    ${ bindings.quantity } * ${ node.unit_cost }
      

  2.   

    这个不行的,ADF的outputText组件的value只能用#{}
      

  3.   

    ${ bindings.quantity } * ${ node.unit_cost }
      

  4.   

    #{bindings.quantity * node.unit_cost}
    肯定报错,因为延迟EL都是要绑后台Bean的,到哪儿去找它绑的这个属性(它被写成了表达式!)。只能用只读EL来输出计算后的值,如下:${bindings.quantity * node.unit_cost}直接甩页面上,不要放outputText中了