2013-04-05 67 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