6 Replies Latest reply on Oct 11, 2007 10:07 AM by rakeshdash2k

    AjaxUpdate component not found for id: :fForm:null

    rakeshdash2k

      Hi,

      In my appication, I am using Ajax with Myfaces (JSF 1.2) & Jboss 4.2.1.

      I m generating a table having (couple of selectmenu) dynamically by using the binding attribute of <h:panelGrid> and made that table Ajaxed. When i select some item form the select menu its works fine with Myfaces (JSF 1.2) but when I switched to Sun RI implementaion I got "AjaxUpdate component not found for id: :fForm:null" as exception in the console.

      Could anyone help me out?

        • 1. Re: AjaxUpdate component not found for id: :fForm:null
          ilya_shaikovsky

          Please paste code snapshot of your page

          • 2. Re: AjaxUpdate component not found for id: :fForm:null
            rakeshdash2k

            This is code which generate ajax support dynamically for the select menu:

            public void addSupport(UIComponent editor, String event, String idOfComponentToReRender) {
            final HtmlAjaxSupport support = new HtmlAjaxSupport();
            support.setEvent(event);
            support.setAjaxSingle(false);
            MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(getDefaultRepaintValueBinding(), new Class[]{});
            support.setAction(mb);
            if(idOfComponentToReRender != null){
            support.setReRender(idOfComponentToReRender);
            }
            editor.getFacets().put(AjaxSupportTag.AJAX_SUPPORT_FACET + event, support);

            }


            • 3. Re: AjaxUpdate component not found for id: :fForm:null
              rakeshdash2k

              This is the code for the html panel grid

              <h:panelGrid id="cAlgoAttributes" width="100%" styleClass="sidebarTable" headerClass="sidebarHdr" footerClass="footerRow" columnClasses="endCell" binding="#{PageBackingBean.CustomizationPanelGrid}"/>


              • 4. Re: AjaxUpdate component not found for id: :fForm:null
                ilya_shaikovsky

                Tru to look to debuger what setted in support.setReRender(idOfComponentToReRender);

                And if there is null value - check where it's set to this value.

                • 5. Re: AjaxUpdate component not found for id: :fForm:null
                  rakeshdash2k

                  Every time I load the new page, I am getting the setReRender from the following code:

                  public void addOnchangeSupport(UIComponent editor, String idOfComponentToReRender) {
                  addSupport(editor, "onchange", idOfComponentToReRender);
                  }

                  here we call the public void addSupport() method and pass the above parameters.

                  But after the page is loaded if i am selecting the attribute from the dynamic select menu, I am getting a js alert box with 500 error & " AjaxUpdate component not found for id: :fForm:null" in the server console

                  • 6. Re: AjaxUpdate component not found for id: :fForm:null
                    rakeshdash2k

                    By the way one information I need to pass that everything works perfect with MyFaces but when I switch to Sun RI (jsf 1.2) I got the ajax problem.

                    The following is the view source code of the select menu with SUN RI:

                    
                    <td><label id="fForm:C_CUI0_scaling" style="font-family:verdana;font-size: 10px;">
                    Scaling: </label></td>
                    <td><select id="fForm:cid130000069" name="fForm:cid130000069" size="1"
                    onchange="A4J.AJAX.Submit('fForm:cRegion','fForm',event,{'parameters':{'fForm:j_id7':'fForm:j_id7'} ,
                    'actionUrl':'/onsite/gesweb/tao/faces/Flex.jsp;jsessionid=C8F7920334DDA5664EA2D87F89AC2E3F'} )"
                    title="Type of scaling to use for IS-based strategies. Currently either PBS or MBS. (System.String)">
                    <option value="PBS">PBS</option>
                    <option value="MBS" selected="selected">MBS</option>
                    </select></td>
                    


                    The following is the view source code of the select menu with myfaces:

                    
                    <td><span id="fForm:cAlgoAttributes_8"><label id="fForm:C_CUI0_scaling" style="font-family:verdana;font-size: 10px;">
                    Scaling: </label></span></td>
                    <td><select id="fForm:cid130000069" name="fForm:cid130000069" size="1"
                    title="Type of scaling to use for IS-based strategies. Currently either PBS or MBS. (System.String)"
                    onchange="A4J.AJAX.Submit('fForm:cRegion','fForm',event,{'parameters':{'fForm:cAlgoAttributes_9':'fForm:cAlgoAttributes_9'}
                    ,'actionUrl':'/onsite/gesweb/tao/faces/Flex.jsp;jsessionid=6CF8E78CE6ED973B83054C7B6154AB0A'} )">
                    <option value="PBS">PBS</option>
                    <option value="MBS" selected="selected">MBS</option>
                    </select></td>