0

I have 26,000 records that will display in a form. It will run so slowly if I display them all in 1 page. I see if we can make paginator in list ex: dataList, dataTable, and dataGrid.

But I want to make a paginator in my many-check-box and paginator isn't its component

Below is my code:

<h:form>
                    <p:tabMenu>
                        <p:menuitem value="Customer" outcome="index" />
                        <p:menuitem value="Service" />
                        <p:menuitem value="Part" outcome="part"/>
                    </p:tabMenu>

    <p:selectManyCheckbox id="grid2" value="#{service.selectedList}" layout="responsive" paginator="true" >
        <f:selectItems value="#{service.allServices}"  />
    </p:selectManyCheckbox>

                </h:form>

May you tell me how to make a paginator on it? Thank you in advance

  • i don't have the time to provide an example but my approach would be using a `ui:repeat`, and place two components in it as a checkbox and a label. then you can store selections in a hashmap at the back-end bean class, using your service ids as keys and selection bools as values. – tt_emrah Jul 24 '15 at 13:23
  • Paging over 26000 records to either check them or not is bad ui design. Use a generic filtering mechanism. Or (ab)use a datatable with checkbox row selection and filtering. Waaaay better design – Kukeltje Jul 24 '15 at 17:17
  • 26,000 checkboxes in one page? Seriously? Add a search form. Google also doesn't show a gazillion results in one page. – BalusC Jul 24 '15 at 21:09
  • @Kukeltje how to make a datatable with checkbox row selection? – Veni Manurung Jul 25 '15 at 01:37
  • @BalusC yes, I want to make a filtering or search form. But first, I need to make them in different page( I mean something like paginator) – Veni Manurung Jul 25 '15 at 01:37
  • @tt_dev I understand what you mean. But may you tell me more about the hashmap? how to make it restored? – Veni Manurung Jul 25 '15 at 01:43
  • Is this a serious question? Start by taking a look at the PrimeFaces showcase… please… – Kukeltje Jul 25 '15 at 08:36
  • @Veni , you can use `` , with **selctionMode='multiple'** . you can check the required link [here](http://www.primefaces.org/showcase/ui/data/datatable/selection.xhtml) – Chirag Patel Jul 25 '15 at 17:32

0 Answers0