0

I have an xhtml like this:

<p:dataList id="accordion"
    value="#{myBackingBean.beans}" var="bean" 
    paginator="true" rows="3" effectSpeed="fast"
    paginatorTemplate=" {CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
    rowsPerPageTemplate="10,20,30,40" type="none"
    paginatorPosition="both">
            <h:panelGroup layout="block">
                                <ui:include src="another_file.xhtml"/>
            </h:panelGroup>
</p:dataList>

Inside another_file.xhtml I have:

<ui:fragment xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    xmlns:p="http://primefaces.org/ui">

            <p:commandButton process="@this" value="text of t hebutton"         actionListener="#{myBackingBean.meEvent(bean)}" update="@this"/>
</ui:fragment>

When I load the page, the function myBackingBean.meEvent(bean) is correctly called. When I switch to another page, using the PrimeFfaces paginator, the function is no more called.

Any idea on how I could solve it?

Antonio Ragagnin
  • 2,278
  • 4
  • 24
  • 39
  • Your commandbutton should be enclosed in a `` to be able to execute in a datalist – kolossus Aug 14 '14 at 21:06
  • @kolossus are you sure?? I do not have primefaces right now, but `` is not used in the datalist: http://www.primefaces.org/showcase/ui/data/dataList.xhtml – Antonio Ragagnin Aug 16 '14 at 08:01
  • [`dataGrid` has the same "feature"](http://stackoverflow.com/questions/11985305/primefaces-datagrid-commandlink-is-not-working). I imagine the same might be true for a datalist – kolossus Aug 18 '14 at 13:00

0 Answers0