I'm using a PrimeFaces commandButton
to issue an Ajax request.
I should set the update
attribute so that the whole parent form be updated EXCEPT for some specific components (Let's say I've tagged them with styleClass="noupdate"
).
I'm using PrimeFaces 3.5, so I think PrimeFaces JQuery Selectors may help.
I tried something like this:
<!-- ...some inputs/labels to be updated here... -->
<p:overlayPanel styleClass="noupdate">
<!-- ...some inputs/labels to be updated here... -->
<p:commandButton id="btnDoIt" value="Do it"
update="@(this.closest('form') :not(.noupdate))"/>
</p:overlayPanel>
but it doesn't work (I get a JavaScript Syntax Error).
Is there a way to get what I need?
Notice that:
1) The form id is not known because the button is part of a composite component that can be hosted by any form in different views
2) In my example the <p:overlayPanel>
itself must not be updated, but any descendant component do.
3) There are more than one form in the view, and I should work on the "current" one only.
Thank you in advance to anyone can help me.