1 Reply Latest reply on Jun 25, 2008 4:29 PM by Aleš Bregar

    WARN  [AjaxContext] Target component for id aIncludeForm not

    Aleš Bregar Newbie

      Hi,

      I am instantiating HtmlAjaxCommandButton in backing bean (for dynamic menu generation) like:

      HtmlAjaxCommandButton cmdButton = new HtmlAjaxCommandButton();
      
      FacesContext facesContext = FacesContext.getCurrentInstance();
      
      ValueExpression ve = ...
      cmdButton.setValueExpression("value", ve);
      
      MethodExpression me = ...
      cmdButton.setActionExpression(me);
      
      cmdButton.setStyleClass("menuButton");
      
      cmdButton.setReRender("aIncludeForm, selectMenu");
      
      // Add components to view form
      UIForm form1 = (UIForm)facesContext.getViewRoot().findComponent("selectMenu");
      form1.getChildren().add(cmdButton);
      
      }


      ReRender is called ok - as view is rerendered correctly, but I got all the time the following warn in jboss logs:

      WARN [AjaxContext] Target component for id aIncludeForm not found
      WARN [AjaxContext] Target component for id selectMenu not found

      If I create same button on view directly as:

      <a4j:commandButton action="#{...}" value="#{...}" reRender="aIncludeForm, selectMenu" styleClass="menuButton"/>


      Than there is no warn shown. Anybody any ideas?

      System used is Seam 2.0.2.SP1, Richfaces 3.2.1GA, Jboss 4.2.1.

      Brg,
      KS