Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-14085

a4j:ajax behavior is not rendered when a4j:param is nested within a4j:ajax

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.5.5
    • Fix Version/s: None
    • Component/s: component-a4j-core
    • Environment:

      Tomcat 8.0.15, MyFaces 2.2.8, Richfaces 4.5.5

    • Steps to Reproduce:
      Hide

      I suspect this code in 'apply' method of org.richfaces.view.facelets.html.AjaxHandler

      BehaviorInfo behaviorInfo = ajaxBehaviors.popBehavior();
      if (behaviorInfo != null) {
          if (isWrapping()) {
              AbstractAttachQueue attachQueue = attachQueueInfo.getAttachQueue();
              if (attachQueue != null) {
                  List<ClientBehavior> behaviors = behaviorInfo.getBehaviors();
                  if (behaviors != null) {
                      for (ClientBehavior processBehavior : behaviors) {
                          if (processBehavior instanceof AjaxBehavior) {
                              AjaxBehavior createdAjaxBehavior = (AjaxBehavior) processBehavior;
                              attachQueue.associateWith(createdAjaxBehavior);
                          }
                      }
                  }
              }
          } else {
              AbstractAttachQueue attachQueue = attachQueueInfo.getAttachQueue();
              if (attachQueue != null) {
                  attachQueue.associateWith(ajaxBehavior);
              }
      
              applyNested(ctx, parent, ajaxBehavior);
          }
      } else {
          // TODO nick - is this possible?
      }
      

      in case of nested <a4j:param>, method isWrapping() returns TRUE and then no instance of AjaxBehavoir is added to parent component.

      Show
      I suspect this code in 'apply' method of org.richfaces.view.facelets.html.AjaxHandler BehaviorInfo behaviorInfo = ajaxBehaviors.popBehavior(); if (behaviorInfo != null ) { if (isWrapping()) { AbstractAttachQueue attachQueue = attachQueueInfo.getAttachQueue(); if (attachQueue != null ) { List<ClientBehavior> behaviors = behaviorInfo.getBehaviors(); if (behaviors != null ) { for (ClientBehavior processBehavior : behaviors) { if (processBehavior instanceof AjaxBehavior) { AjaxBehavior createdAjaxBehavior = (AjaxBehavior) processBehavior; attachQueue.associateWith(createdAjaxBehavior); } } } } } else { AbstractAttachQueue attachQueue = attachQueueInfo.getAttachQueue(); if (attachQueue != null ) { attachQueue.associateWith(ajaxBehavior); } applyNested(ctx, parent, ajaxBehavior); } } else { // TODO nick - is this possible? } in case of nested <a4j:param>, method isWrapping() returns TRUE and then no instance of AjaxBehavoir is added to parent component.

      Description

      With 'a4j:param' tag does not work (AjaxBehavoir is not added to selectOneMenu component and then no javascript is rendered for onchange event). Without 'a4j:param' tag works as expected.

      <h:selectOneMenu value="#

      {myController.value}

      " >
      <a4j:ajax event="change"
      listener="#

      {myController.onChange}

      ">
      <a4j:param name="paramABC" value="ABC" assignTo="#

      {myController.test}

      " />
      </a4j:ajax>
      <f:selectItems value="#

      {myController.selectItems}

      " />
      </h:selectOneMenu>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                laukovic Martin Lauko
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: