You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Eric White <ew...@rocksteady.com> on 2002/11/26 22:58:59 UTC

dynamic pane population upon startup?

I'd like to define a single portlet then, upon startup, dynamically
populate a pane with several instances of the aforementioned portlet,
each driven with different configuration data (most likely driven from a
database).

Can anybody point me to reference material (or, better yet, example
code) for how to do this?

thanks

eric




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: dynamic pane population upon startup?

Posted by David Sean Taylor <da...@bluesunrise.com>.
> -----Original Message-----
> From: Eric White [mailto:ewhite@rocksteady.com]
> Sent: Tuesday, November 26, 2002 2:51 PM
> To: Jetspeed Users List
> Subject: RE: dynamic pane population upon startup?
>
>
> not exactly what I was looking for. I've got a customized DBBrowser
> portlet working already (thanks to immense mysql config help from this
> list).
>
> I want to pre-populate a pane with an arbitrary number of portlets,
> based on a database query -- not seed a pane with two portlets that can
> do database queries.

Sorry I misunderstood. I thought it seemed easy, but I try not to discrimate
difficult questions over easy.
They're all equal afaic.

To do that I would recommend writing a controlling portlet that uses the
PortletFactory to dynamically create your portlets.
The downside is that you don't get any customizable layout within your
container portlet.
If it were me I'd try to somehow leverage the existing engine and use PSML
references if at all possible.
Or perhaps enhancing the AggregatePortlet.

The real problem I see is that aggregation is based on PSML.
You would need to create your own aggregation engine based on ... Im not
sure what your requirements are

If this is the case, look at how Jetspeed creates PortletSets from the PSML
model, and try taking that code as a basis for your new engine



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: dynamic pane population upon startup?

Posted by Eric White <ew...@rocksteady.com>.
not exactly what I was looking for. I've got a customized DBBrowser
portlet working already (thanks to immense mysql config help from this
list).

I want to pre-populate a pane with an arbitrary number of portlets,
based on a database query -- not seed a pane with two portlets that can
do database queries.



On Tue, 2002-11-26 at 16:37, David Sean Taylor wrote:
> Take a look at the Coffee db portlet in the demo-portlets.xreg:
> 
>     <portlet-entry name="DatabaseBrowserTest" hidden="false" type="ref"
> parent="DatabaseBrowserPortlet" application="false">
>         <meta-info>
>             <title>DatabaseBrowserTest</title>
>             <description>Simple Test Database Browser Portlet
> Example</description>
>         </meta-info>
>         <parameter name="template" value="database-browser-portlet"
> hidden="false"/>
>         <parameter name="customizeTemplate"
> value="database-browser-customize" hidden="false"/>
>         <parameter name="action"
> value="portlets.browser.DatabaseBrowserAction" hidden="false"/>
>         <parameter name="sql" value="select * from coffees" hidden="false"/>
>         <!-- to use an alternate torque pool, set this parameter -->
>         <!-- parameter name="poolname" value="otherpool" hidden="false"/-->
>         <parameter name="windowSize" value="5" hidden="false"/>
>         <media-type ref="html"/>
>         <category>database</category>
>     </portlet-entry>
> 
> 
> and then place a couple like these on a psml page with the customizer
> 
> 
> <?xml version="1.0" encoding="iso-8859-1"?>
> <portlets id="100" xmlns="http://xml.apache.org/jetspeed/2000/psml">
> 
>     <metainfo>
>         <title>Welcome Page</title>
>     </metainfo>
>     <control name="TabControl"/>
>     <controller name="CardPortletController"/>
> 
>     <portlets id="101">
>         <metainfo>
>             <title>Basic Tutorials</title>
>         </metainfo>
>         <controller name="OneColumn"/>
> 
>         <entry parent="DatabaseBrowserTest"/>
>         <entry parent="SomeotherDatabaseBasedPortlet"/>
> ...
>     </portlets>
> 
> 
> 
> > -----Original Message-----
> > From: Eric White [mailto:ewhite@rocksteady.com]
> > Sent: Tuesday, November 26, 2002 1:59 PM
> > To: Jetspeed Users List
> > Subject: dynamic pane population upon startup?
> >
> >
> > I'd like to define a single portlet then, upon startup, dynamically
> > populate a pane with several instances of the aforementioned portlet,
> > each driven with different configuration data (most likely driven from a
> > database).
> >
> > Can anybody point me to reference material (or, better yet, example
> > code) for how to do this?
> >
> > thanks
> >
> > eric
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: dynamic pane population upon startup?

Posted by David Sean Taylor <da...@bluesunrise.com>.
Take a look at the Coffee db portlet in the demo-portlets.xreg:

    <portlet-entry name="DatabaseBrowserTest" hidden="false" type="ref"
parent="DatabaseBrowserPortlet" application="false">
        <meta-info>
            <title>DatabaseBrowserTest</title>
            <description>Simple Test Database Browser Portlet
Example</description>
        </meta-info>
        <parameter name="template" value="database-browser-portlet"
hidden="false"/>
        <parameter name="customizeTemplate"
value="database-browser-customize" hidden="false"/>
        <parameter name="action"
value="portlets.browser.DatabaseBrowserAction" hidden="false"/>
        <parameter name="sql" value="select * from coffees" hidden="false"/>
        <!-- to use an alternate torque pool, set this parameter -->
        <!-- parameter name="poolname" value="otherpool" hidden="false"/-->
        <parameter name="windowSize" value="5" hidden="false"/>
        <media-type ref="html"/>
        <category>database</category>
    </portlet-entry>


and then place a couple like these on a psml page with the customizer


<?xml version="1.0" encoding="iso-8859-1"?>
<portlets id="100" xmlns="http://xml.apache.org/jetspeed/2000/psml">

    <metainfo>
        <title>Welcome Page</title>
    </metainfo>
    <control name="TabControl"/>
    <controller name="CardPortletController"/>

    <portlets id="101">
        <metainfo>
            <title>Basic Tutorials</title>
        </metainfo>
        <controller name="OneColumn"/>

        <entry parent="DatabaseBrowserTest"/>
        <entry parent="SomeotherDatabaseBasedPortlet"/>
...
    </portlets>



> -----Original Message-----
> From: Eric White [mailto:ewhite@rocksteady.com]
> Sent: Tuesday, November 26, 2002 1:59 PM
> To: Jetspeed Users List
> Subject: dynamic pane population upon startup?
>
>
> I'd like to define a single portlet then, upon startup, dynamically
> populate a pane with several instances of the aforementioned portlet,
> each driven with different configuration data (most likely driven from a
> database).
>
> Can anybody point me to reference material (or, better yet, example
> code) for how to do this?
>
> thanks
>
> eric
>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>