Marcar como vistos

Deseamos que al presionar el boton de marcar los marque como vistos

 <jmoordbjsf:paginator 
                    controller="#{jmoordbNotificationsController}"     
                   renderedNew="false"
                   renderedPrint="false"
                    rowPage="#{jmoordbNotificationsController.rowPage}"                   
                    page="#{jmoordbNotificationsController.page}"
                    pages="#{jmoordbNotificationsController.pages}"
                    skip="ajax:jmoordbNotificationsController.skip()" 
                    url = "/pages/jmoordbNotifications/new.xhtml"
                    />
               
                <b:dataTable value="#{jmoordbNotificationsController.jmoordbNotificationsDataModel}"
                             var="item"
                             id="dataTable2"
                             paginated="false"
                             onpage="console.log('page');">


                    <b:dataTableColumn value="#{item.idjmoordbnotifications}" label="#{app['field.idjmoordbnotifications']}"/>
                    
                    <b:dataTableColumn value="#{item.message}" label="#{app['field.message']}"/>
                    <b:dataTableColumn value="#{item.type}" label="#{app['field.type']}"/>
                  
                    <b:dataTableColumn value="#{jmoordbNotificationsController.showDate(item.date)}" label="#{app['field.date']}"/>

                    <b:dataTableColumn value="#{item.viewed}" label="#{app['field.viewed']}" />

                    <b:dataTableColumn label="">
                         <b:commandButton action="#{jmoordbNotificationsController.markAsViewed(item)}"
                                          iconAwesome="fa-check-square-o" 
                                         update=":form:dataTable, :form:msgs"/>
                       
                     
                    </b:dataTableColumn>

                </b:dataTable>

En el Controller

Last updated

Was this helpful?