SelectCheckBoxMenu slow dropdown

UI Components for JSF
Post Reply
Carlos T PF
Posts: 1
Joined: 26 Mar 2015, 11:14

26 Mar 2015, 14:36

Hello,

I have a problem with the SelectCheckBoxMenu component. When clicking the menu icon on the selectCheckBoxMenu, if I have 50 elements, these are shown rapidly , but if I have more than 2000 elements, the dropdown is very slow. Is there any way to improve this deployment time menu?

This is my SelectCheckBoxMenu:

Code: Select all

<p:selectCheckboxMenu id="Strings" value="#{MyController.selectedStrings}" 
label="#{i18n['common.actions.select']}..." filter="true" >
<f:selectItems value="#{MyController.listOfStrings}" />
</p:selectCheckboxMenu>
ListOfStrings is a list of Strings and is loading in my controller when I load the page. My PrimeFaces version is 5.0.

Thanks.
Last edited by Carlos T PF on 27 Mar 2015, 10:16, edited 2 times in total.

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

26 Mar 2015, 20:22

Carlos T PF wrote:I have a problem with the SelectCheckBoxMenu component. When clicking the menu icon on the selectCheckBoxMenu, if I have 50 elements, these are shown rapidly , but if I have more than 2000 elements, the dropdown is very slow. Is there any way to improve this deployment time menu?
Wow. Use p:datatable with multiple row selection (without checkbox or radio selection).

Multiple with Meta and Shift keys

Code: Select all

    <p:dataTable id="multipleDT" var="car" value="#{dtSelectionView.cars4}" selectionMode="multiple" selection="#{dtSelectionView.selectedCars}" rowKey="#{car.id}">
        <f:facet name="header">
            Multiple with Meta and Shift keys
        </f:facet>
        <p:column headerText="Id">
            <h:outputText value="#{car.id}" />
        </p:column>
        <p:column headerText="Year">
            <h:outputText value="#{car.year}" />
        </p:column>
        <p:column headerText="Brand">
            <h:outputText value="#{car.brand}" />
        </p:column>
        <p:column headerText="Color">
            <h:outputText value="#{car.color}" />
        </p:column>
        <f:facet name="footer">
            <p:commandButton process="multipleDT" update=":form:multiCarDetail" icon="ui-icon-search" value="View" oncomplete="PF('multiCarDialog').show()" />
        </f:facet>
    </p:dataTable>
 
that's my 2 cents; that's my preference in my app.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

User avatar
sudheer
PrimeFaces Core Developer
Posts: 4345
Joined: 16 Oct 2011, 19:19
Location: Singapore

27 Mar 2015, 07:49

Sometime back I tried with large items(~500-1000) on selectCheckboxMenu without issues.But I didn't with different dataset sizes.Normally PF components are rich widgets with more js and CSS scripts and this might impact page loading also.

Ofcourse those many items are bit huge for form components.
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/

___________________
Sudheer Jonna

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 59 guests