5 Replies Latest reply on Jan 16, 2006 4:41 AM by julien1

    Container calls Portlets 2 times

    alexeyg

      doView() of my portlets is called twice for some reason.

      I narrowed it down to the JSP file, it looks like. If I use a plain JSP file portlets are only called once:


      <%@ taglib uri="/WEB-INF/theme/portal-layout.tld" prefix="p" %>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">

      <head>
      <title>AddUp Main Layout Test Thingie</title>
      <meta http-equiv="Content-Type" content="text/html;" />
      <p:headerContent />
      <p:theme themeName='addup'/>
      </head>

      <body id="body">
      <table>
      <tr>
      <td>
      <p:region regionName='left'/>
      </td>
      </tr>
      <tr>
      <td>

      </td>
      <tr>
      <td>
      <p:region regionName='center'/>
      </td>
      </tr>
      </table>
      </body>
      </html>


      However, when using them in my other JSP file, each portlet is called TWICE! I checked it out and there is only one "P:REGION regionName" tag for each Portlet. All config files are the same (I'm just replacing index.jsp). Headers are the same. What could it possibly be?

        • 1. Re: Container calls Portlets 2 times
          alexeyg

          Something wrong with HTML tags... Those region tags are basically inside of a table - very simple file.

          • 2. Re: Container calls Portlets 2 times

            the region tag takes the rendered markup from the portlet and places it on the page. The portlet's job is long done before the region tag becomes active.
            Whatever it is that you see, the region tag is not causing what you describe.

            What makes you think that the portlets are rendered twice anyway ?

            • 3. Re: Container calls Portlets 2 times

              BTW: please post these kinds of questions in the user forum, otherwise they'll be ignored and deleted in the future.....

              • 4. Re: Container calls Portlets 2 times
                alexeyg

                Sorry I got confused what messages go where.

                I have added a counter that gets increased every time doView of a portlet is called. I refresh the page and the counter jumps up by 2 every time. I actually have 2 portlets on the page - one goes up by 1 and the other by 2 every time.

                • 5. Re: Container calls Portlets 2 times

                   

                  "alexeyg" wrote:
                  Sorry I got confused what messages go where.

                  I have added a counter that gets increased every time doView of a portlet is called. I refresh the page and the counter jumps up by 2 every time. I actually have 2 portlets on the page - one goes up by 1 and the other by 2 every time.


                  Do you have a way to reproduce that starting from a fresh portal installation ?