在 JSF EL 表达式中连接两个字符串
我有以下 el 表达式:
<af:outputText value="#{viewArticle.publish ? ('Publish on ' + viewArticle.publishDate + ' by ' + viewArticle.publishFirstName + ' ' + viewArticle.publishLastName) : 'Draft version'}"/>
但我得到了
java.lang.NumberFormatException: For input string: "Publish on "
如何加入字符串?