6 Replies Latest reply on Oct 17, 2007 4:03 AM by krasig

    DataTable state

    krasig

      Hi,
      Is there any way to keep state of Data?able (like tomahwk saveState) without implementing SerializableDataModel.

      P.S. can you explain me, meaning f attribute "componentState".

      Thanks.

        • 1. Re: DataTable state
          ilya_shaikovsky

          explain pleasewhat do you need to save?

          This attribute placed in dataModel for another components like scrollable.

          • 2. Re: DataTable state
            krasig

            Ok.
            I have 1 DataTable and datascroller.
            After select second page from datascroler it will retrieve all data from database.
            If i put t:saveStata on page, i will keep all date per requests and will minimize selects from database.

            P.S.

            This attribute (componentState) placed in dataModel for another components like scrollable


            but data table have this attribute. For what?
            UserGuide say:
            It defines EL-binding for a component state for saving
            or redefinition.
            but i can't understand this (my be I'm stupid or guide isn't detailed)

            • 3. Re: DataTable state
              ilya_shaikovsky

              1) The best way to optimize I think - is to create two beans one - request scoped will retrive data and save it inside session scoped. Session scoped bean will call the request scoped on initialization. After - all the data will be used from the bean without additional dataBase hits.


              2) it's putted to tld from the parent class by reflection.Will explored and probably hidden

              • 4. Re: DataTable state
                krasig

                So, if i have 20 pages with Datatables (some of them with more than 1 datatable) i must deklare min. 20 beans in session ????

                And this is "The best way" ???? Are you sure?

                • 5. Re: DataTable state
                  bfayle

                  Have you tried using <a4j:keepAlive> ?

                  • 6. Re: DataTable state
                    krasig

                    Yeaaaa. Thank you bfayle.