0

I am getting "Cannot find component with identifier "contentForm:tabView:form:addressDialogPanel" referenced from "contentForm:tabView:form:addressBookTable" " error. How can I update my panelGrid inside the widget?

<h:form id="form">

<p:dataTable id="addressBookTable">
 <p:ajax event="rowSelect" listener="#{addressBookController.onRowSelect}"   
                update="contentForm:tabView:form:addressDialogPanel" oncomplete="addressDialog.show()" />
</p:dataTable>

<p:dialog id="addressDialogId" widgetVar="addressDialog">
  <h:panelGrid id="addressDialogPanel" columns="2" cellpadding="4">
  </h:panelGrid>
</p:dialog>

</h:form>
Turgut Dsfadfa
  • 775
  • 6
  • 20
  • 42
  • @ÖmerFarukAlmalı I have changed contentForm(form) to panel. now it gives "Cannot find component with identifier "tabView:form:addressDialogPanel" referenced from "tabView:form:addressBookTable" " error. Is p:tabview also a form? – Turgut Dsfadfa May 02 '13 at 11:20
  • @ÖmerFarukAlmalı your answer doesn't work for me. Can it be a problem? – Turgut Dsfadfa May 06 '13 at 06:49
  • Then why didn't you return me about it? If you are willing to solve your problem, you should follow the necessary steps of answer which is completely correct. 3 day late "not working" comment is unreasonable act. – Ömer Faruk Almalı May 06 '13 at 09:59

1 Answers1

0

The main problem is that you are giving the wrong client ID of component's. Also p:tabView is a component it is not a form. When you define a h:form, it generates a standart HTML form element. And when you submit the page JSF uses POST to submit your data into backing bean. So nesting them is going to occur lot's of issues that you don't expect. You should seperate forms into sections like sideForm or searchForm or etc.

You should detect the correct client ID of your component when you try to update it. You can do this with your browser's developer settings(press f12 for chrome). Then select component with the magnifier button and give that ID into update property. Just like here:

enter image description here

You should read to learn basics of JSF for example from here

Community
  • 1
  • 1
Ömer Faruk Almalı
  • 3,792
  • 6
  • 37
  • 63