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 Cyrille GACHOT <cy...@cotranet.com> on 2004/08/03 11:46:40 UTC

Re: ParameterPresentationStyle - REPOST

Le jeu 29/07/2004 à 10:39, Raphaël Luta a écrit :
> Cyrille GACHOT wrote:
> > Le mer 28/07/2004 à 11:47, Holger Dewes a écrit :
> >>>-----Original Message-----
> >>>From: Cyrille GACHOT [mailto:cyrille.gachot@cotranet.com] 
> >>>Sent: Wednesday, July 28, 2004 1:04 PM
> >>>To: Jetspeed User List
> >>>Subject: RE: ParameterPresentationStyle - REPOST
> >>>
> >>>Thanks, I'm going to take a look at that. btw, is it possible 
> >>>to define my own Customizer only for one portlet and not for 
> >>>every one?
> >>
> >>IIRC a portlet can take care of its customization by itself, by setting
> >>the provides.customization parameter to true. In that case,
> >>buildConfigureContext() will be called. But in that case, the portlet
> >>has to take care of the customization all by itself, even for skin,
> >>title etc.
> >>
> > 
> > Well, this is not really what i want; it's too complicated.
> > In fact, what I really want (in a first time) is to obtain something
> > similar to the WeatherPortlet but with JSP, and not Velocity.
> > The weather portlet has a parameter "Weather Location" that has several
> > fields, and uses onChange="param1.value=this.value" to save the new
> > values . But i can't apply the same method in my JSP.
> > Any thoughts?
> > 
> 
> Now you've got me really confused about what you want to do !
> 
> Are you trying to :
> - create new PresentationStyles with the default customizer
>    (Velocity based) to customize your portlets ?
> - use the PresentationStyles with your own JSP based
>    default customizer ?
> - build a JSP portlet-specific customizer ?
> 
Hi,

In fact, I don't precisely know how to do what I want to obtain, and
that was the goal of my question. I'm sorry if I can't explain myself
clearly.
What I want is to obtain something similar to the WeatherPortlet, but
with JSP. 
In weatherPortlet, there is a parameter (Weather Location) in the
customization part that contain several fields (City, Country, ...).
What I want is something similar (much more complicated in fact), by the
simplest way.
I use a JSP template for my parameter, and I don't know where and how to
retrieve the information the user will type in the fields.

I hope this is clear enough...

Thanks to try helping me, I'm really lost with this part.

Cyrille





> --
> Raphael Luta - raphael@apache.org
> Apache Jetspeed - Enterprise Portal in Java
> http://portals.apache.org/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Admin user can't modify other users' PSML through PSML Browser

Posted by John Tolentino <jt...@exist.com>.
Hi Danny,

That did the job. Thanks!

Regards,
John

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


AW: Admin user can't modify other users' PSML through PSML Browser

Posted by Danny <da...@mms-dresden.de>.
You could change the security-entry "owner-only" and add admin to allow="*".

That's what I did.

> -----Ursprüngliche Nachricht-----
> Von: John Tolentino [mailto:jtolentino@exist.com]
> Gesendet: Donnerstag, 5. August 2004 13:26
> An: Jetspeed Users List
> Betreff: Admin user can't modify other users' PSML through
> PSML Browser
>
>
> Hi,
>
> I have Jetspeed 1.5 running on Tomcat 4.1.29 and did the following:
>
> - logged in using admin / jetspeed for username and password.
> - created an "enabled" user named "test"
> - tried to edit test/html/default.psml using the PSML Browser
>
> Then I got this message: "You do not have access to these portlets."
>
> The only PSMLs that admin could edit (aside from his own) is the anon
> user's. I was expecting that I could edit any of the users'
> PSML since I
> logged in as admin. Can anyone clarify if I'm doing something
> wrong; had the
> wrong idea; or if there was indeed something wrong with the
> code and there's
> already a fix for it?
>
> Thanks,
> John
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Portlets execution flow

Posted by Oscar Ruiz <os...@gtd.es>.
Hi all,

can anyone clarify me how multiple MVC portlets (JSP for instance) are
executed and output displayed?

There is obviously an order in which portlet controllers are called,
apparently from top to bottom and left to right.

*apparently* the View component (JSP) is executed right after the
Controller, hence if portlets are sharing a Model the whole thing results in
a disaster.

Is there a way of rendering the page (i.e. execute the View components)
after all controllers have completed?

Many thanks.

Oscar.



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Admin user can't modify other users' PSML through PSML Browser

Posted by John Tolentino <jt...@exist.com>.
Hi,

I have Jetspeed 1.5 running on Tomcat 4.1.29 and did the following:

- logged in using admin / jetspeed for username and password.
- created an "enabled" user named "test"
- tried to edit test/html/default.psml using the PSML Browser

Then I got this message: "You do not have access to these portlets."

The only PSMLs that admin could edit (aside from his own) is the anon
user's. I was expecting that I could edit any of the users' PSML since I
logged in as admin. Can anyone clarify if I'm doing something wrong; had the
wrong idea; or if there was indeed something wrong with the code and there's
already a fix for it?

Thanks,
John


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: ParameterPresentationStyle - REPOST

Posted by Raphaël Luta <ra...@aptiwan.com>.
Cyrille GACHOT wrote:
> Thanks
> I'll take a look at all this.
> 
> Btw, What is the use of ParameterPresentationStyle in relation to the
> golbal Customizing stuff?
> 
> Cyrille
> 

A flexible way to provide custom UI elements (like drop down lists,
etc...) in the default customizer (or anywhere else you would care
to use them).
Without these styles, you would only have text boxes in the
customizer forms.

--
Raphaël Luta - raphael@apache.org
Apache Jetspeed - Enterprise Portal in Java
http://portals.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: ParameterPresentationStyle - REPOST

Posted by Cyrille GACHOT <cy...@cotranet.com>.
Thanks
I'll take a look at all this.

Btw, What is the use of ParameterPresentationStyle in relation to the
golbal Customizing stuff?

Cyrille

Le jeu 05/08/2004 à 10:04, Raphaël Luta a écrit :
> Cyrille GACHOT wrote:
> > Le mer 04/08/2004 à 10:53, Raphaël Luta a écrit :
> >>Cyrille GACHOT wrote:
> >>>
> >>>In fact, I don't precisely know how to do what I want to obtain, and
> >>>that was the goal of my question. I'm sorry if I can't explain myself
> >>>clearly.
> >>>What I want is to obtain something similar to the WeatherPortlet, but
> >>>with JSP. 
> >>>In weatherPortlet, there is a parameter (Weather Location) in the
> >>>customization part that contain several fields (City, Country, ...).
> >>>What I want is something similar (much more complicated in fact), by the
> >>>simplest way.
> >>>I use a JSP template for my parameter, and I don't know where and how to
> >>>retrieve the information the user will type in the fields.
> >>>
> >>>I hope this is clear enough...
> >>>
> >>>Thanks to try helping me, I'm really lost with this part.
> >>>
> >>
> >>Let's see: WeatherPortlet uses the default customizer that does not implement
> >>any complex server-side validation of input.
> >>If you're comfortable with this limitation, you can use the 
> >>JSPParamaterPresentationStyle inyour portlet xreg to have the customizer
> >>import your JSP templates to provide custom UI for a specific parameter.
> >>
> >>If you have more complex server-side validation needs you'll need to
> >>define your own customier code:
> >>- define a CustomizerJSP portlet (it seems that we never created it in the
> >>   default Jetspeed build, it should be there). Simply copy the
> >>   CustomizerVelocity to CustomizerJSP and change its base class to JSPPortlet
> >>   instead of VelocityPortlet.
> >>- define your portlet in the registry to a have CustomizerJSP as parent
> >>   instead of JSP.
> >>- now whenever you click customize on this portlet, the method 
> >>buildCustomizeContent() is called on your portlet action so that you do whatever 
> >>you need to prepare for cxustomization. Then set the template to use for
> >>customization with setTemplate().
> >>- set an action in the tempate to a custom customization action that'll handle
> >>   all the server-side validation, you can use the default customizer action
> >>   as a template for your action 
> >>(org.apache.jetspeed.modules.actions.CustomizeAction)
> >>
> >>
> >>Actually, looking at the code there, there's probably an opportunity for us to 
> >>improve reuse of this code... I'll do some updates this week-end.
> >>
> > 
> > Thanks, it's much more clear to me now. I think I'll have to use the
> > second solution.
> > I tried the first solution for a simple case previously but never made
> > it work. Just to know in case I need it later : How can I retrieve the
> > information the user has typed in my custom UI for one parameter? It's
> > not clear to me and every things I tried have failed.
> > 
> 
> If you use the default customizer, you can't since everything is handled
> by the customizer portlet.
> If you use a custom customizer, you're in regular portlet territory, so either
> you define an explicit action uin your customizer template and this action
> will be invoked when you submit your customization form or you use your
> default portlet action and use a event to submit your form.
> If you use the second option, be aware that you won't automatically leave
> the customize mode until execute the "controls.EndCustomze" action.
> 
> Have a look at "org.apache.jetspeed.modules.actions.portlets.CustomizeAction"
> source and the following templates:
> WEB-INF/templates/vm/portlets/html/customize-portlet.vm
> WEB-INF/templates/vm/portlets/html/customize-update-save-row.vm
> 
> to see how the customization flow is handled in the default customizer.
> 
> --
> Raphaël Luta - raphael@apache.org
> Apache Jetspeed - Enterprise Portal in Java
> http://portals.apache.org/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: ParameterPresentationStyle - REPOST

Posted by Raphaël Luta <ra...@apache.org>.
Cyrille GACHOT wrote:
> Le mer 04/08/2004 à 10:53, Raphaël Luta a écrit :
>>Cyrille GACHOT wrote:
>>>
>>>In fact, I don't precisely know how to do what I want to obtain, and
>>>that was the goal of my question. I'm sorry if I can't explain myself
>>>clearly.
>>>What I want is to obtain something similar to the WeatherPortlet, but
>>>with JSP. 
>>>In weatherPortlet, there is a parameter (Weather Location) in the
>>>customization part that contain several fields (City, Country, ...).
>>>What I want is something similar (much more complicated in fact), by the
>>>simplest way.
>>>I use a JSP template for my parameter, and I don't know where and how to
>>>retrieve the information the user will type in the fields.
>>>
>>>I hope this is clear enough...
>>>
>>>Thanks to try helping me, I'm really lost with this part.
>>>
>>
>>Let's see: WeatherPortlet uses the default customizer that does not implement
>>any complex server-side validation of input.
>>If you're comfortable with this limitation, you can use the 
>>JSPParamaterPresentationStyle inyour portlet xreg to have the customizer
>>import your JSP templates to provide custom UI for a specific parameter.
>>
>>If you have more complex server-side validation needs you'll need to
>>define your own customier code:
>>- define a CustomizerJSP portlet (it seems that we never created it in the
>>   default Jetspeed build, it should be there). Simply copy the
>>   CustomizerVelocity to CustomizerJSP and change its base class to JSPPortlet
>>   instead of VelocityPortlet.
>>- define your portlet in the registry to a have CustomizerJSP as parent
>>   instead of JSP.
>>- now whenever you click customize on this portlet, the method 
>>buildCustomizeContent() is called on your portlet action so that you do whatever 
>>you need to prepare for cxustomization. Then set the template to use for
>>customization with setTemplate().
>>- set an action in the tempate to a custom customization action that'll handle
>>   all the server-side validation, you can use the default customizer action
>>   as a template for your action 
>>(org.apache.jetspeed.modules.actions.CustomizeAction)
>>
>>
>>Actually, looking at the code there, there's probably an opportunity for us to 
>>improve reuse of this code... I'll do some updates this week-end.
>>
> 
> Thanks, it's much more clear to me now. I think I'll have to use the
> second solution.
> I tried the first solution for a simple case previously but never made
> it work. Just to know in case I need it later : How can I retrieve the
> information the user has typed in my custom UI for one parameter? It's
> not clear to me and every things I tried have failed.
> 

If you use the default customizer, you can't since everything is handled
by the customizer portlet.
If you use a custom customizer, you're in regular portlet territory, so either
you define an explicit action uin your customizer template and this action
will be invoked when you submit your customization form or you use your
default portlet action and use a event to submit your form.
If you use the second option, be aware that you won't automatically leave
the customize mode until execute the "controls.EndCustomze" action.

Have a look at "org.apache.jetspeed.modules.actions.portlets.CustomizeAction"
source and the following templates:
WEB-INF/templates/vm/portlets/html/customize-portlet.vm
WEB-INF/templates/vm/portlets/html/customize-update-save-row.vm

to see how the customization flow is handled in the default customizer.

--
Raphaël Luta - raphael@apache.org
Apache Jetspeed - Enterprise Portal in Java
http://portals.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: ParameterPresentationStyle - REPOST

Posted by Cyrille GACHOT <cy...@cotranet.com>.
Le mer 04/08/2004 à 10:53, Raphaël Luta a écrit :
> Cyrille GACHOT wrote:
> > Le jeu 29/07/2004 à 10:39, Raphaël Luta a écrit :
> > 
> >>Cyrille GACHOT wrote:
> >>
> >>>Le mer 28/07/2004 à 11:47, Holger Dewes a écrit :
> >>>
> >>>>>-----Original Message-----
> >>>>>From: Cyrille GACHOT [mailto:cyrille.gachot@cotranet.com] 
> >>>>>Sent: Wednesday, July 28, 2004 1:04 PM
> >>>>>To: Jetspeed User List
> >>>>>Subject: RE: ParameterPresentationStyle - REPOST
> >>>>>
> >>>>>Thanks, I'm going to take a look at that. btw, is it possible 
> >>>>>to define my own Customizer only for one portlet and not for 
> >>>>>every one?
> >>>>
> >>>>IIRC a portlet can take care of its customization by itself, by setting
> >>>>the provides.customization parameter to true. In that case,
> >>>>buildConfigureContext() will be called. But in that case, the portlet
> >>>>has to take care of the customization all by itself, even for skin,
> >>>>title etc.
> >>>>
> >>>
> >>>Well, this is not really what i want; it's too complicated.
> >>>In fact, what I really want (in a first time) is to obtain something
> >>>similar to the WeatherPortlet but with JSP, and not Velocity.
> >>>The weather portlet has a parameter "Weather Location" that has several
> >>>fields, and uses onChange="param1.value=this.value" to save the new
> >>>values . But i can't apply the same method in my JSP.
> >>>Any thoughts?
> >>>
> >>
> >>Now you've got me really confused about what you want to do !
> >>
> >>Are you trying to :
> >>- create new PresentationStyles with the default customizer
> >>   (Velocity based) to customize your portlets ?
> >>- use the PresentationStyles with your own JSP based
> >>   default customizer ?
> >>- build a JSP portlet-specific customizer ?
> >>
> > 
> > Hi,
> > 
> > In fact, I don't precisely know how to do what I want to obtain, and
> > that was the goal of my question. I'm sorry if I can't explain myself
> > clearly.
> > What I want is to obtain something similar to the WeatherPortlet, but
> > with JSP. 
> > In weatherPortlet, there is a parameter (Weather Location) in the
> > customization part that contain several fields (City, Country, ...).
> > What I want is something similar (much more complicated in fact), by the
> > simplest way.
> > I use a JSP template for my parameter, and I don't know where and how to
> > retrieve the information the user will type in the fields.
> > 
> > I hope this is clear enough...
> > 
> > Thanks to try helping me, I'm really lost with this part.
> > 
> 
> Let's see: WeatherPortlet uses the default customizer that does not implement
> any complex server-side validation of input.
> If you're comfortable with this limitation, you can use the 
> JSPParamaterPresentationStyle inyour portlet xreg to have the customizer
> import your JSP templates to provide custom UI for a specific parameter.
> 
> If you have more complex server-side validation needs you'll need to
> define your own customier code:
> - define a CustomizerJSP portlet (it seems that we never created it in the
>    default Jetspeed build, it should be there). Simply copy the
>    CustomizerVelocity to CustomizerJSP and change its base class to JSPPortlet
>    instead of VelocityPortlet.
> - define your portlet in the registry to a have CustomizerJSP as parent
>    instead of JSP.
> - now whenever you click customize on this portlet, the method 
> buildCustomizeContent() is called on your portlet action so that you do whatever 
> you need to prepare for cxustomization. Then set the template to use for
> customization with setTemplate().
> - set an action in the tempate to a custom customization action that'll handle
>    all the server-side validation, you can use the default customizer action
>    as a template for your action 
> (org.apache.jetspeed.modules.actions.CustomizeAction)
> 
> 
> Actually, looking at the code there, there's probably an opportunity for us to 
> improve reuse of this code... I'll do some updates this week-end.
> 
Thanks, it's much more clear to me now. I think I'll have to use the
second solution.
I tried the first solution for a simple case previously but never made
it work. Just to know in case I need it later : How can I retrieve the
information the user has typed in my custom UI for one parameter? It's
not clear to me and every things I tried have failed.

Thanks again for your patience.

Cyrille

> --
> Raphaêl Luta - raphael@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: ParameterPresentationStyle - REPOST

Posted by Cyrille GACHOT <cy...@cotranet.com>.
Le mer 04/08/2004 à 10:53, Raphaël Luta a écrit :
> Cyrille GACHOT wrote:
> > Le jeu 29/07/2004 à 10:39, Raphaël Luta a écrit :
> > 
> >>Cyrille GACHOT wrote:
> >>
> >>>Le mer 28/07/2004 à 11:47, Holger Dewes a écrit :
> >>>
> >>>>>-----Original Message-----
> >>>>>From: Cyrille GACHOT [mailto:cyrille.gachot@cotranet.com] 
> >>>>>Sent: Wednesday, July 28, 2004 1:04 PM
> >>>>>To: Jetspeed User List
> >>>>>Subject: RE: ParameterPresentationStyle - REPOST
> >>>>>
> >>>>>Thanks, I'm going to take a look at that. btw, is it possible 
> >>>>>to define my own Customizer only for one portlet and not for 
> >>>>>every one?
> >>>>
> >>>>IIRC a portlet can take care of its customization by itself, by setting
> >>>>the provides.customization parameter to true. In that case,
> >>>>buildConfigureContext() will be called. But in that case, the portlet
> >>>>has to take care of the customization all by itself, even for skin,
> >>>>title etc.
> >>>>
> >>>
> >>>Well, this is not really what i want; it's too complicated.
> >>>In fact, what I really want (in a first time) is to obtain something
> >>>similar to the WeatherPortlet but with JSP, and not Velocity.
> >>>The weather portlet has a parameter "Weather Location" that has several
> >>>fields, and uses onChange="param1.value=this.value" to save the new
> >>>values . But i can't apply the same method in my JSP.
> >>>Any thoughts?
> >>>
> >>
> >>Now you've got me really confused about what you want to do !
> >>
> >>Are you trying to :
> >>- create new PresentationStyles with the default customizer
> >>   (Velocity based) to customize your portlets ?
> >>- use the PresentationStyles with your own JSP based
> >>   default customizer ?
> >>- build a JSP portlet-specific customizer ?
> >>
> > 
> > Hi,
> > 
> > In fact, I don't precisely know how to do what I want to obtain, and
> > that was the goal of my question. I'm sorry if I can't explain myself
> > clearly.
> > What I want is to obtain something similar to the WeatherPortlet, but
> > with JSP. 
> > In weatherPortlet, there is a parameter (Weather Location) in the
> > customization part that contain several fields (City, Country, ...).
> > What I want is something similar (much more complicated in fact), by the
> > simplest way.
> > I use a JSP template for my parameter, and I don't know where and how to
> > retrieve the information the user will type in the fields.
> > 
> > I hope this is clear enough...
> > 
> > Thanks to try helping me, I'm really lost with this part.
> > 
> 
> Let's see: WeatherPortlet uses the default customizer that does not implement
> any complex server-side validation of input.
> If you're comfortable with this limitation, you can use the 
> JSPParamaterPresentationStyle inyour portlet xreg to have the customizer
> import your JSP templates to provide custom UI for a specific parameter.
> 
> If you have more complex server-side validation needs you'll need to
> define your own customier code:
> - define a CustomizerJSP portlet (it seems that we never created it in the
>    default Jetspeed build, it should be there). Simply copy the
>    CustomizerVelocity to CustomizerJSP and change its base class to JSPPortlet
>    instead of VelocityPortlet.
> - define your portlet in the registry to a have CustomizerJSP as parent
>    instead of JSP.
> - now whenever you click customize on this portlet, the method 
> buildCustomizeContent() is called on your portlet action so that you do whatever 
> you need to prepare for cxustomization. Then set the template to use for
> customization with setTemplate().
> - set an action in the tempate to a custom customization action that'll handle
>    all the server-side validation, you can use the default customizer action
>    as a template for your action 
> (org.apache.jetspeed.modules.actions.CustomizeAction)
> 
> 
> Actually, looking at the code there, there's probably an opportunity for us to 
> improve reuse of this code... I'll do some updates this week-end.
> 
Thanks, it's much more clear to me now. I think I'll have to use the
second solution.
I tried the first solution for a simple case previously but never made
it work. Just to know in case I need it later : How can I retrieve the
information the user has typed in my custom UI for one parameter? It's
not clear to me and every things I tried have failed.

Thanks again for your patience.

Cyrille

> --
> Raphaêl Luta - raphael@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: ParameterPresentationStyle - REPOST

Posted by Raphaël Luta <ra...@aptiwan.com>.
Cyrille GACHOT wrote:
> Le jeu 29/07/2004 à 10:39, Raphaël Luta a écrit :
> 
>>Cyrille GACHOT wrote:
>>
>>>Le mer 28/07/2004 à 11:47, Holger Dewes a écrit :
>>>
>>>>>-----Original Message-----
>>>>>From: Cyrille GACHOT [mailto:cyrille.gachot@cotranet.com] 
>>>>>Sent: Wednesday, July 28, 2004 1:04 PM
>>>>>To: Jetspeed User List
>>>>>Subject: RE: ParameterPresentationStyle - REPOST
>>>>>
>>>>>Thanks, I'm going to take a look at that. btw, is it possible 
>>>>>to define my own Customizer only for one portlet and not for 
>>>>>every one?
>>>>
>>>>IIRC a portlet can take care of its customization by itself, by setting
>>>>the provides.customization parameter to true. In that case,
>>>>buildConfigureContext() will be called. But in that case, the portlet
>>>>has to take care of the customization all by itself, even for skin,
>>>>title etc.
>>>>
>>>
>>>Well, this is not really what i want; it's too complicated.
>>>In fact, what I really want (in a first time) is to obtain something
>>>similar to the WeatherPortlet but with JSP, and not Velocity.
>>>The weather portlet has a parameter "Weather Location" that has several
>>>fields, and uses onChange="param1.value=this.value" to save the new
>>>values . But i can't apply the same method in my JSP.
>>>Any thoughts?
>>>
>>
>>Now you've got me really confused about what you want to do !
>>
>>Are you trying to :
>>- create new PresentationStyles with the default customizer
>>   (Velocity based) to customize your portlets ?
>>- use the PresentationStyles with your own JSP based
>>   default customizer ?
>>- build a JSP portlet-specific customizer ?
>>
> 
> Hi,
> 
> In fact, I don't precisely know how to do what I want to obtain, and
> that was the goal of my question. I'm sorry if I can't explain myself
> clearly.
> What I want is to obtain something similar to the WeatherPortlet, but
> with JSP. 
> In weatherPortlet, there is a parameter (Weather Location) in the
> customization part that contain several fields (City, Country, ...).
> What I want is something similar (much more complicated in fact), by the
> simplest way.
> I use a JSP template for my parameter, and I don't know where and how to
> retrieve the information the user will type in the fields.
> 
> I hope this is clear enough...
> 
> Thanks to try helping me, I'm really lost with this part.
> 

Let's see: WeatherPortlet uses the default customizer that does not implement
any complex server-side validation of input.
If you're comfortable with this limitation, you can use the 
JSPParamaterPresentationStyle inyour portlet xreg to have the customizer
import your JSP templates to provide custom UI for a specific parameter.

If you have more complex server-side validation needs you'll need to
define your own customier code:
- define a CustomizerJSP portlet (it seems that we never created it in the
   default Jetspeed build, it should be there). Simply copy the
   CustomizerVelocity to CustomizerJSP and change its base class to JSPPortlet
   instead of VelocityPortlet.
- define your portlet in the registry to a have CustomizerJSP as parent
   instead of JSP.
- now whenever you click customize on this portlet, the method 
buildCustomizeContent() is called on your portlet action so that you do whatever 
you need to prepare for cxustomization. Then set the template to use for
customization with setTemplate().
- set an action in the tempate to a custom customization action that'll handle
   all the server-side validation, you can use the default customizer action
   as a template for your action 
(org.apache.jetspeed.modules.actions.CustomizeAction)


Actually, looking at the code there, there's probably an opportunity for us to 
improve reuse of this code... I'll do some updates this week-end.

--
Raphaêl Luta - raphael@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org