在PrimeFaces数据表中,我将p:commandButton
放在一列中,其中p:dialog
内置p:galleria
。出于某种原因,NetBeans无法正确检测f:param
标记中使用的对象。相反,它获取数据表的对象(Address
)。
在执行项目时,galleria工作正常,但NetBeans在该行中看到了警告,我想摆脱它:
未知财产“id”
HTML code:
<p:column exportable="false" colspan="1">
<p:commandButton action="#{dashboardMB.onViewPhotosClick(address)}"
icon="ui-icon-image"
id="btn_viewphoto"
oncomplete="PF('dialog_photo').show();"
style="font-size:12px; width:100px; height:25px; display:block; text-align:center; margin:0 auto;"
styleClass="btn-photos"
title="VIEW PHOTOS"
update="dlg_photo"
value="PHOTOS">
<p:dialog id="dlg_photo"
modal="true"
widgetVar="dialog_photo"
showEffect="fade"
hideEffect="fade"
resizable="false"
style="width:700px;"
header="#{address.shopName} (ID ##{address.shopId})">
<p:galleria autoPlay="false"
id="dlg_photo_galleria"
panelHeight="313"
panelWidth="500"
showCaption="true"
style="border-bottom: 20px solid white;"
value="#{address.photos}"
var="photo">
<p:graphicImage cache="false"
title="Operator: #{address.operator}"
value="#{photoMB.image}"
width="500">
<f:param name="id" value="#{photo.id}" />
</p:graphicImage>
</p:galleria>
</p:dialog>
</p:commandButton>
</p:column>
编辑:
DashboardMB getter,Address类,Photo类和dataTable http://pastebin.com/cEyARZwf
PhotoMB http://pastebin.com/DnezFFBT