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:[EMAIL PROTECTED] > >>>>>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 - [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]