2 Replies Latest reply on Jul 14, 2008 2:00 PM by rmuruga

    Rendering Rich:Panel on the fly

    rmuruga
      Hi There,
         I am new to seam , i tried rendering a rich:panel along with a condition. Here is the my code .

      <a4j:support event="onviewactivated" reRender="table" />

      <rich:panel id="table" label="Application Form" rendered="#{testBean.aType eq 'I'}">
      </rich:panel>

      please suggest

      Thanks
      Muruga.R
        • 1. Re: Rendering Rich:Panel on the fly
          mail.micke

          Not sure what is going on form the snippets you sent but one thing you need to do is to wrap the panel in something like this:


          <a4j:outputPanel id="panelToRerender" layout="inline">
           <rich:panel id="table" label="Application Form" rendered="#{testBean.aType eq 'I'}">
          </rich:panel>
          </a4j:outputPanel>
          



          The reason you need to do it this way is because if it isn't rendered it isn't rendered, so there won't be anything with the id table to show.
          The solution is to put it inside an invisible wrapper and re-render the wrapper.


          - Micke

          • 2. Re: Rendering Rich:Panel on the fly
            rmuruga

            Click HELP for text formatting instructions. Then edit this text and check the preview.
            Hey Its working , Thanks a lot