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 - [EMAIL PROTECTED]
Jakarta Jetspeed - Enterprise Portal in Java
http://jakarta.apache.org/jetspeed/

> -----Original Message-----
> From: Seth Weiner [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 18, 2003 2:15 PM
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to