1 Reply Latest reply on Jan 19, 2009 3:19 PM by nbelaevski

    modalPanel and generation of component tree

    kphilipp

      I use the modalPanel component as follows:

      <rich:modalPanel id="spSubscriberPanel" minHeight="400" minWidth="625" style="overflow: auto;">
       <f:facet name="header">Subscriber Data</f:facet>
       <f:facet name="controls" />
       <a4j:form>
       <a4j:include ajaxRendered="true" viewId="/pages/show/subscriberData.xhtml" />
       </a4j:form>
       </rich:modalPanel>
      


      Nothing out of the ordinary until now.

      The issue is, that the component tree provided by

      /pages/show/subscriberData.xhtml

      is already generated if the whole webpage is accessed the first time and although the modalPanel component is not displayed.

      As a consequence, methods of the backing bean with unnitialized objects are invoked.

      Is it possible to postpone the generation of the component tree for

      /pages/show/subscriberData.xhtml

      until the displaying of the modalPanel component is actually demanded by the user.

        • 1. Re: modalPanel and generation of component tree
          nbelaevski

          Hello,

          No it's not possible currently. As a workaround you can use the fact that viewId can be defined by EL-expression. I.e. you can initially point viewId to simple basic page and then, when the modal panel is requested by user, re-render its contents using complete (subscriberData.xhtml) viewId and show panel.