Reputation: 133
I have a page to upload a file. If there is a message on the page previously due to success/failure of some operation, I want it to go away as soon as I click the button to Upload a file. But I saw that update only works after the file upload completes.
Upvotes: 1
Views: 275
Reputation: 12029
Assuming you are using PF8+ since you did not mention your version you can remove it with Jquery on Adding of file...
<p:fileUpload onAdd="$('.ui-messages').css('display','none');" ...
The above is shortened for brevity but basically hides the messages when you add a file.
Upvotes: 1