Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Paging feature in a Layout

    I would like to implement a paging feature in a Layout.
    After querying the server, right now I create and add to the Layout N widgets. The widgets are kind of heavy, so I would like to create (or fill) them, just when the user scroll the Layout and the widget become "visible".
    Any idea of how to achieve this (LGPL edition)?

    Thx

    #2
    Use recordComponents in a ListGrid. It already implements a component pool and you can use a single column and get rid of the header such that it turns into purely a renderer for your components.

    Comment


      #3
      Thanks, Ill try to have a look, but I can't really replace my existing Layouts with ListGrids, without a huge refactor.

      I was hoping to add the Layout N "empty" widget members, with a fill() method that actually creates the content of the widget. My idea was then to call fill() in one of these two cases:

      - On the Layout scrollHandler understand which members are actually displayed.
      - Override a method on the member widget, that is called when the browser actually "show" the component (probably not existing, right?).

      Has someone an idea if something like that is possible, and in case which methods should I check?

      Thanks.

      Comment


        #4
        Ultimately possible, just a lot harder than getting a free pooling implementation from ListGrid, even if it does require a refactor.

        Comment


          #5
          Uhm, I see.
          Anyway, any quick suggestion about which methods to use?

          Thanks

          Comment


            #6
            Read the docs for ListGrid.recordComponents. All relevant methods are covered there.

            Comment

            Working...
            X