javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2623

can not add component containing datatable dynamically to view

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.14, 2.2.0-m04
    • Fix Version/s: 2.1.18, 2.2.0-m09
    • Component/s: ajax, dynamic components
    • Labels:
      None
    • Environment:

      JSF 2.2.0-m04, glassfish 3.1.2

      Description

      step 1:When a compnent with dataTable is added to tree dynamically in a ajaxListener, the component is pushed to com.sun.faces.context.StateContext in PostAddToViewEvent.
      step 2:At render stage, com.sun.faces.application.view.FaceletViewHandlingStrategy.reapplyDynamicActions will process these added components. Howevever, the components under datatable in step 1 are added with a client ID without a rowindex. Suppose the datatable id is "dt", and a component under datatable is "comp". In step 1, the component is added as "dt:comp". Step 2 expects id like "dt:rowindex:comp". Therefore an error like this "serverError: class java.lang.NumberFormatException Trying to extract rowIndex from clientId" is thrown.

      The component I added is a composite component created using JSF 2.2 API faceletFactory.createComponent("http://java.sun.com/jsf/composite/" + library, name, attrs); This error may be due to fact the added component is a composite component. I orignally added a component created programtically, I did not recall there is an error. But others also got this error using JSF 2.0: http://stackoverflow.com/questions/10717753/java-lang-numberformatexception-trying-to-extract-rowindex-from-clientid-j-idt

      1. jsf2623.tgz
        4 kB
        jasonzhang2002gmailcom

        Issue Links

          Activity

          Hide
          Ed Burns added a comment -

          Manfred, thanks for driving this one to completion.

          Show
          Ed Burns added a comment - Manfred, thanks for driving this one to completion.
          Hide
          ova2 added a comment -

          Thanks from me too. Can you say approximately when 2.1.18 will be available?

          Show
          ova2 added a comment - Thanks from me too. Can you say approximately when 2.1.18 will be available?
          Hide
          Manfred Riem added a comment -

          It is scheduled for Feb 4, 2013

          Show
          Manfred Riem added a comment - It is scheduled for Feb 4, 2013
          Hide
          ova2 added a comment -

          Great!!

          So, you mean my issue http://java.net/jira/browse/JAVASERVERFACES-2710 is also fixed with this one? Right?

          Show
          ova2 added a comment - Great!! So, you mean my issue http://java.net/jira/browse/JAVASERVERFACES-2710 is also fixed with this one? Right?
          Hide
          ova2 added a comment -

          By the way, you said my issue http://java.net/jira/browse/JAVASERVERFACES-2710 was duplicate. But is was not fixed in 2.1.18. I have the same warnings Please review again.

          Show
          ova2 added a comment - By the way, you said my issue http://java.net/jira/browse/JAVASERVERFACES-2710 was duplicate. But is was not fixed in 2.1.18. I have the same warnings Please review again.

            People

            • Assignee:
              Manfred Riem
              Reporter:
              jasonzhang2002gmailcom
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: