portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jefferson Uy" <jefferson...@islanddata.com>
Subject RE: Add selection type to portlet parameter for more flexible portletcustomization
Date Wed, 08 May 2002 17:46:42 GMT
Thanks Raphael.

Any chance the cleaner solution you are suggesting will be included in the next release of
Jetspeed? I would think that a lot of Jetspeed users (specially portlet developers) will benefit
from this feature.


-----Original Message-----
From: raphael.luta@networks.groupvu.com
Sent: Tuesday, May 07, 2002 12:12 AM
To: Jetspeed Developers List
Subject: Re: Add selection type to portlet parameter for more flexible

Jefferson Uy wrote:

>Sorry for the cross post.... I figured that maybe my question has more interest to Jetspeed
developers than users :)
>Any idea whether my requirement below is already being developed into Jetspeed?
>In portlet customization, I have a need to add a parameter type for a given portlet in
the form of a selection list/box. Right now, Jetspeed only has 2 types: boolean (allows you
to choose true/false) and text (requires you to enter the attribute for the specific parameter).
Is there a plan to expand this to include a selection list/box?  
>Basically what I want to do is add a drop down selection list in the portlet customization
page, so that the user can select a portlet option based on a prepopulated list of attributes.
This is important since it will make portlet customization flexible and user friendly. The
user just needs to select an option from the list instead of typing it on the text box.
>I am looking at 2 possible solutions: (but if there is already one in the works, then
maybe its better than mine below? ;) 
>1) Add a new parameter type value called "select" and a new parameter in the portlets
xreg file called "list" which will contain all possible values for the said parameter. Then
modify customizer-portlet.vm to parse the list and show them as options in a drop down box.
The problem I have with this approach is I don't know how to parse the list using velocity.
Is it possible to do such thing in velocity?
It would be the cleaner solution but requires some work:
- updat the org.apache.jetspeed.om.registry.Parameter interface
- update the corresponding implementation class
- update the Castor XML defintion for this object model 
- update the template to take advantage of this feature

This is not very demanding but may take some time to get right, 
especially if you're not familiar with Castor.

>2) A quick and dirty way is to add a new parameter type called "select" and then modify
customer-portlet.vm to key in on the type, name and value. The actual value list will be in
customizer-portlet.vm file. The code will look like this. Drawback of this is that it looks
like a hack and too cumbersome if your portlet customization uses lots of selection type parameter.
If you want to apply this kind of patch, I'd recommend that you *don't* 
modify the default customizer-portlet.vm
template but instead create a new one and change the Customizer template 
in the admin.xreg registry file.

Raphaƫl Luta - raphael.luta@networks.groupvu.com
Professional Services Manager
Vivendi Universal Networks - Paris

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>

View raw message