Multible <p:dialogs> after rerender

UI Components for JSF
Post Reply
ruddy_robot
Posts: 32
Joined: 07 Sep 2010, 12:37

25 Sep 2010, 22:01

Hi,

i have a strange Problem with instant row selection.
I have a <p:commandButton> witch eneable/disable rendering for a <h:form>.
in this <h:form> i have a <p:dataTable> with instant row selection witch calls a <p:dialog> with further informations about the data...

whenever i disable/eneable the <h:form> (with the <p:commandButton>) the p:dialog is displayed once more if select a row.

Image

Code: Select all

<p:commandButton id="Overview" update="overview555" actionListener="#{navigationBean.navigate('OVERVIEW')}" value="Overview"/>
<p:commandButton id="Overview" update="overview555" actionListener="#{navigationBean.navigate('DATA')}" value="Data"/>

<h:form id="overview555">
     <h:form rendered="#{navigationBean.isView('DATA')}"> 
         <p:dataTable var="data1" value="#{bean.informations}"
               selection="#{bean.selectedData}" selectionMode="single"  
               onRowSelectUpdate="display1" onRowSelectComplete="fdDialog.show()">
               ...
        </p:dataTable>
        <p:dialog header="Further Data" widgetVar="fdDialog" resizable="false"
                  width="500" showEffect="drop" hideEffect="drop">
                          <p:dataTable var="data" value="#{bean.furhterData}" id="display1">
                          ...
                          </p:dataTable>
        <p:dialog header>
     </h:form>
</h:form>
 


callahan
Posts: 768
Joined: 27 May 2010, 22:52

26 Sep 2010, 12:22

Hi,

What version of PrimeFaces are you using?

Does it help if you don't use nested forms? The nested form could be changed to an outputPanel:

Code: Select all

<p:commandButton id="Overview" update="overview555" actionListener="#{navigationBean.navigate('OVERVIEW')}" value="Overview"/>
<p:commandButton id="Overview" update="overview555" actionListener="#{navigationBean.navigate('DATA')}" value="Data"/>

<h:form id="overview555">
     <h:outputPanel rendered="#{navigationBean.isView('DATA')}">
         <p:dataTable var="data1" value="#{bean.informations}"
               selection="#{bean.selectedData}" selectionMode="single" 
               onRowSelectUpdate="display1" onRowSelectComplete="fdDialog.show()">
               ...
        </p:dataTable>
        <p:dialog header="Further Data" widgetVar="fdDialog" resizable="false"
                  width="500" showEffect="drop" hideEffect="drop">
                          <p:dataTable var="data" value="#{bean.furhterData}" id="display1">
                          ...
                          </p:dataTable>
        <p:dialog header>
     </h:outputPanel>
</h:form>

ruddy_robot
Posts: 32
Joined: 07 Sep 2010, 12:37

26 Sep 2010, 14:09

Hi Callahan,

Im using Primefaces 2.2.M1 with Mojarra 2.0.2
Yes I've allready tried it with p:outputPanel (did u mean p:outputPanel instead of h:outputPanel?) and still the same problem :-(


This is the current code

Code: Select all


<p:commandButton id="Overview" update="overview555" actionListener="#{navigationBean.navigate('OVERVIEW')}" value="Overview"/>
<p:commandButton id="Overview" update="overview555" actionListener="#{navigationBean.navigate('DATA')}" value="Data"/>

    <ui:define name="content">
        <p:outputPanel id="overview555">
            <ui:fragment rendered="#{navigationBean.isView('DATA')}">

                  <p:dataTable var="data1" value="#{bean.informations}"
                      selection="#{bean.selectedData}" selectionMode="single" 
                      onRowSelectUpdate="display1" onRowSelectComplete="fdDialog.show()">
                      ...
                  </p:dataTable>

                  <p:dialog header="Further Data" widgetVar="fdDialog" resizable="false"
                      width="500" showEffect="drop" hideEffect="drop">
                      <p:dataTable var="data" value="#{bean.furhterData}" id="display1">
                          ...
                      </p:dataTable>
                  </p:dialog>

            </ui:fragment>
        </p:outputPanel>
    </ui:define>


callahan
Posts: 768
Joined: 27 May 2010, 22:52

26 Sep 2010, 15:43

Sorry, I ment p:outputPanel not h:outputPanel.

With 2.2.M1, there are issues when forms or datatables are updated. There are problems updating forms (http://primefaces.prime.com.tr/forum/vi ... f=3&t=4554), and there are problems using dataTables after they are updated (http://primefaces.prime.com.tr/forum/vi ... f=3&t=4531). You may be having issues related to or the same as the second issue here.

ruddy_robot
Posts: 32
Joined: 07 Sep 2010, 12:37

26 Sep 2010, 16:26

Thanks for your help.

That means I can continue...and wait for the final version of Primefaces 2.2 :-)

gholmer
Posts: 19
Joined: 01 Sep 2010, 22:36

29 Sep 2010, 20:30

I'm seeing this problem too. I have a button on a modal dialog that calls a method in a bean, and also has onclick="dlgQuery.hide();" but the dialog remains and in fact there's another one behind it... showing different data. I tried a 2.2RC1 snapshot from today and also saw the issue.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 44 guests