Hello,
I have a problem with p:messages with autoUpdate="true". Richfaces has a possibility to restrict autoUpdate attribute with limitRender="true". Does primefaces has some possibility
Problem:
open dialog, click on submit button and call oncomplete="dlg.hide()". But, if I have some listener inside dialog, like close dialog that calls some generic method, then p:messages component with autoUpdate="true" is called twice and message disappear (e.q. Delete successful) - The message for deletion is showing correctly, but immediately disappear because of second autoUpdate called by close dialog listener
Regards
skip autoUpdate="true" with somethig like limitRender
we had exactly the same problem and found no solution via primefaces..
we "solved" it by creating our own listener which adds our messages to the update entities, but only when there are new messages in facescontext.
this way our messages are still alive, when closelistener is fired.
only known "bug".. when the closelistener adds a message too, the message from the actionlistener gets lost.. but we dont have this case in our application right now.
we "solved" it by creating our own listener which adds our messages to the update entities, but only when there are new messages in facescontext.
this way our messages are still alive, when closelistener is fired.
only known "bug".. when the closelistener adds a message too, the message from the actionlistener gets lost.. but we dont have this case in our application right now.
PrimeFaces 3.2
Mojarra 2.0.2
Glassfish 3.0.1
Mojarra 2.0.2
Glassfish 3.0.1
Hi,
There isn't concept of "limitRender" in PrimeFaces. I have implemented this behavior by putting a special flag in request scope. E.g. I have p:messages and p:growl and want to show sometimes only p:growl
P.S. RequestContext can't help here.
There isn't concept of "limitRender" in PrimeFaces. I have implemented this behavior by putting a special flag in request scope. E.g. I have p:messages and p:growl and want to show sometimes only p:growl
Code: Select all
<p:growl id="growlNotification" showDetail="true" showSummary="true" rendered="#{not empty requestScope['growlOnly'] and requestScope['growlOnly'] == true}"/>
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
-
- Posts: 1
- Joined: 30 Jul 2012, 09:07
- Location: India (Pune)
- Contact:
Please let me know how to use P:poll which should update only specified components and skip other autoupdate components.
I tried different workaround but did not got sucess.
In Richfaces we have limitrender.But we do not have this knid of functionality in primefaces.
If someone know any other workaround please post the message .
Thanks,
Roshan
I tried different workaround but did not got sucess.
In Richfaces we have limitrender.But we do not have this knid of functionality in primefaces.
If someone know any other workaround please post the message .
Thanks,
Roshan
Same problem here!open dialog, click on submit button and call oncomplete="dlg.hide()". But, if I have some listener inside dialog, like close dialog that calls some generic method, then p:messages component with autoUpdate="true" is called twice and message disappear (e.q. Delete successful) - The message for deletion is showing correctly, but immediately disappear because of second autoUpdate called by close dialog listener
Is there any solution?
You can use rendered attribute to avoid auto updating. In my case it is poll component which is clearing messages. If poll is triggered, its client ID appears as javax.faces.source request parameter which can be used in expression language.
Alternative solution is binding poll.
Code: Select all
<h:form id="myForm">
<p:messages autoUpdate="true"
rendered="#{param['javax.faces.source'] != 'myForm:myPoll'}" />
<h:panelGrid id="myPanel">
...
...
...
</h:panelGrid>
<p:poll id="myPoll" autoStart="true" global="false" interval="15"
update=":myForm:myPanel" listener="#{myBean.myListener}" />
</h:form>
Code: Select all
<p:messages ... rendered="#{param['javax.faces.source'] != poll.clientId}" />
...
<p:poll binding="#{poll}" ... />
Rüdiger
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
PrimeFaces 11.0 | Ultima 2.0
Mojarra 2.3 | Tomcat 8/9 | Win7/10 | OS X 10.14
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
We're discussing this with Thomas, will give an update soon.
-
- Prime
- Posts: 18616
- Joined: 05 Jan 2009, 00:21
- Location: Cybertron
- Contact:
Thomas will add ignoreAutoUpdate option to ajax api of ours to ... well ignore auto updates
For all ajax based PF componentsoptimus.prime wrote:Thomas will add ignoreAutoUpdate option to ajax api of ours to ... well ignore auto updates
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
-
- Information
-
Who is online
Users browsing this forum: No registered users and 35 guests