Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从JSF托管bean获取重复控件的属性_Jsf_Jsf 2_Primefaces_Components - Fatal编程技术网

从JSF托管bean获取重复控件的属性

从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

我正在Websphere上使用JSF+Primefaces,试图创建一个类似粘性的应用程序

当使用onDrop listener时,我很难从重复的控件中获取属性(在本例中为位置设置样式)。这是我的密码:

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