Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3739

@ResourceDependency annotation + JSF 1.2 state saving + c:if (dynamic section) creates components on each click (UIViewRoot grows)

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.12
    • 2.0.19, 2.1.13, 2.2.0-beta
    • JSR-314
    • None
    • myfaces 2.1.12
      Tomcat 6.0.36

    Description

      The issue was initially reported against RichFaces: https://issues.jboss.org/browse/RF-13025
      But it does not look like it is anything wrong with RichFaces here.
      The issue is reproducible with pure myfaces when partial state saving is turned OFF e.g. with the following code (every second click on "Toggle" button causes new UIOutput element to be inserted to the view tree):

        <h:form>
          <h:commandButton value="Toggle" action="#{bean.togglePanelShown}">
            <f:ajax execute="@this" render="group"/>
          </h:commandButton>
          <h:panelGroup id="group">
            <c:if test="#{bean.panelShown}">
              <!-- Any component with @ResourceDependency annotation. -->
              <custom:componentWithResourceDependency/>
            </c:if>
          </h:panelGroup>
        </h:form>
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            lu4242 Leonardo Uribe
            andreyz Andrei Zhemaituk
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment