1 2 Previous Next 20 Replies Latest reply on Apr 1, 2011 10:30 AM by gmassenzano

    after form-submit: Target component for id not found

    nimo stephan Master

      I have something like this:

      <s:div id="myPage">
      <h:form id="formA">
      ...
      <a4j:commandButton action="#{bean.fire}" reRender="subpageA"/>
      </h:form>
      
      <s:div id="subpageA">
       <ui:include src="subpageA.xhtml"/>
      </s:div>


      </s:div>

      After form-submit, "subpageA" is not reRendered, I get this error in the stacktrace:

      WARN [AjaxContext] Target component for id subpageA not found


      what is wrong?

        • 1. Re: after form-submit: Target component for id not found
          nimo stephan Master

          When I have this:

          <s:div id="myPage">
          <h:form id="formA">
          ...
          <a4j:commandButton action="#{bean.fire}" reRender="myPage, formA, subpage"/>
          </h:form>
          
          <s:div id="subpageA">
           <ui:include src="subpageA.xhtml"/>
          </s:div>
          </s:div>


          and submit then I get these errors:
          WARN [AjaxContext] Target component for id myPage not found
          WARN [AjaxContext] Target component for id formA not found
          WARN [AjaxContext] Target component for id subpageA not found



          • 2. Re: after form-submit: Target component for id not found
            nimo stephan Master

            the strange thing is that my a4j:log says:

            debug[10:47:58,826]: Update part of page for Id: subpageA successful


            but the stacktrace says:

            WARN [AjaxContext] Target component for id subpageA not found


            ?

            • 5. Re: after form-submit: Target component for id not found
              Ilya Shaikovsky Master

              will this be changed if you change s:div to a4j:outputPanel with layout=block(it will also gerate div)?

              • 6. Re: after form-submit: Target component for id not found
                nimo stephan Master

                hello ilya,

                thank you!! that was the reason:

                This works:

                <a4j:outputPanel id="myPage">
                <h:form id="formA">
                ...
                <a4j:commandButton action="#{bean.fire}" reRender="subpageA"/>
                </h:form>
                
                <s:div id="subpageA">
                 <ui:include src="subpageA.xhtml"/>
                </s:div>
                </a4j:outputPanel>


                Now, the reRendering definitly works, but besides, I get the (false?) warnings in my stacktrace:

                Target component for id subpageA not found


                But it works, only the warnings are false.

                • 7. Re: after form-submit: Target component for id not found
                  Joey Alinea Newbie

                  hi nimo, i would just like to know if you have managed to get rid the warning message? I am encountering the same issue, rerendering works but the warning "Target component id not found" appears.

                   

                  Thanks in advance. cheers

                  • 9. after form-submit: Target component for id not found
                    Murali Kumar Newbie

                    Hi Nimo,

                     

                    I am using richfaces 3.3.3 with seam 2.0.2. I got same error.

                    Could you please suggest me how to resolve this issue. Rendering extenedableDatatable in modelpanel. Sometimes its working but sometimes its fails.

                    And also the same way i am rendering othertable tables those working fine.

                    Could you please suggest me?

                     

                    Thanks

                    Murali

                    • 10. Re: after form-submit: Target component for id not found
                      nimo stephan Master
                      {quote}Rendering extenedableDatatable in modelpanel.{quote}

                       

                      Maybe you forgot to rerender the whole modalpanel (with its content datatable).

                       

                      Wrap your modalPanel with a a4j:panel and rerender its ID (in this case "renderthis")

                       

                      <a4j:panel id="renderthis">

                      <rich:modalPanel ..>

                      <rich:extendedDatatable>

                      ..

                      </rich:extendedDatatable>

                       

                      </rich:modalPanel>

                       

                      </a4j:panel>

                      • 11. after form-submit: Target component for id not found
                        Murali Kumar Newbie

                        Hi Nimo,

                         

                        Once i did this using <a4j:outputPanel> modelPanel will lost its style.

                        Another thing that when i select the row in table the table will refresh with existing data onceagin, it should not happen in my case. once i select row in table parent page commandlink will replace with selected row item.

                         

                        this is the commandlink code:

                         

                        <a4j:commandLink id="primaryContLink" ajaxSingle="true"

                              action="#{addContactDetails.refreshACAll}"

                              reRender="contactPanelDiv,primaryContLink,AddAContactIntPanel,AddAContactExtPanel"

                              oncomplete="Richfaces.showModalPanel('AddAContact');return false">

                              <h:outputText value="#{messages['oncall.grp.addlevelonecontact']}"

                               rendered="#{groupDetails.primaryContact == null}" />

                              <h:outputText

                               value="#{groupAction.groupDetails.primaryContact.lastName}, #{groupAction.groupDetails.primaryContact.firstName}"

                               rendered="#{groupDetails.primaryContact != null}" />

                              <f:setPropertyActionListener value="OnCall"

                               target="#{addContactDetails.typeOfPage}" />

                              <f:setPropertyActionListener value="primaryContLink"

                               target="#{addContactDetails.contactLinkid}" />

                             </a4j:commandLink>

                         

                        here is the extendabledatable in model panel:

                         

                        <rich:panel id="contactInfoTableWrapper" style="border:0px solid;">

                                <rich:extendedDataTable height="100px" width="100%" binding="#{table}"
                                 selectedClass="dataTableSelectedRow" selectionMode="single"
                                 id="contactInfoTable" columnClasses="col" value="#{personContactHelper.contactsDataModel}"
                                 var="info" selection="#{personContactHelper.simpleSelection}"
                                 tableState="#{personContactHelper.contactTableState}"
                                 rendered="#{addContactDetails.showResultList}"
                                 noDataLabel="No Results. Please try again using different search criteria">

                               

                                  ---------

                                  ----------

                         

                                 <a4j:support
                                  id="person_take_selection" status="waitStatus" 
                                  oncomplete="#{rich:component('waitModalPanel')}.hide(); return false"
                                  action="#{personContactHelper.takeContactSelection}"
                                  event="onselectionchange" />
                                 
                                </rich:extendedDataTable>

                              </rich:panel>

                        • 12. after form-submit: Target component for id not found
                          Joey Alinea Newbie

                          Hi Murali,

                           

                          May I also know your problem? Are you getting the "Target component id not found" warning even if the component is existing? Or is your problem about rerendering the component?

                           

                          I just also want to share what happened to me. I'm getting the "Target component id not found" warning from the logs even though the page and popup is working fine. Nimo was right, I have fixed mine by wrapping the modalpanel, then call that new id during rerender. You may want to also try using FireBug plugin in Mozilla Firefox, so that you can debug and know the ids of each field when its up

                          • 13. after form-submit: Target component for id not found
                            Murali Kumar Newbie

                            Hi Joey,

                             

                            Thanks for your reply.

                             

                            Actually that problem is solved. I got another problem. I need to update actually saying that rerender primaryContLink when click Add button in the modelPanel. In the backing bean the updated values are stored in corresponding properties but not rerendered immediately. Its updated when i clicked on perticular primaryContLink, its got updated.

                             

                            Could you please suggest me any solution for this.

                             

                            Thanks,

                            Murali

                            • 14. after form-submit: Target component for id not found
                              Murali Kumar Newbie

                              Hi Joey,

                               

                              Thanks for your reply. Actually that problem is solved. I got another problem with rendering the backing bean properties immediately.

                              The primaryContLink is updated with the selected value from the modelPanel when i click Add button. Actully the values are upated in backing bean properties with selected values in the modelPanel extendenedDataTable. New values are not updated in the UI.

                               

                              The primaryContLink is updated with selected value. How to rerendered this.

                               

                              Please Suggest me?

                               

                              Thanks,

                              Murali

                              1 2 Previous Next