1 Reply Latest reply on Mar 21, 2011 5:15 AM by Ilya Shaikovsky

    Redundant SQL queries

    Paweł Walaszek Newbie

      Howdy,

       

       

      Why does Richfaces generate redundant SQL queries? May be is it needed? If it's true, why?

       

      For example (conception):

       

      <h:form>

      <a4j:commandButton value="New User" action="#{userController.reinitUser}" onclick="#{rich:component('addUserPane')}.show();" />

      </form>

       

      <h:form>

      <rich:dataTable value value="#{userBean.users}" row="10">...</rich:dataTable>

      </h:form>

       

      When I click the "New User" button, it generates a SQL query that selects items for dataTable.

       

      Another case, when I paginate through items in dataTable then it generates the same two queries for each page.

       

      Very strangle. It can have impact on efficiency at large data.

       

      English isn't my first language, sorry.