0

Primefaces 5.3

I have a complex, multi-tab JSF/Primefaces @ViewScoped worksheet from which I launch a modal p:dialog (for editing one or more entity model values), via a composite component:

<p:commandLink 
 ...
 oncomplete="PF('dlg').show()"                
 process="@this"
>
 <f:setPropertyActionListener
  target="#{...}"
  value="#{...}"
  /> 
</p:commandLink>

<p:dialog 
  id="dlg"
  header="..." 
  widgetVar="dlg" 
  modal="true" 
  dynamic="true"
 >
 ... editor ... and p:commandButton for save, cancel etc. ..

  <p:ajax event="close" update="#{...}" />
</p:dialog>   

On launching the p:dialog, there is a significant delay as the complex parent view is reloaded, undermining somewhat the convenience of the modal p:dialog editor (as opposed to going to a completely separate view/page to edit the values then back to the parent worksheet view/page, which works fine but is less intuitive).

Q: How can I skip the expensive reloading of the parent view when I launch the modal p:dialog editor from a p:commandLink (in a composite component in the complex parent view) ?

Apostolos
  • 10,033
  • 5
  • 24
  • 39
  • 1
    The expensive reloading of the parent view cannot be explained by the code you posted without the uncertainty about the default of the `update` attribute on `p:commandLink` being `@none` or `@all` like discussed in the answer to http://stackoverflow.com/questions/25339056/understanding-process-and-update-attributes-of-primefaces. So explicitly setting it to `@none` is what you at least should try – Kukeltje Aug 23 '16 at 12:43
  • @Kukeltje Thanks, good idea to try, but `update="@none"` on the launching p:commandLink did not help. – Webel IT Australia - upvoter Aug 24 '16 at 22:49

0 Answers0