You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "David DeWolf (JIRA)" <pl...@jakarta.apache.org> on 2005/02/21 02:26:48 UTC

[jira] Updated: (PLUTO-104) Pluto RC2 type="column" aggregation puts portlets in rows instead of columns

     [ http://issues.apache.org/jira/browse/PLUTO-104?page=history ]

David DeWolf updated PLUTO-104:
-------------------------------

    Priority: Minor  (was: Major)

Updating to minor.  This does not break anything.

> Pluto RC2 type="column" aggregation puts portlets in rows instead of columns
> ----------------------------------------------------------------------------
>
>          Key: PLUTO-104
>          URL: http://issues.apache.org/jira/browse/PLUTO-104
>      Project: Pluto
>         Type: Bug
>   Components: portal driver
>     Versions: 1.0.1-rc2
>  Environment: Windows XP, Pluto RC2, Tomcat V4 and V5
>     Reporter: Robert Simpson
>     Priority: Minor

>
> Using the aggregation provided by the JSP files included with Pluto RC2, you can add fragments to the pageregistry.xml file to put more than one portlet in the same column:
> <fragment name="row1" type="row">
>   <fragment name="col1" type="column">
>     <fragment name="A" type="portlet">
>       <property name="portlet" value="3.1"/>
>     </fragment>
>   </fragment>
>   <fragment name="col2" type="column">
>     <fragment name="B" type="portlet">
>       <property name="portlet" value="3.2"/>
>     </fragment>
>     <fragment name="C" type="portlet">
>       <property name="portlet" value="3.3"/>
>     </fragment>
>   </fragment>
> </fragment>
> One would think this would result in the following layout:
> col1 col2
> ---- ----
>  A     B
>  |     |
>  |     V
>  |     C
>  |     |
>  V     V
> But instead it results in the portlets being laid out in rows:
> col1  col2
> ----  ----
> A ------->
> B --> C-->
> If you recognize the confusion and reverse the sense of rows and columns, coding the layout with the portlet fragments in rows (under type="column" fragments) rather than columns, like this:
> <fragment name="tbl1" type="row">
>   <fragment name="row1" type="column">
>     <fragment name="A" type="portlet">
>       <property name="portlet" value="3.1"/>
>     </fragment>
>     <fragment name="B" type="portlet">
>       <property name="portlet" value="3.2"/>
>     </fragment>
>   </fragment>
>   <fragment name="row2" type="column">
>     <fragment name="C" type="portlet">
>       <property name="portlet" value="3.3"/>
>     </fragment>
>   </fragment>
> </fragment>
> The result is this:
> col1 col2
> ---- ----
>  A     B
>  |     |
>  |     V
>  |
>  |
>  V
>  C
>  |
>  V
> Even if you add another column in the second row, to force portlet "C" to the second column, the result is still not quite what was intended:
> col1 col2
> ---- ----
>  A     B
>  |     |
>  |     V
>  |
>  |
>  V
>        C
>        |
>        V
> The problem is that ColumnFragment.jsp generates a cell ("<td>") tag for each portlet subfragment rather than just a single one for the entire column fragment.  Likewisse, RowFragment.jsp generates a row ("<tr>") tag for each column subfragment rather than just a single one for each row.  I was able to fairly easily fix this with the following changes:
> 1) move the begin and end "<td>" tags outside of the subfragment loop in ColumnFragment.jsp (before and after the "while", respectively)
> 2) move the begin and end "<tr>" tags outside of the subfragment loop in RowFragment.jsp (before and after the "while", respectively)
> 3) move the begin and end "<table>" tags from RowFragment.jsp to outside of the row subfragment loop in PageFragment.jsp (before and after the "while", respectively)
> 4) add paragraph ("<p>") tags before and after the outermost "table" tags in PortletFragmentHeader.jsp and PortletFragmentFooter.jsp to provide spacing between portlets in the same column
> After making these changes, the portlets are displayed in columns as expected.  These changes enable the desired layout, and do not restrict the ability to create other layouts that could previously be created with the existing JSP files.  It also will help to reduce confusion on the part of users, and probably avoid some of the questions which would result due to the mix up between rows and columns in the current implementation.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira