Skip to Content
author's profile photo Former Member
Former Member

Restrict the number of orders loading in CsCockpit in 'Search for Orders' browser area


How can we restrict the number of orders loading in 'Search for Orders' browser area in CsCockpit ? Can we use the 'PagedFlexibleSearchService' for this ? If yes, How to get the page numbers from front end ?

Add a comment
10|10000 characters needed characters exceeded

  • Former Member

    I think we can use the FlexibleSearchQuery with the following values setting for pagination stuff.

    FlexibleSearchQuery searchQuery = new FlexibleSearchQuery(query.toString()); searchQuery.setStart(pageable.getPageNumber()); searchQuery.setCount(pageable.getPageSize()); searchQuery.setNeedTotal(true);

    We should override the following method to get the pageble data.

    @Override public FlexibleSearchQuery translateQuery(DefaultCsTextSearchCommand command, Pageable pageable) { return buildFlexibleSearchQuery(command, pageable); }

    Let me if this is correct or not ?

Related questions

1 Answer

  • Posted on Dec 16, 2014 at 08:15 PM

    Hi Murali,

    You can change the number of results being returned to the CsCockpit UI, by changing the pageSize variable in the \ext-channel\cscockpit\resources\cscockpit\cscockpit-spring-widgets.xml. You will need to find the correct SearchController bean to update this variable on. From my checks, it appears to be csBaseDefaultSearchController.

     <!-- Search controllers -->
     <alias alias="csBaseDefaultSearchController" name="defaultCsBaseDefaultSearchController" />
     <bean id="defaultCsBaseDefaultSearchController" abstract="true" scope="session" parent="csBaseWidgetController" class="">
         <property name="pageable.pageSize" value="8"/> <!-- This is the change -->
         <property name="baseSiteService" ref="baseSiteService"/>

    If it's changed to a large number (>10), the lazy loading has a habbit of ruining the displaying of the results, the solution to this is in this question; "While searching for customers, I find the first customer getting hidden in cscockpit??".

    I hope this is what you are looking for,


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.