Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8250737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:59:54+00:00 2026-06-07T23:59:54+00:00

I need to use two different <liferay-ui:search-container> tags in a single JSP. The pagination

  • 0

I need to use two different <liferay-ui:search-container> tags in a single JSP.

The pagination gives issues if we use two <liferay-ui:search-container> tags:

  1. When I click on the 3rd page of the first <liferay-ui:search-container> tag the second <liferay-ui:search-container> tag also moves to the third page.

  2. Also if for the first <liferay-ui:search-container> tag I am on page-3 and I click page-2 of second <liferay-ui:search-container> tag then the second tag goes to page-2 but the first tag results is reset to page-1.

They should be independent of each other.

Environment: Liferay 6.+

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T23:59:56+00:00Added an answer on June 7, 2026 at 11:59 pm

    I found two different ways to do this:

    1. This is possible through the use of curParam attribute in <liferay-ui:search-container> tag, noticed the curParam="folderCurParam" and curParam="fileCurParam" in the following code, I found this way through liferay’s source code docroot/html/portlet/document_library_display/view.jsp and docroot/html/portlet/document_library_display/view_file_entries.jspf:

      <liferay-ui:search-container
              curParam="folderCurParam"
              emptyResultsMessage="no-folders-to-display"  
              iteratorURL="<%= portletURL %>"
              delta="10">
      
          <liferay-ui:search-container-results
                  results="<%=folderResults %>"
                  total="<%= folderTotal %>" />
      
          <liferay-ui:search-container-row
                  className="com.liferay.portal.kernel.repository.model.Folder"
                  keyProperty="userId"
                  modelVar="folder">
      
              <liferay-ui:search-container-column-jsp align="left"
                      path="/html/documentdisplay/folder_search_results.jsp" />
      
          </liferay-ui:search-container-row>
      
          <liferay-ui:search-iterator />
      
      </liferay-ui:search-container>
      
      <liferay-ui:search-container
              curParam="fileCurParam"
              emptyResultsMessage="no-files-to-display" 
              iteratorURL="<%= portletURL %>"
              delta="10">
          <liferay-ui:search-container-results
                  results="<%=fileResults %>"
                  total="<%= fileTotal %>" />
      
          <liferay-ui:search-container-row
                  className="com.liferay.portal.kernel.repository.model.FileEntry"
                  keyProperty="userId"
                  modelVar="fileEntry">
      
              <liferay-ui:search-container-column-jsp align="left"
                      path="/html/documentdisplay/files_search_results.jsp" />
      
          </liferay-ui:search-container-row>
      
          <liferay-ui:search-iterator />
      
      </liferay-ui:search-container>
      
    2. I found this again in liferay’s source code docroot/html/portlet/journal/select_document_library.jsp, this uses the SearchContainer constructor to set the curParam, notice the parameter "cur1" for folders and for files it is "cur2":

      // for folders
      SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, "cur1", SearchContainer.DEFAULT_DELTA, portletURL, headerNames, "there-are-no-folders");
      
      // for files
      searchContainer = new SearchContainer(renderRequest, null, null, "cur2", SearchContainer.DEFAULT_DELTA, portletURL, headerNames, "there-are-no-documents-in-this-folder");
      

    Hope this helps someone.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am parsing two different sites having similar HTML tags. I need to use
i need to use GPS in two different views. i have it set up
How can I use two different celery project which consumes messages from single RabbitMQ
I need to use two extension methods SqlCommandExtensions & SqlConnectionExtensions http://msdn.microsoft.com/en-us/library/microsoft.practices.enterpriselibrary.windowsazure.transientfaulthandling.sqlazure(v=pandp.50).aspx Here they say
As the question states, I have two ethernet devices I need to use. A
I need to merge two bitmaps to use the resulting bitmap as a mask.
How can I easily use two different databases for debug and release scenarios? I
Is it possible to use two different databases on WordPress depending the environment where
What happens if two different libs define the same enum and I need to
Can I use two different back ends for an .net Entity Framework project? I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.