1

I am looking for something like <rich:popupPanel> in RichFaces 4, but then for RichFaces 3. I haven't found anything like in documenation. There is only <rich:modalPanel> which doesn't suit my needs, because it has problems displaying my datamodel in table. The selection doesn't work, it always returns no rows selected. If I put my table component in <rich:panel> or <rich:togglePanel>, then it works fine.

Is there any popup window excluding <rich:modalPanel> in RichFaces 3?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
kukis
  • 4,489
  • 6
  • 27
  • 50

1 Answers1

6

I dont have 50 reputation to ask you more details in a comment, so i will answer directly hoping this is what you're asking about.

I think you mean that your problem is that the content of the ModalPanel is not rerendered dynamically. but for this you can wrap your table (or the components you want to update) in an <a4j:outputPanel> with ajaxRendered="true"

Setting ajaxRendered="true" will cause the <a4j:outputPanel> to be updated with each Ajax response for the page, even when not listed explicitly by the requesting component. This can in turn be overridden by specific attributes on any requesting components.

http://docs.jboss.org/richfaces/latest_4_0_X/Component_Reference/en-US/html/chap-Component_Reference-Containers.html#sect-Component_Reference-Containers-a4joutputPanel

In my code I have something like :

<a4j:commandLink id="timelineBtn" action="#{timelineBean.doGenerateLog}"
    oncomplete="Richfaces.showModalPanel('timelinePnl');return false;"
    value="#{labels['timeline.button.lbl']}"/> 

that opens the modalPanel :

<rich:modalPanel style="width:800;height:600;" id="timelinePnl">

<a4j:outputPanel id="dataPanel" ajaxRendered="true">
<!-- your components to be updated go here -->
</a4j:outputPanel>

</rich:modalPanel>

So my content is updated with the results of my timelineBean.doGenerateLog method each time i open the modalPanel .

Rami
  • 328
  • 1
  • 13
  • 1
    Indeed it's a working solution, just wanted to add that it's usually not wanted to have the panel content rendered on every ajax request (especially requests not related to the panel, like field ajax validations, etc.). For this case I would recommend to explicitly re-render the panel when button/link is clicked (reRender="modalPanelId") and do not do ajaxRendered="true". – Andrey Dec 04 '13 at 13:32
  • +1 that is also an even better solution for simple taks. Depends on the complexity of what he wants to do. So I'd also refer to 'limitRender="true"' in case he wanted to reRender only some specific components and not all who have 'ajaxRendered="true"' cheers – Rami Dec 04 '13 at 18:29