2013-04-05 70 views
0

我试图使用fn:lengthc:when一起错误EL表达式

<c:when test="${fn:trim(${properties.num2display})== null}"> 
    <c:set var="counter" value="3"/> 
    condition 1 
</c:when> 

给我的错误:

contains invalid expression(s): javax.el.ELException: Error Parsing: 
    ${fn:trim(${properties.num2display})== null} 

什么是写里面fn:trim表达正确的方法是什么?

+1

我猜你应该使用'$ {空FN:修剪($ {} properties.num2display)}'(虽然没有测试)。 – 2013-04-05 03:11:17

回答

1

试试这个:

<c:when test="${not empty fn:trim(properties.num2display)}"> 
    <c:set var="counter" value="3"/> 
    condition 1 
</c:when> 
+0

这有帮助,谢谢 – KAPILP 2013-04-05 20:41:08