Hi there,

I've committed changes to support portlet preview mode in jetspeed-2 and an 
example, PickANumberPortlet, to apa-demo.
A portlet can implement "preview" mode by itself. In this case, Jetspeed will 
invoke the portlet to render itself.
If a portlet does not implement "preview" mode but the portlet defines a 
metadata in jetspeed-portlet.xml like the following example, Jetspeed will 
render the preview image instead.

    <portlet id="HelloPortlet">
        <portlet-name>HelloPortlet</portlet-name>
        <snip/>
        <js:metadata 
name="portlet.preview.image">/demo/images/preview/hello.png</js:metadata>
    </portlet>

When those are not available, Jetspeed will render "preview not available" 
image instead.
Client code can request the preview rendering by invoking portlet pipeline urls 
like the following example:

http://localhost:18080/collab/portlet/?entity=demo::PickANumberPortlet&portlet=demo::PickANumberPortlet&mode=preview

As you might know, "mode" parameter is added. So, you can use other portlet 
modes as well such as "help" or "view".


Kind regards,

Woonsan




----- Original Message ----
From: Woonsan Ko <[email protected]>
To: Jetspeed Developers List <[email protected]>
Sent: Fri, November 20, 2009 8:27:05 PM
Subject: Re: Progress...

Hi Gonzalo,

--- On Fri, 11/20/09, Gonzalo Aguilar Delgado <[email protected]> 
wrote:

> From: Gonzalo Aguilar Delgado <[email protected]>
> Subject: Re: Progress...
> To: "Jetspeed Developers List" <[email protected]>
> Date: Friday, November 20, 2009, 6:42 PM
> 
> 
> > I've just committed something to separate YUI
> instantiation and event handlers from the portal.js. Event
> handlers for toolbox portlet are now defined in
> toolbox.jsp.
> > Also, the ids are not duplicated any more by using
> portlet namespace and portlet unique names.
> > By the way, I see the following problems now:
> > - The portlets list table contains table element for
> each portlet item.
> >   I think it should have tr and td
> before adding the table element.
> >   FYI, we cannot leverage data table
> with YUI3 yet because it's not ported yet.
> 
> I didn't find anyway to handle this, that's why I left this
> way for now.
> I don't want to forget add tr's and td's.
> But I think it will be better create a yui widget that will
> handle all
> for us. Even preview think will be a good think
> to be handled by this widget. 
> 
> Is possible create widgets in YUI?

Yes, I think it would be easy to add widgets.
However, I've just committed one more. I replaced the container panel tag by 
div instead of table, and I wrapped the portlet item table by div. So, we don't 
have to consider tr and td any more. I think it would be okay for now before we 
have better widgets.

> 
> 
> > - When search button is clicked, it should remove
> existing rows.
> 
> But they will be loaded again when click on panel right?

Yes. I think we need to do like that. Please review my recent changes.

> 
> > - Preview link
> 
> I think this one will be difficult but...
> 

As I mentioned in other email, I think it would be better to support 'preview' 
custom mode and invoke a portlet with 'preview' custom mode when we need 
preview page for the portlet.
If a portlet implements 'preview' custom mode, then we can just render the 
output in an area. Otherwise, we can do some default handling. For example, we 
can define a metadata like 'thumbnail' in jetspeed-portlet.xml...

Kind regards,

Woonsan


      

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to