5 Replies Latest reply on Mar 9, 2009 2:07 AM by tnt9062

    Work with huge number of tables

    tnt9062

      Hi,

      My project has a lot of scrollableDataTable grids (100+). For each grid, i create own ScrollableTableDataModel session bean, which cache db data in memory.
      100+ session beans is too large and uncomfortably for me.

      When i try using one datamodel session bean for all grids, i can't get table, which call loadData method... :(

      1. How to use one DataModel for all grids?
      2. How to get table (UIScrollableDataTable object), which call loadData method in Model.
      3. How to support huge number of grids (e.g. UIScrollableDataTable) in JSF project

      thx for any links.

      JSF 1.2
      Rich 3.3.0 GA

        • 1. Re: Work with huge number of tables
          elf

          Hi

          I have 1 data table bean and model for many tables.
          I use ExtendedDataTable with its own model.
          Every table in my project is on separate tab.
          So in model I have HashMap with kay as tab name and value as List.
          In model I rewrited methods and take List according to the current tab.

          • 2. Re: Work with huge number of tables
            tnt9062


            "elf" wrote:

            In model I rewrited methods and take List according to the current tab.


            1. How do you know the current tab? After change tab, save its id to session bean ?
            2. What to do, if one tab has 2 and more tables ?

            • 3. Re: Work with huge number of tables
              elf

              1. I get tab panel (HtmlTabPanel component) from document dom in action, and there is method "getSelectedTab" (or name similar to that)
              2. I have no this situation, in the same time I need to rerender only 1 table. But I think, If the number of tables on your every tab is fixed, and the maximum number of tabs is known - you can create needed number of bean and model (just for 1 tab). It's less than create bean and model for every table. I did not research what would be If I try to render 2 tables in the same time useing my model.

              • 4. Re: Work with huge number of tables
                elf

                please sorry my mistake:

                ... and the maximum number of TABLES ON TAB is known ...

                • 5. Re: Work with huge number of tables
                  tnt9062

                  thx !

                  now i use following method

                  create DataCache session bean, which cache all db data, and in JSP set only method binding. Then in set binding method dinamycally create datamodel and bind it with table. Also send table and datacache pointers into datamodel for work.