0
我正在試驗Primefaces導航和選擇,並且只有當我的行和列值完全匹配(兩個3不能是行= 1列= 3),那麼我沒有任何問題傳遞選定的元素。當列和行值不相等時,bookmarkletBean.selectedImage設置器從不在調試器中調用。爲什麼是這樣?Primefaces分頁行可以列必須相等嗎?
<p:dataGrid value="#{bookmarkletBean.imageURLs}" var="img" columns="3"
paginator="true" rows="3" effectSpeed="fast" pageLinks="5"
paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink}" paginatorPosition="bottom">
<p:column>
<p:commandLink actionListener="#{bookmarklet.next}">
<p:graphicImage value="#{img.url}" width="125" height="100"/>
<f:setPropertyActionListener value="#{img.url}" target="#{bookmarkletBean.selectedImage}"/>
</p:commandLink>
</p:column>
</p:dataGrid>