javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2383

Unable to find state for component with clientId ... not restoring it

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.7
    • Fix Version/s: 2.1.8
    • Component/s: state saving
    • Labels:
      None
    • Environment:

      Mojarra 2.1.7, Jetty Server 8.

      Description

      Hi,

      After changing from Mojarra 2.1.6 to Mojarra 2.1.7 in PrimeFaces Extensions project we have a lot of System.out.println warnings. I can't see any defects, but they are annoying. I have tested MasterDetail component - this use case with navigation between tables: http://fractalsoft.net/primeext-showcase-mojarra/sections/masterDetail/basicNavigation.jsf (note: online deployed on Mojarra 2.1.6). I get

      Unable to find state for component with clientId 'sports_0_j_id2', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id3', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id2', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id3', not restoring it.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find state for component with clientId 'sports_0_j_id2', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id3', not restoring it.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find state for component with clientId 'sports_0_j_id2', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id3', not restoring it.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find state for component with clientId 'sports_0_j_id2', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id3', not restoring it.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find parent component with clientId 'countries_0_j_idt35', not adding child.
      Unable to find state for component with clientId 'sports_0_j_id64', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id65', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id2', not restoring it.
      Unable to find state for component with clientId 'sports_0_j_id3', not restoring it.
      ....

      Navigation occurs by means of command links

      <p:dataTable id="sports" value="#

      {simpleMasterDetailController.sports}

      " var="sport">
      <p:column headerText="Sport">
      <p:commandLink value="#

      {sport.name}

      ">
      <pe:selectDetailLevel contextValue="#

      {sport}

      "/>
      </p:commandLink>
      </p:column>
      <p:column headerText="Number of countries with leagues">
      <h:outputText value="#

      {fn:length(sport.countriesWithLeague)}

      "/>
      </p:column>
      </p:dataTable>

      <pe:selectDetailLevel .../> simple add dynamic an ActionListener to command component it's attached to. As I said I can not see any wrong behavior, but the messages above are definitely wrong. At least in case of DataTable. We didn't have them with Mojarra 2.1.6. Current MyFaces version is also ok. This is the class which produces these messages: http://grepcode.com/file/repo1.maven.org/maven2/com.sun.faces/jsf-impl/2.1.7/com/sun/faces/application/view/StateManagementStrategyImpl.java/ (look for // TODO change it to a logging statement.)

      What does happen here? How to prevent that? I can't find any bugs in our code and all components are available in the component tree (command links inside of table).

      Found related issues (maybe):
      http://java.net/jira/browse/JAVASERVERFACES-1826
      http://java.net/jira/browse/JAVASERVERFACES-2283

        Activity

        Hide
        rogerk added a comment -

        r=rogerk

        Show
        rogerk added a comment - r=rogerk
        Hide
        Manfred Riem added a comment -

        Applied to 2.1 branch,

        svn commit -m "Fixes http://java.net/jira/browse/JAVASERVERFACES-2383, r=rogerk" jsf-ri\src\main\java\com\sun\faces\application\view\StateManagementStrategyImpl.java
        Sending jsf-ri\src\main\java\com\sun\faces\application\view\StateManageme
        ntStrategyImpl.java
        Transmitting file data .
        Committed revision 9860.

        Show
        Manfred Riem added a comment - Applied to 2.1 branch, svn commit -m "Fixes http://java.net/jira/browse/JAVASERVERFACES-2383 , r=rogerk" jsf-ri\src\main\java\com\sun\faces\application\view\StateManagementStrategyImpl.java Sending jsf-ri\src\main\java\com\sun\faces\application\view\StateManageme ntStrategyImpl.java Transmitting file data . Committed revision 9860.

          People

          • Assignee:
            Manfred Riem
            Reporter:
            ova2
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: