-
1. Re: Rerender problem on popup panel
michpetrov Apr 25, 2013 4:59 AM (in response to valucky)Hi,
the panel does not automatically rerender when you show it. Additionally the panel is rendered at the end of <body> by default so even if the <rich:popupPanel> is inside the "contentClientId" the panel itself isn't (and does not rerender).
You can fix it either by specifying the panel's id in the render attribute or adding domElementAttachment="parent" to the popupPanel.
-
2. Re: Rerender problem on popup panel
valucky Apr 25, 2013 6:09 AM (in response to michpetrov)Hi,
Ok, i know this. I use
render="contentClientId", where "contentClientId" is the container element which contains the popup data.
the problem is, the popup refresh too late. first time show the oldest data and some seconds later the popup will show the correct data.
Thanks
Andras
-
3. Re: Rerender problem on popup panel
michpetrov Apr 25, 2013 6:59 AM (in response to valucky)Well, it's not the button that's the issue. What does the popup panel and the bean.action method look like?
-
4. Re: Rerender problem on popup panel
valucky Apr 25, 2013 7:24 AM (in response to michpetrov)The action is collect data which need in popup.
Action is fired and the getters called before popup show.
But the popup shows the old data (preview call) in turn the correct data is stored the object in background. And 1-2 seconds later refreshing the items on the popup without any user action
Thanks
-
5. Re: Rerender problem on popup panel
michpetrov Apr 25, 2013 7:59 AM (in response to valucky)I need to see the code
You can try putting <a4j:log> on the page and checking what triggers the render. Another thing that occured to me is that the commandButton is probably executing the whole page, add execute="@this" to it.
-
6. Re: Rerender problem on popup panel
valucky Apr 25, 2013 8:56 AM (in response to michpetrov)yes, you want to see, but my boss said he doesn't want to see
i will try a4j:log
Thanks
-
7. Re: Rerender problem on popup panel
peter.falken Apr 26, 2013 11:16 PM (in response to valucky)Valucky,
The code that you're looking for is this:
<a4j:commandButton value="Edit"> <a4j:ajax listener="#{someBean.load(item.id)}" oncomplete="#{rich:component('popup')}.show();" /> </a4j:commandButton>
This will trigger the action and after the AJAX call has completed - then it will show the popup panel.
I stumbled with the same problem you're having about a week ago. This code shows how I solved it.
Please tell your boss that OpenSource is about sharing knowledge & not about hiding code + implementations.
Luis