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 3695074
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:34:25+00:00 2026-05-19T04:34:25+00:00

Our page has a datatable which shows records from a web service. The web

  • 0

Our page has a datatable which shows records from a web service. The web service queries a database, and the query can take from 10 secs to 100 secs.

I was initially loading the arraylist binded to the datatable in the backing bean constructor:

private ArrayList myList;
public MyBean
{
     myList = WebServices.getList();
}

In this scenario, the entire page starts to render only after the web service returns all data.

Where should I call the webservice (i.e., do myList = WebServices.getList(); ) in order to have the rest of the page load in parallel, and show a progress bar or something in the datatable while the webservice runs?

I guess my concepts about the JSF/IceFaces lifecycle are not clear…

Also, this is not about lazy loading, because for that we would have to implement pagination in our datatabase query, too.

Thanks!

  • 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-05-19T04:34:25+00:00Added an answer on May 19, 2026 at 4:34 am

    I found a work around using Threads.

    public class MyBean
    {
        private ArrayList myList;
        private PersistentFacesState state;
    
        public MyBean
        {
            state = PersistentFacesState.getInstance();
            myList = new ArrayList();
            new Thread(new RunService()).start();
        }
    
        public class RunService implements Runnable
        {
            public void run()
            {
                try
                {
                    list = WebServices.getList();
                    state.executeAndRender(); //Need to do this to update view
    
                }
                catch(Exception e)
                {
    
                }
            }
    
        }
    }
    

    Initally I was not aware of the PersistentFacesState and executeAndRender(); , so even though the thread would update the array list, the view wasn’t being refreshed. This was because the JSF/IceFaces lifecycle had already ended.

    Persisting the view and then re-rendering it solved this problem, too.

    Hope this solution helps someone.

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

Sidebar

Related Questions

A page within our MOSS publishing website has a property which is a lookup
We are using Primefaces 3M4 and one of our pages has a p:dataTable which
My web page has several dropdowns, users can click through the next button to
I need to find all the classes derived from System.Web.UI.Page which reference another class
Recently we redesigned one of our pages and suddenly page has been increased from
Can we control/give our page security depending the user groups in symfony 1.4. How
I'm trying to pull the 'unread' messages from our Facebook Page (as opposed to
Requirements: On a web page in our web application, we have a requirement to
Our web app automatically emails us when a page execution goes beyond a second
We are trying to send a collection of objects from our page to our

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.