这是我的XHTML片段:
<h:form><p:separator/><p:panel header="Attachments" toggleable="true" disabled="false" readonly="false" rendered="true">
<c:forEach id="availableAttachments" items="#{userCRBean.user.attachments}" var="attachment" varStatus="status">
<p:commandButton ajax="false" disabled="false" id="attachmentButton" readonly="false" rendered="true" value="#{attachment.fileName}">
<p:fileDownload value="#{userCRBean.handleFileDownload(attachment)}"/>
</p:commandButton>
</c:forEach>
<p:draggable revert="true" for="attachmentButton" disabled="false" readonly="false" rendered="true"/>
<p:droppable activeStyleClass="ui-state-highlight" tolerance="touch" for="fileUpload" disabled="false" readonly="false" rendered="true">
<p:ajax listener="#{userCRBean.handleFileDelete(attachment)}" update="" disabled="false" readonly="false" rendered="true"/>
</p:droppable>
<p:fileUpload dragDropSupport="true" fileUploadListener="#{userCRBean.handleFileUpload}" id="fileUpload" mode="advanced" sizeLimit="1000000" update="@form"/>
</p:panel></h:form>
我想让c:forEach生成的p:commandButtons可拖动,但它们根本不会移动。任何想法,我在这里做错了什么?
PrimeFaces 5.2