portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn Golden <ggol...@umich.edu>
Subject RE: [PATCH] org.apache.jetspeed.portal.BasePortletSet.sortPortlet Set()
Date Thu, 04 Apr 2002 01:19:31 GMT
The sorting must be done for customization, which the customizer *could*
(and does) do.

The sorting ALSO must be done just to display the tabs or menus!  So each
request must have a properly layout sorted set of portlets (panes).

Now, storing them sorted, or sorting them when read and saving them when
sorted might help...

What would help better is if this object was not request life cycle based!
We will be using the portal page definition for a long time and many times
once we have at least one user, and we will likely have many users using the
definition!  Surely the service which is responsible for the portal page
descriptions could keep them around.  Then things like sorting would be used
more than once.

- Glenn 
 
--------------------------------------------
Glenn R. Golden, Systems Research Programmer
University of Michigan School of Information
ggolden@umich.edu               734-615-1419
http://www-personal.si.umich.edu/~ggolden/
--------------------------------------------

 


> -----Original Message-----
> From: David Sean Taylor [mailto:david@bluesunrise.com] 
> Sent: Wednesday, April 03, 2002 5:09 PM
> To: 'Jetspeed Developers List'
> Subject: RE: [PATCH] 
> org.apache.jetspeed.portal.BasePortletSet.sortPortletSet()
> 
> 
> 
> 
> > -----Original Message-----
> > From: Glenn Golden [mailto:ggolden@umich.edu]
> > Sent: Wednesday, April 03, 2002 1:06 PM
> > To: 'Jetspeed Developers List'
> > Subject: RE: [PATCH] 
> > org.apache.jetspeed.portal.BasePortletSet.sortPortletSet()
> > 
> > 
> > Ok - the BasePortletSet sorts only once for the lifetime of
> > the BasePortletSet, which lives I don't know how long.
> 
> Per request
> 
> > 
> > It has to sort.  Otherwise there is no order of panes, and we
> > need the panes (menu entries, tabs, and list in the 
> > customizer) ordered.
> 
> Can't the customizer sort them?
> 
> > 
> > It may be that the RowColumnControllerAction need not sort,
> > as the portlets are always going to be sorted, but it mixes 
> > portlets with panes, it seems, so...  Who knows!
> > 
> > But I don't see optional sorting as an option.
> 
> It has to be done at least once, but per request seems excessive
> 
> > 
> > - Glenn
> >  
> > --------------------------------------------
> > Glenn R. Golden, Systems Research Programmer
> > University of Michigan School of Information
> > ggolden@umich.edu               734-615-1419
> > http://www-personal.si.umich.edu/~ggolden/
> > --------------------------------------------
> > 
> > 
> > > -----Original Message-----
> > > From: David Sean Taylor [mailto:david@bluesunrise.com]
> > > Sent: Wednesday, April 03, 2002 1:00 PM
> > > To: 'Jetspeed Developers List'
> > > Subject: RE: [PATCH]
> > > org.apache.jetspeed.portal.BasePortletSet.sortPortletSet()
> > > 
> > > 
> > > Why do we have to sort twice?
> > > We are sorting in BasePortletSet and RowColumnControllerAction
> > >  
> > > A good optimization would be to make sorting optional. 
> Also, if the 
> > > customizer always put entries in the correct order so that they 
> > > didn't need to be sorted with every request. It seems wasteful to 
> > > sort with every request.
> > >  
> > > -----Original Message-----
> > > From: Glenn Golden [mailto:ggolden@umich.edu]
> > > Sent: Wednesday, April 03, 2002 7:51 AM
> > > To: 'Jetspeed-Dev'
> > > Subject: [PATCH]
> > > org.apache.jetspeed.portal.BasePortletSet.sortPortletSet()
> > > 
> > > 
> > > 
> > > I hate sorting.  So apparently does the BasePortletSet's 
> > > sortPortletSet().
> > >  
> > > In short, it does not sort the portlets properly by the layout 
> > > position. You can see this by comparing the order of the tabs or 
> > > menus with the position of the panes listed in the 
> customizer.  If 
> > > the order from the psml file does not match the layout positions, 
> > > you will see a difference. RowColumnControllerAction 
> takes care of 
> > > the customizer's sorting, and does it properly.  
> BasePortleSet takes 
> > > care of sorting the portlets for the normal display, and does not.
> > >  
> > > The method of walking the elements of a vector by position, and 
> > > modifying the vector by moving elements into different 
> positions as 
> > > you go is not a good one.  In my test case, the very 
> first element 
> > > [0] had a layout of "1".  So it was removed from the 
> vector (sliding 
> > > all else
> > > down) and inserted at position #1.  Note that the [1] element
> > > before is now the [0] element.
> > >  
> > > The next time through the loop, we look at the vector at 
> [1].  Oops, 
> > > we forget to look at the portlet now sitting at [0]!
> > > Again we look at that previously first portlet, which is now 
> > > happy at [1], and go on.
> > >  
> > > Instead of modifying a vector / list in place, 
> > > RowColumnControllerAction builds up a new one, looking at each 
> > > portlet's layout position as the index into the new list.  Those 
> > > without layout values are placed, in order of finding 
> them, into the 
> > > list in the holes or at the end.
> > >  
> > > I've fixed BasePortletSet to do the same.
> > >  
> > > David - could you apply this patch?
> > >  
> > > Thanks.
> > >  
> > > - Glenn
> > >  
> > > --------------------------------------------
> > > Glenn R. Golden, Systems Research Programmer
> > > University of Michigan School of Information
> > > ggolden@umich.edu               734-615-1419
> > > http://www-personal.si.umich.edu/~ggolden/
> > > --------------------------------------------
> > > 
> > >  
> > > 
> > > 
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:jetspeed-dev-> unsubscribe@jakarta.apache.org>
> > For
> > additional commands, 
> > e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jetspeed-dev-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@jakarta.apache.org>


Mime
View raw message