【发布时间】:2023-04-04 00:34:02
【问题描述】:
我有以下数据列表,它显示带有分页的图像,一次显示一个图像。当我单击我的 p:commandButton 时,我希望能够知道/检索正在显示的图像,以便我可以在我的 actionListener 方法(bookmarkletBean.update)中访问它。这里有什么想法吗?
<p:dataList value="#{bookmarkletBean.imageURLs}" var="img"
paginator="true" rows="1" effectSpeed="fast" pageLinks="4"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}" paginatorPosition="bottom">
<p:column>
<p:graphicImage value="#{img}" width="200" height="110"/>
</p:column>
</p:dataList>
<p:commandButton styleClass="form-btn1" value="#{bundle['save.button.TEXT']}"
actionListener="#{bookmarkletBean.update}" oncomplete="bookmarkletAddedDlg.show()" />
【问题讨论】:
-
那么显然格式化帖子以便更容易和增强阅读不再值得了吗?
标签: primefaces