DataModel must implement org.primefaces.model.SelectableDataModel when selection is enabled

0

hello good morning I'm working with the following xhtml

    

    <h:form id="form_emisor_listado">
        <p:growl id="messages" showDetail="true" />
        <h:outputText id="txt_validador_controlador">
            <f:event type="postAddToView" listener="#{ctrAdmTipoCuentaListado.inicioValidacionMenu('adm_tipo_cuenta_listado')}" />
        </h:outputText>


        <dc:toolbar controlador="#{ctrAdmTipoCuentaListado}"
            usuarioCrea="#{ctrAdmTipoCuentaListado.objTipoCuentaSeleccionado.usuarioCrea}"
            fechaCrea="#{ctrAdmTipoCuentaListado.objTipoCuentaSeleccionado.fechaCrea}"
            fechaModifica="#{ctrAdmTipoCuentaListado.objTipoCuentaSeleccionado.fechaModifica}"
            usuarioModifica="#{ctrAdmTipoCuentaListado.objTipoCuentaSeleccionado.usuarioModifica}"
            nombreObjetosActualizar="form_emisor_listado:messages"
            verEliminar="false" verImprimir="false" />


        <p:dataTable id="dt_emisor" var="TipoCuenta"
            value="#{ctrAdmTipoCuentaListado.lstTiposCuenta}"
            emptyMessage="No se encuentra registros" paginator="true"
            rows="#{msg.varNumeroPaginacionesInicial}"
            rowsPerPageTemplate="#{msg.varNumeroPaginaciones}"
            paginatorPosition="bottom"
            paginatorTemplate=" {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
            selection="#{ctrAdmTipoCuentaListado.objTipoCuentaSeleccionado}"
            filteredValue="#{ctrAdmTipoCuentaListado.lstTiposCuentaFiltro}"
            selectionMode="single" rowKey="#{ctc.idTipoCuenta}">
            <f:facet name="header">
                Listado Tipo Cuenta
            </f:facet>

            <p:column headerText="Id" style="width:32px;text-align: center">
                <h:outputText value="#{TipoCuenta.idTipoCuenta}" />
            </p:column>


            <p:column headerText="Nombre" style="width:32px;text-align: center">
                <h:outputText value="#{TipoCuenta.nombre}" />

            </p:column>






        </p:dataTable>



    </h:form>





</ui:define>

    
asked by samuel perez 21.04.2018 в 16:13
source

1 answer

0

This problem occurs when in web.xml it is not configured to accept the pages. xhtml , I also leave you how to start the serverl of Faces

<servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
   <servlet-name>Faces Servlet</servlet-name>        
   <url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
    
answered by 23.04.2018 в 18:22