-
1. Re: problem with too may request to RichFaces modalPanel
mcmurdosound Dec 11, 2011 8:33 AM (in response to sblour)I'd use the oncomplete event to show the modal panel. There should also be a reRender attribute to redraw the contents of the modalpanel. If you use a4j:status you could prevent multiple requests.
for reRendering the contents of a modalpanel I almost always use the following approach:
<rich:modalPanel id="mymp">
<h:form id="mympForm">
<a4j:outputPanel id="refreshMe">
...
#{mydata.whatever}
</...
...
</rich:modalPanel>
to show:
<a4j:commandLink value="open" action="#{dosome.action}" reRender="mympForm:refreshMe" oncomplete="#{rich:component('mymp')}.show();"/>
using a rich:menuItem should be quite similar!
-
2. Re: problem with too may request to RichFaces modalPanel
sblour Dec 12, 2011 2:44 PM (in response to mcmurdosound)Thank you for the help, still is not working. After few clicks to table rows, data is not getting refreshed. It does get refreshed for first 4 or 5 time request. Then it shows teh previous contain after 4 or 5 request sent. The modalPaned is using the rich:dataTable. This is the code
modalPAnel:
<rich:modalPanel id="myPanel" width="450" height="490">
.
.<h:form id="mympForm">
<div style="width:100%;height:420px;background-color:#ffffff;overflow:auto;margin-bottom:10px;">
<a4j:outputPanel id="DemoContainer">
menuItem function call:
<a4j:jsFunction id="showDemoPanel" name="showDemoPanel" requestDelay="50" ignoreDupResponses="false" oncomplete="showDemoPanel2();">
<a4j:actionparam name="clickedKey" assignTo="#{someHandler.clickedBeanKey}"/>
</a4j:jsFunction>
<a4j:jsFunction id="showDemoPanel2" name="showDemoPanel2" requestDelay="500" ignoreDupResponses="true"
reRender="mympForm:DemoContainer" oncomplete="Richfaces.showModalPanel('myPanel');focusFunction('stop');"/>