portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Sean Taylor" <da...@bluesunrise.com>
Subject RE: [PROPOSAL] Portlet preview in the customizer
Date Thu, 08 Aug 2002 17:46:21 GMT
Makes me wonder about (yet another) mode: Preview.
In this mode, all the resources necessary for the portlet may not be there.
The portlet can then use an alternative method of displaying itself to give
the user an idea of what the portlet would look like. For ex. in a
DatabaseBrowser, you may not have all the connection info, so the
DatabaseBrowser would show the dummy rows of data.

As for the implementation, can't you have a PreviewPortlet, with a generic
role 'user' psml file, doing something like this:

public class PreviewPortlet extends AbstractPortlet
     * @param rundata The RunData object for the current request
    public ConcreteElement getContent( RunData rundata )
        String portletName =
        Portlet portlet;

            portlet = PortletFactory.getPortlet(portletName);,
        catch (Exception e)
            String s =  StringUtils.stackTrace(e);
            return new ClearElement("Error Previewing portlet: " +
portletName + " -- " + s);

        return portlet.getContent(rundata);

I already do this kind of stuff for getting portlets dynamically.
However I think a PreviewPortlet would be a nice addition

> -----Original Message-----
> From: Mark Orciuch [mailto:mark_orciuch@ngsltd.com]
> Sent: Thursday, August 08, 2002 10:27 AM
> To: Jetspeed Developers List
> Subject: [PROPOSAL] Portlet preview in the customizer
> I would like to propose enhancing the customizer to allow for previewing
> portlets before they are selected in the profile. I have a
> working prototype
> in place but there are issues which may need to be discussed.
> Here's a list
> of my issues:
> 1. Since we will be creating an instance of portlet which is not
> in the user
> profile, we cannot use the peid - we have to create a new
> instance directly
> from the registry. If we assign a static id to the instance, will
> all users
> previewing the portlet be hitting the same instance? I would hope that all
> users would be "sharing" the same instance.
> 2. How to prevent customizing/closing the portlet since it's not in the
> profile yet? I guess using the ClearPortletControl would be one
> way to hide
> the action icons but one should be able to use any control for
> the preview.
> Adding a preview mode would be much more involving than my prototype
> implementation.
> 3. How to handle interactive portlets such as the database browser? In my
> prototype, this does not work very well.
> I have created an enhancement request in Bugzilla for tracking purposes
> (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11565). I will
> attach all
> pertinent patches and new files from my prototype there. Please
> let me know
> if this sounds like a useful feature. I can do the actual implementation
> provided that I get some guidance in resolving the above issues. Thanks!
> Best regards,
> Mark C. Orciuch
> Next Generation Solutions, Ltd.
> e-Mail: mark_orciuch@ngsltd.com
> web: http://www.ngsltd.com
> --
> To unsubscribe, e-mail:
For additional commands, e-mail:

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