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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:58:40+00:00 2026-05-27T18:58:40+00:00

I have an ArrayList in my server I want to display it in a

  • 0

I have an ArrayList in my server I want to display it in a grid at client side. I am using RPC Mechanism for this purpose. The RPC call was successful but while am adding pagination it did not work. If have not done this in a proper way please guide me to do this correctly.

I just took the ArrayList to client and then added to grid. I thought that this is causing problems .

Here is my code:

    ArrayList valls=new ArrayList();
    public ContentPanel mainPanel1 = new ContentPanel();
    public PagingToolBar toolBar = new PagingToolBar(10);  
    public ContentPanel cpc=new ContentPanel();

    public ContentPanel mainPanel = new ContentPanel(); 
    public ContentPanel cp = new ContentPanel();
    public ListStore<BeanModelType> clientList=new ListStore<BeanModelType>();

    public ListStore<BeanModelType>  createGrid()
    {

    System.out.print("METHOD DDDDDDDDD");
    final FeedServiceAsync feedService =Registry.get(RSSReaderConstants.FEED_SERVICE);

    feedService.createNewFeed(new AsyncCallback<Feed>() {

        @Override
        public void onFailure(Throwable caught) 
        {
            // TODO Auto-generated method stub
            Info.display("RSSReader", "Unable to create a new feed");
            System.out.print("ERRORRRRRR");
        }
        @Override
        public void onSuccess(Feed result)
        {   
           ArrayList valls=result.getVal();     
           PagingModelMemoryProxy proxy = new PagingModelMemoryProxy(TestData.getClients(result.getVal()));  
           PagingLoader loader = new BasePagingLoader(proxy);  
           loader.setRemoteSort(true);  

               /*    

               final PagingToolBar toolBar = new PagingToolBar(5);  
               toolBar.bind(loader);  
               loader.load(0, 5);  

               */
               clientList.add(TestData.getClients(valls)); 

               /*
                * if we remove the above code only shows the  pagination not the content value 
                * 
                * Actual code shoiuld be like this 
                * 
                * 
                *clientList= new ListStore<BeanModelType>(loader);
                * 
                * returns clientList;
                * 
                * 
                * but int his method its not working sirrrr aM SORRY TO SAY THIS
                * 
                * 
                */

               clientList = new ListStore<BeanModelType>(loader); 
               toolBar.bind(loader);  
               loader.load(0, 10);  
               loader.setRemoteSort(true);

        }
    });

return clientList;

}
 /*
==============================================================================
code for grid
=====================================================================================*/
 /*
         * 
         * Grid Starts
         * 
         */ 
               List<ColumnConfig> configs = new ArrayList<ColumnConfig>();  

                    ColumnConfig column = new ColumnConfig();    
                    column.setId("name");    
                    column.setHeader("CLIENT");    
                    column.setWidth(200);    
                    configs.add(column); 
                    column = new ColumnConfig("name1", "CAMPAIGN", 150);  
                    column.setAlignment(HorizontalAlignment.LEFT);  
                    configs.add(column); 

                     column = new ColumnConfig("name2", "SITE", 100);  
                     column.setAlignment(HorizontalAlignment.LEFT);  
                     configs.add(column); 

                     column = new ColumnConfig("name3", "ADUNIT", 100);  
                     column.setAlignment(HorizontalAlignment.LEFT);  
                     configs.add(column); 

                     column = new ColumnConfig("name4", "START", 100);  
                     column.setAlignment(HorizontalAlignment.LEFT);  
                     configs.add(column); 



                    ColumnModel cm = new ColumnModel(configs);  
                    Grid<BeanModelType> grid = new Grid<BeanModelType>(createGrid(), cm);   
                    grid.setStyleAttribute("borderTop", "none");   
                    grid.setAutoExpandColumn("name"); 
                    grid.setAutoExpandColumn("name1");   
                    grid.setAutoExpandColumn("name2");   
                    grid.setAutoExpandColumn("name3");   
                    grid.setAutoExpandColumn("name4");   
                    grid.setBorders(true); 
                    grid.setStripeRows(true); 
                    //grid.getView().setAutoFill(true);
                    //grid.setAutoWidth(true);

                    cp.setBodyBorder(false);   
                    cp.setHeading("Employee List");    
                    cp.setButtonAlign(HorizontalAlignment.CENTER);
                    cp.setSize(1440,609);   
                    cp.setFrame(true);
                    cp.setAnimCollapse(false);
                    cp.setLayout(new FillLayout(Orientation.VERTICAL));
                    cp.setBottomComponent(toolBar);
                    cp.add(grid);
                    cp.setSize("", "370");

                    mainPanel.add(cp);


            /* 
             * 
             *  End Of Grid
             * 
             *
             * 
             * 
             */ 
  • 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-27T18:58:41+00:00Added an answer on May 27, 2026 at 6:58 pm

    You cant do that. feedService.createNewFeed is Async process. What you had return on createGrid method is an empty clientList. reconfigure the grid inside onSuccess method

    public void onSuccess(Feed result){
    .... 
    clientList = new ListStore<BeanModelType>(loader); 
    toolBar.bind(loader);  
    loader.setRemoteSort(true);
    grid.reconfigure(clientList, grid.getColumnModel());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have arraylist myorderdata . I want to retrieve this arraylist to one String
I have an ArrayList of Timestamps. I want to split this ArrayList into several
I have an array list on my server side that i want to use
I have an ArrayList that I want to use to hold RaceCar objects that
I have set up the code to call a remote server from Android app
I have a database server communicating with a Java application server using JDBC. I
I have a problem. I am calling to server side on GWT. The results
I want to test a server I have deployed on GAE to see if
I have defined a nested grid view in the following way. <asp:GridView ID=GridView1 runat=server
I have this project I'm working on where I want to parse an xml

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.