See responses below.


From: "kylin" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Jeremy Ford <[EMAIL PROTECTED]>
Subject: Re: Re: RE: question about skin define
Date: Fri, 11 Jul 2003 21:9:33 +0800

Jeremy Ford,

1.      yes,i am not modify PortletSkin ,instead of define MyPortletSkin
and BaseMyPortletSkin ,MySkinUpdateAction.
i add many set and get method in it.
also i create myskinbrowser.vm and myskinform.vm too
(i register the Action in admin.xreg,MyPortletSkin and BaseMyPortletSkin
 should be regiest?)
but i did know when the get and set method is used?


Are you saying that you are replacing the Jetspeed skin implementation with your own instead of modifying it?


If so, you will need to modify the registry.xml (castor mapping file) file and replace the default Jetspeed skin class with your own.


2. $!entry.getParameter("MYPARAMETER").value if i use it in .vm ,it may be send exception. because $entry.getParameter("MYPARAMETER") may be null so getValue() will throw exception (i think but not try yet.)


I do not believe that you would see any exceptions because the parameter is null. Velocity will not attempt to process the line furthur and you will not see any data displayed as long as you use $! at the beginning.


3.i see there are $entry.Name ,if i want use $entry.Myparameter,
  get parameter ,i must rewrite BaseSkinEntry, is right?
  (surly i will provide getMyparameter() method in it)


There are 2 issues here.


1) Modifying Jetspeed to allow another parameter to be added to the skin registry. All this involves is modifying the skin-form.vm and adding another parameter to the form. The SkinUpdateAction will handle the new parameter automatically.

2) Modifying the PortletSkin (which is used during the display of the PSML) to know about your field. The BasePortletSkin extends the HashMap. In the JetspeedPortalToolkitService, there is a method getSkin(). This method takes a skin registy entry and creates a PortletSkin from it. It does this by copying all of the parameters from the skin registry entry into the PortletSkin. So, the portlet skin has your field in it now. You do not, however, have a method to access it. If you wish to provide one, that is fine. But, you could also just use the get method to retrieve it.

thinks

regard
kylin




_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to