2 Replies Latest reply on Jul 11, 2007 4:16 AM by a a

    ReRender order

    a a Newbie

      Hello,

      is it possible to control order of rerendering of components?

      reRender="component1, component2"
      doesn't rerender components in this order.

      Rerendering of component1 should be done prior to rerendering of component2 but the component2 is placed first on my page.

      Thank you

        • 1. Re: ReRender order
          Sergey Smirnov Master

          It is not possible. The order of the rendering is pre-defined by the location of the components in the component tree.

          • 2. Re: ReRender order
            a a Newbie

            Thank you for reply.

            Well, is there any good practice to solve the following issue?
            after adding a new item to database, I need to rerender datatable and also rerender the pagination navigation bar (I need rerender number of items, current page, according to the new item count).
            But the pagination nav. bar is placed first, so it is rerendered with old values - new values are loaded during dataTable rerender proccess:

            [<h:dataTable id="mainTable" value="#{itemManager.items}"
            - itemManager.getItems loads data from database(it calls session bean method for database access).

            Maybe I can store collection of items in JSF bean and dataTable should be loaded from "local" collection not directly from database - then it would be ok, because the collection of items will be loaded prior to rerender process.

            I don't know wheter this is an elegant solution.

            Thank you