5 Replies Latest reply on Aug 6, 2008 4:02 PM by Brian Kates

    AjaxStateManager duplicate Id for a component exception

    Brian Kates Newbie

      I've posted this on the user forum, but I need to talk to someone technical. I also posted it on the Ajax developers forum, but it appears to be dead. I've been having a problem with the ids generated in the data table. See post below:

      I did some additional research and found some interesting results. I put a breakpoint in the AjaxStateManager around this section of code:

      String clientId = component.getClientId(context);
      if (!uniqueIds.add(clientId)) {
       throw new IllegalStateException("duplicate Id for a component "+ clientId);
      }


      I made the breakpoint conditional to only stop for the duplicate id. The ids of the duplicates were:

      body:form:tab:table:component id

      in both cases, the component was output text and the id was "_idJsp317".

      Here's the interesting part: not that the column was missing. When I inspected the component's parent through the debugger, it had an id of:

      body:form:tab:table:component id. (this was expected)

      In both cases, the component's parent (the column) had a unique id. So why isn't parent id being included along with the child? For example, for a component in a data table column, I would expect an id of:

      body:form:tab:table:column:component id but the ids that are generated are body:form:tab:table:component id (thus resulting in a duplicate id).

      Question: prior to migrating to rich races, we used A4J. How come we never encountered this problem before? Is this a case of rich faces having more stringent id checking? Or is rich faces doing something to generate the ids? Note that it is a tomahawk (1.1.4) data table.

      Thanks.