Mansour Al Akeel wrote:
When do I need to use <portlet-preference> and when to use <init-param> to initialize a portlet?

PortletPreferences and Portlet initParameters have a completely different scope 
and usage.

Init parameters are used by the portlet *instance* for configuration of the general/overall behavior of the portlet for all users. PortletPreferences are *user* scoped parameters, e.g. each user (potentially) can have (and optionally maintain) its own values. In the portlet.xml you define *default* values for PortletPreferences.
PortletPreferences which are readonly however will be similar to init 
parameters in that regard, but might be (runtime)
modified by an administrator (like through the j2-admin portlets).
In any case portlet init parameters are never modifiable and are intended to be used from the Portlet.init() method primarily.

In addition to this, Jetspeed also allows you to define (PSML) fragment based PortletPreferences to provide PortletWindow specific (overrides of) preferences defined in the portlet.xml. These too serve as default values (overlaying thosse in portlet.xml) which can be edited/modified with the custom Jetspeed "edit_defaults" PortletMode.
See also: 
http://portals.apache.org/jetspeed-2/guides/guide-psml.html#Preferences

Regards,

Ate


I couldn't find any documentation about the parameters that I need to pass when initializing a portlet or a description of what each of them would do. On the other hand, there's many portlet classes that are useful but they are scattered in different jars (ie, FilePortlet, WebContentPortlet, HTMLPortlet, IFramePortlet ...etc, these are only for static contents). It would be nice if there's a list of all the portlets that come with JS2 with the jar that I need to include to access them.




---------------------------------------------------------------------
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]

Reply via email to