update via onHide attribute ?

UI Components for JSF
Post Reply
activee
Posts: 25
Joined: 07 May 2015, 16:05

20 Aug 2015, 23:23

Is it possible to update a component like I would do when using the tag "update=""" but using the dialog onHide attribute ?
I can't use normal update tag because it clauses my dialog on update then.
something like this :

Code: Select all

<p:dataTable id="inbox"..>
    .....
	<p:dialog  onHide="PF('inbox').update()">
	</p:dialog>
</p:dataTable>
I use pf 5.3 and mojarra 2.2.12

Spearhead
Posts: 31
Joined: 17 Jul 2013, 13:22

21 Aug 2015, 06:13

There are two ways

1. Use <p:remoteCommand> refer to showcase see how it works to update whatever you wanted to update upon client side callback

2. Create a hidden button that will update the component you put in, and use javascript or jquery to grab the hidden button and put a click event in it to trigger the action.

I used to use the 2nd method before I knew <p:remoteCommand> could overcome this problem handily

Cheers
PrimeFaces 6.2, Extensions 6.2.7
jsf Mojarra 2.2.8
JBoss 8.2 WildFly Final

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

28 Aug 2015, 15:47

why not just use the ajax events?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 36 guests