4 Replies Latest reply on Jul 5, 2007 6:29 AM by theute

    how to clean the useless table?

    littlefish

      when i use the following tag to create a region.
      <p:region regionName='top' regionID='top' />

      it will output some useless code when render the html page from portal

      the code are:



      anybody knows how to clean it when render the portal page??

      THX

        • 1. Re: how to clean the useless table?
          theute

          Use [ code ] some HTML [/ code] (with no spaces in the "tags" when you want to put some HTML code in this forum.

          • 2. Re: how to clean the useless table?
            antoine_h

            see the rendering features (documention).
            there are rendering option, to change the way the html is produced.

            for rewritting your own,
            see RegionTagHandler.java class for the jsp tag.
            and then DivRegionRenderer.java or EmptyRegionRenderer.java as some example of renderer.
            check in the xml descriptor file, where the type of renderer can be set.

            (This names are for 2.6... some may have change since 2.4... a few changes have been done, for better portal api).

            This is quiet easy.
            I did a PortletRenderer that show no border etc....
            but it still put the html tag of decoration (with "no visible" css styles),
            So that the shape and size is exactly the same as if there was the decoration.
            EmptyRenderer do some "no html tag at all".
            It is not the same : no table tag etc... and the portlet is not in the same alignement, not the same borders etc.... with the others in the same region.

            • 3. Re: how to clean the useless table?
              littlefish

              thx, i would like to remove the render of the following code:

              <div id='top'>
              <div class="portlet-container">
              <table width="100%" border="0" cellpadding="0" cellspacing="0">
              <tr>
              <td class="portlet-content-left">
              </td>
              <td class="portlet-body">
              <div class="portlet-content-center">


              • 4. Re: how to clean the useless table?
                theute

                If you remove this you need to adapt the theme accordingly.

                The empty td, does something it has a CSS class associated that includer the left border of the window.

                As Antoine mentioned you can create your own Renderer (and if you build a cool one, please share it). See the reference documentation,

                This very specific markup is built by the following class:
                http://anonsvn.jboss.org/repos/portal/tags/JBoss_Portal_2_6_0/theme/src/main/org/jboss/portal/theme/impl/render/div/DivWindowRenderer.java