0

i need implement a RowClick in JSF DataTable like primefaces and richfaces, but i can't use this libraries. This is my datatable, inside a composite component:

 <h:dataTable var="bean"
                                             value="#{cc.attrs.managedBean.beans}"
                                             id="#{cc.attrs.idDataTable}"
                                             styleClass="display responsive nowrap table table-bordered table-hover dataTable table-striped dataTableJquery">
                                    <h:column rendered="#{cc.attrs.showSelectAll}"
                                              headerClass="checkboxMarkAll">
                                        <f:facet name="header">
                                            <h:selectBooleanCheckbox
                                                    title="Clique para marcar/desmarcar todos"
                                                    value="#{cc.attrs.managedBean.selectedAll}"
                                                    valueChangeListener="#{cc.attrs.managedBean.selectAll}">
                                                <f:ajax execute="@this" render="@form"/>
                                            </h:selectBooleanCheckbox>
                                        </f:facet>

                                        <h:selectBooleanCheckbox value="#{bean.selected}">
                                            <f:ajax execute="@this" render="@form"/>
                                        </h:selectBooleanCheckbox>

                                    </h:column>

                                    <composite:insertChildren/>

                                    <h:column headerClass="not-desktop"/>
                                </h:dataTable>

I'm trying to think how can i implement a rowClick to all columns. DO you guys have some ideia ?

Ronaldo Lanhellas
  • 2,975
  • 5
  • 46
  • 92
  • Look at the client-side generated html. How would you do it on that html? Do it the same and then port that port to jsf. JSF is mainly a html generator in that regard. – Kukeltje Feb 01 '17 at 21:03
  • Or look at the source of PrimeFaces or RichFaces and learn from there – Kukeltje Feb 01 '17 at 21:29
  • @Kukeltje, i know how to do it in HTML, putting a "onclick" inside TR tag, like this: "". But in JSF i don't have access to TR tag, just (h:column). Do you have some tip ? – Ronaldo Lanhellas Feb 02 '17 at 00:33
  • http://stackoverflow.com/questions/6348494/addeventlistener-vs-onclick – Kukeltje Feb 02 '17 at 07:21

0 Answers0