CommandButton onclick=this.form.target = '_blank' ajax=false does not work within Dialog Primefaces 10

Forum rules
Please note that response time for technical support is within 3-5 business days.
Post Reply
andersonneto
Posts: 14
Joined: 05 Sep 2017, 05:20

14 May 2021, 13:20

I am upgrading Primefaces 8.0, mojarra 2.3.13, to PrimeFaces 10.0.0, however I came across an error, the CommandButton command stopped working. Version downloaded on Maven:

Code: Select all

<dependency>
   <groupId>org.primefaces</groupId>
   <artifactId>primefaces</artifactId>
<version>10.0.0</version>
</dependency>
However, when disabling the CommandButton AJAX within the Dialog, to open a report with JasperReports in a new tab, nothing is performed:

Code: Select all

<p:dialog widgetVar="dlgReport" header="Report" showEffect="fade" 
                  resizable="true" draggable="true"  maximizable="false" 
                  responsive="true" closeOnEscape="true" >           
            <h:form id="formReport">
                <div class="p-grid p-formgrid ">                    
                        ... 
                    <div class="p-col-12 p-mt-2 p-right">                       
                        <p:splitButton value="Print" icon="fas fa-print" class="b-m-r"
                                       actionListener="#{visualizar.printReport(reqBean.relatorio_req,'pdf')}"                                
                                       oncomplete="if(args.success == true);" 
                                       onclick="this.form.target = '_blank'" ajax="false" >                               
                        ...
                        </p:splitButton>                       
                    </div>
                </div>
            </h:form>
</p:dialog>
The same command onclick = "this.form.target = '_blank'" ajax = "false"
executed outside the Dialog component, opens normally.

siris
Posts: 322
Joined: 29 Jul 2019, 13:57

14 May 2021, 22:29

Hi,

If the issue persists when you try it without a Mirage theme, please see the migration guide or get help from the PrimeFaces forum. Thank you for your understanding.
PrimeFaces Forum: viewforum.php?f=3
Migration Guide: https://primefaces.github.io/primefaces ... ide/10_0_0

Best Regards,

Post Reply

Return to “Mirage - PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests