-1
当我使用下面的代码时,我得到java.lang.IllegalArgumentException错误。我不能在f:属性中使用jsf 2.0 el表达式吗?
<h:dataTable value="#{toDoBean.toDoItemList}" var="toDoItem" >
<h:column>
<h:selectBooleanCheckbox value="#{toDoItem.finsh}"
valueChangeListener="#{toDoBean.onStatusChange}"
onchange="submit()"/>
</h:column>
<h:column>
<h:outputText value="#{toDoItem.title}"/>
</h:column>
<h:column>
<h:commandButton value="X" actionListener="#{toDoBean.onDelete}">
<f:attribute name="id" value="#{toDoItem.title}" />
</h:commandButton>
</h:column>
</h:dataTable>
但是如果我换成
<f:attribute name="id" value="#{toDoItem.title}" />
与
<f:attribute name="id" value="testing" />
然后一切工作正常。
所以我的假设是“我不能使用EL与f:属性”。
- 我说错了吗?
- 为什么?
- 有没有办法在f:属性中使用el?
“F:属性”标签允许您将属性值传递到组件,或通过动作侦听器的参数的组件。 – Scorpion 2014-11-24 12:49:12
'#{toDoItem.title}'是否解析为'String'? “”中的每一行是否填有“标题”? –
2014-11-24 13:03:08
您应该显示您的managedbean。 – wittakarn 2014-11-24 15:53:22