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

  • Home
  • SEARCH
  • 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 9016921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:07:49+00:00 2026-06-16T04:07:49+00:00

I use zk framework MVVM approach and want display grid with 1000-2000 rows per

  • 0

I use zk framework MVVM approach and want display grid with 1000-2000 rows per page.(It is really need for user) But it is a lot of information and every user will consume about 30Mb if i will save my grid model (List<Object>) in memory on server side. I decide what will be good just render this sort of information and clean memory on server side, but if i use this approach i should go to client side programming. (write js for ajax calls and etc.)
Can’t find good solution for this issue. What i should use auRequest, RowRender or Render script on client side or just null data after render grid?

UPD: ZUL

<grid apply="org.zkoss.bind.BindComposer"
      viewModel="@id('vm') @init('Pojo')"
      self="@define(content)" height="100%" width="100%">
      model="@load(vm.o)" emptyMessage="${c:l('empty_table')}"
      stubonly="true" onCreate="@command('clear')">
   <columns>
      ...cols...
   </columns>
   <template name="model">
      <row>
           <label value="@load(each.data)" />
      </row>
   </template>
</grid>

JAVA:

 public class Pojo {

     private List<Object> o;
     private Grid g;

     @Init
     public void init(){
        o = loadFromDaoOneHundredItems()
     }

     @AfterCompose
     public afterCompose(@ContextParam(ContextType.VIEW) Component view){
          g.setPageSize(1000);
     }
 }

UPD

    final Rows rs = new Rows();
    for (int i = 0; i < 1000; i++) {
        final Row r = new Row();
        r.appendChild(new Label("sdf"));
        r.appendChild(new Label("sdf"));
        r.appendChild(new Label("sdf"));
        rs.appendChild(r);
    }
    grid.appendChild(rs);
    ListModelList<Object> o = null;
    grid.setModel(o);
  • 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-16T04:07:50+00:00Added an answer on June 16, 2026 at 4:07 am

    ZK provides many ways to handle your logic client side.
    At first you should read the communication part of the client-side zk manual.
    In addition, this awnser should be helpful.

    You should know, that model="@load(vm.o)" calls Grid.setModel(...)
    and saves a reference so that data will not be deleted by javas gc.

    So I think the only way to solve this, by still using MVVM even if it
    breaks the pettern as far as I understand MVVM, would be to call

    onCreate="@command('createRows',grid=self)"
    

    and add a method like

    @Command("createRows")
    public void createRows(@BindingParam("grid") Grid grid){
     //add rows manually here
    }
    

    But I have to say that for your task, I would prefer to use ZK MVC,
    cos of better readability/maintainability and more control cos of java.

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

Sidebar

Related Questions

I use Entity Framework 4.2 and want to call a stored procedure that has
I use Entity Framework code-first. DataBaseName - I want to create a database in
I use Zend framework to build the forms, I want to make the edit
I'm making a WPF application making use of the MVVM light framework. What I'm
I want simple test for JDBC connection, I don't use framework, only JDBC and
I develop wpf app with MVVM design. As MVVM framework I use Caliburn Micro.
I'm really amazed with reactive extensions library created by Microsoft and the MVVM framework
I use Entity Framework 4.0. Is it possible that SaveChanges() returns 0 but doesn't
I use Wicket framework and I would like to know if there is a
I use Entities Framework to implement my data accsee layer in ASP.NET MVC. 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.