从JSF托管bean获取重复控件的属性
我正在Websphere上使用JSF+Primefaces,试图创建一个类似粘性的应用程序 当使用onDrop listener时,我很难从重复的控件中获取属性(在本例中为位置设置样式)。这是我的密码:从JSF托管bean获取重复控件的属性,jsf,jsf-2,primefaces,components,Jsf,Jsf 2,Primefaces,Components,我正在Websphere上使用JSF+Primefaces,试图创建一个类似粘性的应用程序 当使用onDrop listener时,我很难从重复的控件中获取属性(在本例中为位置设置样式)。这是我的密码: board.xhtml <h:form id="mainForm"> <p:dataList id="restPanel" styleClass="restrictPanel" var="note" value="#{publicBoard.getNot
board.xhtml
<h:form id="mainForm">
<p:dataList id="restPanel" styleClass="restrictPanel" var="note"
value="#{publicBoard.getNotes()}" columns="1" type="none">
<p:panel id="note" header="#{note.title}" styleClass="smallNote"
style="#{publicBoard.getNoteStyle(note)}">
<h:outputText value="#{note.description}" />
</p:panel>
<p:draggable for="note" containment="parent" opacity="0.3" />
</p:dataList>
<p:droppable for="mainForm" datasource="restPanel">
<p:ajax process="@form" listener="#{publicBoard.onDrop}" />
</p:droppable>
</h:form>
结果
[22.07.15 14:27:16:094 CEST] 000000c8 SystemOut O NOTE ID:4
[22.07.15 14:27:16:094 CEST] 000000c8 SystemOut O mainForm:restPanel:3:note
[22.07.15 14:27:16:094 CEST] 000000c8 SystemOut O NULL COMPONENT
任何帮助都将不胜感激
[22.07.15 14:27:16:094 CEST] 000000c8 SystemOut O NOTE ID:4
[22.07.15 14:27:16:094 CEST] 000000c8 SystemOut O mainForm:restPanel:3:note
[22.07.15 14:27:16:094 CEST] 000000c8 SystemOut O NULL COMPONENT