You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Seth Weiner <sa...@duke.edu> on 2003/06/18 21:15:18 UTC

limiting customize layout selection

We'll soon be rolling out a live jetspeed site as a corporate intranet.
 Before we do that we're trying to make the user experience as complete
as possible.  One issue we've encourtered is a quirk with pane
customization.  Suppose a user's home page has a tabcontroller on it
with three panes.  If the user were to customize that page and
unwittingly select a layout other than tab or menu, he or she will lose
those panes.  Granted, this can be 'trained around,' but there must be a
more elegant way to handle this.

In the customizer.portletset.vm template, the 'Add Portlet' and 'Add
Pane' buttons are conditionally enabled based upon the type of
controller that's active.  Using this same conditional value, it should
be possible to intelligently populate the 'Layout' dropdown box.  If the
pane has other panes on it, only TabController and MenuController should
be listed.  If the pane has portlets on it, these two should NOT appear
and all the others should.  In the template,
customizer-portletset-layout.vm, there is a #foreach statement that
populates the dropdown box.  Code such as the following would, in
theory, behave the way I want (note the first #if statement):

#foreach ($controller in $controllers)
  #if ( ($controller.hasPanes="true" && #allowpane) ||
        ($controller.hasPortlets="true" && $allowportlet) )
  <option value="$controller.Name"
    #if ($controller.Name == $currentController) SELECTED #end>
    #if ($controller.Title)
      $controller.Title 
    #else 
      $controller.Name
    #end
  #end
#end

The problem is that i need these 'hasPanes' and 'hasPortlets' properties
on the $controller object.  Is there a property/function that already
supplies these values?  If not, how could i add it?  I think this is an
important feature that is currently missing.

Thanks!
Seth Weiner

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


RE: limiting customize layout selection

Posted by Mark Orciuch <ma...@ngsltd.com>.
This is an interesting problem and should probably be logged in Bugzilla. I
think that in customizer-portletset-layout.vm you have access to $set
variable which is an instance of  PortletSet. You should be able to
interrogate it to see whether it contains portlets or other portlet sets
(panes). Let me know if this works for you.

Best regards,

Mark Orciuch - morciuch@apache.org
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

> -----Original Message-----
> From: Seth Weiner [mailto:saw5@duke.edu]
> Sent: Wednesday, June 18, 2003 2:15 PM
> To: jetspeed-dev@jakarta.apache.org
> Subject: limiting customize layout selection
>
>
> We'll soon be rolling out a live jetspeed site as a corporate intranet.
>  Before we do that we're trying to make the user experience as complete
> as possible.  One issue we've encourtered is a quirk with pane
> customization.  Suppose a user's home page has a tabcontroller on it
> with three panes.  If the user were to customize that page and
> unwittingly select a layout other than tab or menu, he or she will lose
> those panes.  Granted, this can be 'trained around,' but there must be a
> more elegant way to handle this.
>
> In the customizer.portletset.vm template, the 'Add Portlet' and 'Add
> Pane' buttons are conditionally enabled based upon the type of
> controller that's active.  Using this same conditional value, it should
> be possible to intelligently populate the 'Layout' dropdown box.  If the
> pane has other panes on it, only TabController and MenuController should
> be listed.  If the pane has portlets on it, these two should NOT appear
> and all the others should.  In the template,
> customizer-portletset-layout.vm, there is a #foreach statement that
> populates the dropdown box.  Code such as the following would, in
> theory, behave the way I want (note the first #if statement):
>
> #foreach ($controller in $controllers)
>   #if ( ($controller.hasPanes="true" && #allowpane) ||
>         ($controller.hasPortlets="true" && $allowportlet) )
>   <option value="$controller.Name"
>     #if ($controller.Name == $currentController) SELECTED #end>
>     #if ($controller.Title)
>       $controller.Title
>     #else
>       $controller.Name
>     #end
>   #end
> #end
>
> The problem is that i need these 'hasPanes' and 'hasPortlets' properties
> on the $controller object.  Is there a property/function that already
> supplies these values?  If not, how could i add it?  I think this is an
> important feature that is currently missing.
>
> Thanks!
> Seth Weiner
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org
>
>
>
>



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