Board index JavaServer Faces General update problem

update problem

Components, Ajax Framework, Utilities and More.

Post 22 Apr 2011, 06:47

Posts: 16
<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..

Post 26 Apr 2011, 09:33

Posts: 49
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.
Using PF 3.0 with default JSF implementation of JBoss 6

Post 26 Apr 2011, 11:30

Posts: 16
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..

Post 06 May 2011, 21:50

Posts: 89
I am having similar problems. Did you find the solution?

Post 25 May 2011, 09:15

Posts: 1
I fixed a similar problem with following in the h:form tag:

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

Post 25 May 2011, 09:57

Posts: 89
interesting.... was that just a luck shoot ? or there is a logical reason ?

Post 25 May 2011, 10:04

Posts: 256
Location: Germany
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"
PrimeFaces 3.2
Mojarra 2.0.2
Glassfish 3.0.1

Post 25 May 2011, 10:12

Posts: 16
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...


Return to General