Of course. This job was done by my colleague Vedran, he can give more
details next week (unbelievable, but he's on vacation :-)

In general you can store the URLs, which should be related to the buttons,
inside of the registry using the structure described below. The problem
is to transport this value up to the portlet control, because there you
have to render the HTML code for the buttons. That means that you have to
extend the schema of the registry-PSML with these tags and run Castor
(urgh!!!)
to create the resulting classes. They are responsible to transport the
values
inside of the registry to the upper layers. Inside of the control you
can then call methods similar to

getPortlet().getPortletConfig().getEditURL()

to retrieve the value of the registry and attach this URL to the HTML code
of the button.

We use the same way to transport the security settings to the upper layers.
As a result our code to generate the buttons looks similar to:

      if ( this.getPortlet().getAllowMaximize() )
      {
        String maxURL = this.getPortlet ( ).getPortletConfig ( ).getMaxURL (
);

          .....         

        A max = new A( maxURL )
                     .addElement( new IMG( MAX_IMAGE ).setBorder( 0 )
                                                      .setWidth( 16 )
                                                      .setHeight( 14 ) );
        ....
      }

Hope that helps,
Marcus


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Mittwoch, 15. November 2000 13:27
> To: JetSpeed
> Subject: Re: editable portlets for release 1.2
> 
> 
> 
> 
> Marcus,
> 
> could you provide a brief overview of how the implementation 
> of editable
> portlets you are working on works ?
> Which classes would be added to JetSpeed and which ones would 
> have to be
> changed ?
> 
> Best regards,
> 
> Thomas
> 
> Thomas Schaeck
> IBM Pervasive Computing Division
> Phone: +49-(0)7031-16-3479  e-mail: [EMAIL PROTECTED]
> Address: IBM Deutschland Entwicklung GmbH,
> Schoenaicher Str. 220, 71032 Boeblingen, Germany
> 
> "Schwarz, Marcus" wrote:
> >
> > Additionally we have added for each portlet some special 
> tags inside of
> the
> > registry, which are handling the related URLs:
> >
> >             <functions>
> >                 <function name="maximize">
> >                     <url>http://finance.yahoo.com</url>
> >                 </function>
> >             </functions>
> >
> > here one can specify which URL should be called if the 
> button is pushed.
> The
> > current way to allways call the same URL for each portlet 
> (OK, it's a
> > dynamic
> > one, but still...) is surely not enough. In the above 
> approach you can
> > dynamically
> > e.g. call a configuration URL of the portlet. Another possibility is
> surely
> > to put these information into the "parameters" area of a 
> portlet-entry.
> >
> 
> That's a great idea.
> A PortletControl could definitely query all the available functions
> on a Portlet and add them to the control bar.
> Default functions could be registered in the PortletControl entry.
> 
> Sample registry entries:
> 
> <portlet-entry ...>
>      <functions>
>           <function name="maximize">
>                <url>http://wherever/</url>
>           </function>
>           <!-- override the default behavior to remove the 
> close option -->
>           <function name="close"/>
>           <function name="edit">
>                <url>my_custom_edit/</url>
>           </function>
>      </functions>
> </portlet-entry>
> 
> <portle-control ..>
>      <functions>
>           <function name="maximize">
>                <icon>std_maximize_icon</icon>
>                <url>std_maximize_dynamic_URL</url>
>           </function>
>           <function name="close">
>                <icon>std_close_icon</icon>
>                <url>std_close_URL</url>
>           </function>
>           <function name="edit">
>                <icon>std_edit_icon</icon>
>                <url>std_edit_URL</url>
>           </function>
>      </functions>
> </portlet-control>
> 
> Did I understand correctly ?
> 
> --
> Rapha�l Luta - [EMAIL PROTECTED]
> 
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://marc.theaimsgroup.com/?l=jetspeed>
> Problems?:           [EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> --
> --------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://marc.theaimsgroup.com/?l=jetspeed>
> Problems?:           [EMAIL PROTECTED]
> 


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://marc.theaimsgroup.com/?l=jetspeed>
Problems?:           [EMAIL PROTECTED]

Reply via email to