0

I have encountered a problem with updating a dialog in a tabview ui:include page:

I have my page:

<p:tabView id="tabView"  widgetVar="tabViewMain" >
        <p:tab title="P1" >            
            <ui:include src="page1.xhtml"/>
        </p:tab>


        <p:tab  title="p2">            
            <ui:include src="page2.xhtml"/>
        </p:tab>
</p:tabView>
  • In page 2 I have a dataTable with:

the onDbClickByElement method try to do instruction and then show a dialog

<p:dialog closeOnEscape="true"  id="editEtudeInListIdByElement"
                  header="Traitement de Lot  #{infoGeneralesManagedBean.selectedElemetRadio.lot} selectionné" widgetVar="editEtudeInListByElement" 
                   width="700" height="100%">
    <h:form id="editEtudeInListformByElement">

    </h:form>
</p:dialog>

The problem comes when i tried to update the dialog as follows:

 <p:ajax event="rowDblselect" listener="#{infoGeneralesManagedBean.onDbClickByElement}" 
                    update=":tabView:t:editEtudeInListIdByElement"   />

Where i got this error :Cannot find component with expression ":tabView:t:editEtudeInListIdByElement" referenced from "tabView:t:listInjection".

I always update my dialog like this and it's okay but now I don''t know what happens with the code!

Can I have any help how to correctly do the update of the dialog from a tabView

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Selma BA
  • 149
  • 3
  • 18
  • Start by creating an [mcve]. Check if using the include makes a difference by putting the dialog code directly in the main page. And also read http://stackoverflow.com/questions/8634156/how-to-find-out-client-id-of-component-for-ajax-update-render-cannot-find-compo (the 'generic' Q/A of the issue you have). Posting the exact error you get in google or StackOverflow would have resulted in hits – Kukeltje Feb 02 '16 at 08:58

1 Answers1

0

try

<p:ajax event="rowDblselect" listener="#{infoGeneralesManagedBean.onDbClickByElement}" 
                    update=":tabView:editEtudeInListIdByElement"   />

If it still fails, try to open your browser developer's tool and locate your "editEtudeInListIdByElement" element. You could try to use the id of that element. (:tabView:xxxx)

  • That is exactly what the duplicate suggests... So better to also vote as a duplicate than to answer... Keeps SO cleaner – Kukeltje Feb 02 '16 at 11:32