Page 1 of 1

update problem

Posted: 22 Apr 2011, 06:47
by girish.bhojwani
<p:commandButton actionListener="..." oncomplete="//some function that clicks Button2"/>

<p:commandButton id="Button2" actionListener="..." update="dialogBox" oncomplete="showDialogBox()"/>

I am doing this because i am changing the "dialogBox" update dynamically....
Its not working...The dialogBox gets showed but it doesnot gets updated...


I debugged it..the actionlistener is getting called...and on its complete, the showDialogBox() is getting called..

Re: update problem

Posted: 26 Apr 2011, 09:33
by Franke
If the dialogBox is a p:dialog, make sure you are updating the contents of it, not the dialog itself or a surrounding elements. If you do the later, the dialog will break.

Re: update problem

Posted: 26 Apr 2011, 11:30
by girish.bhojwani
I am updating a <h:panelGroup id="..." layout="block"> within p:dialog...So I am not having a problem with it.

And why p:dialog does not works after updating? I was facing this issue also in past month..

Currently I am facing only update issue..

Re: update problem

Posted: 06 May 2011, 21:50
by sebastianovide
I am having similar problems. Did you find the solution?

Re: update problem

Posted: 25 May 2011, 09:15
by crimp
I fixed a similar problem with following in the h:form tag:

<h:form id="whatever" prependid="false">

Re: update problem

Posted: 25 May 2011, 09:57
by sebastianovide
interesting.... was that just a luck shoot ? or there is a logical reason ?

Re: update problem

Posted: 25 May 2011, 10:04
by Alex
note that form and dialogs are naming containers.. their children gets there id prepended..
in forms you can deactivate that.. in dialogs there is no option for that..

so updating a contentwrapper of a dialog has to look like this:
update="dialogID:contentwrapperID"

Re: update problem

Posted: 25 May 2011, 10:12
by girish.bhojwani
if the start of listener is because of a non-actionListener based component which clicks the command button(not commandButton1), the Listener of commandButton2 is fired properly..

As per my experience , the thing has nothing to do with prependId...(Please correct me if i am wrong)

In my case, i want to invoke it on click of TreeNode..which implements actionSource...(means a action listener)..
the thing fails in such condition...