By the way, here's a link for the source of PickANumber example:

http://svn.apache.org/repos/asf/portals/applications/demo/trunk/src/main/java/org/apache/portals/applications/demo/simple/PickANumberPortlet.java

Woonsan



----- Original Message ----
> From: Woonsan Ko <[email protected]>
> To: Jetspeed Users List <[email protected]>
> Sent: Thu, January 21, 2010 7:15:09 PM
> Subject: Re: Storing Portlet Fragment Preference
> 
> Hi,
> 
> Please see comments below.
> 
> 
> 
> 
> ----- Original Message ----
> > From: chocba 
> > To: [email protected]
> > Sent: Thu, January 21, 2010 5:43:53 PM
> > Subject: Storing Portlet Fragment Preference
> > 
> > 
> > Hi,
> > I've a requirement to store fragment preference in portlet edit mode. 
> 
> Jetspeed supports "edit_defaults" mode. I think you can make use of this.
> 
> You can implement "edit_defaults" mode in your portlet manually.
> Please have a look at the PickANumber example. (It dispatches the 
> edit_defaults 
> mode in doDispatch() method.)
> If portlet preferences are stored during edit_defaults mode, then they are 
> stored into fragment preferences.
> 
> Or, optionally, if your portlet implements "public doEdit(..)" method, then 
> you 
> can make Jetspeed automatically switch the "edit_defaults" custom mode to 
> your 
> edit mode page, with storing the preferences into fragment preferences. (If a 
> portlet defines the support on "edit_defaults", then it means the portlet 
> will 
> process for the edit_defaults mode manullay. So, auto-switching will not 
> happen 
> in this case. If a portlet defines the support "edit" mode with "public void 
> doEdit(..)" method, but without explicit "edit_defaults" support in 
> portlet.xml, 
> then the auto-switching option can happen for the portlet.)
> 
> To use *edit_defaults* mode, you need to do the followings:
> 
> (1) Enable the custom mode, *edit_defaults*, in your portlet application by 
> adding the following in portlet.xml:
> 
>     
>       
>       
>         a Custom Edit_defaults Mode
>         edit_defaults
>       
>       
>     
> 
> (2) If you want manual edit_defaults mode implementation, then add 
> *edit_defaults" support in your portlet like this.
>      If you want auto-switching mode, then just keep "edit" mode support 
> without 
> edit_defaults support.
> 
>       
>         
>         
>           
>           edit_defaults
>           
>         
>         
>     
> 
> (3) If you want to make Jetspeed switch edit_defaults mode to edit page 
> automatically, 
>      then enable automatic switching mode for edit_defaults to edit page.
> 
>     
> To do this, set the following property to true in 
> /jetspeed/WEB-INF/conf/jetspeed.properties:
> 
>      # switch edit_defaults mode to edit mode automatically for portlets not 
> supporting edit_defaults mode
>      supported.portletmode.autoswitch.edit_defaults=true
> 
> You can see "edit_defaults" action icon in the portlet window(s). Or you can 
> make portlet url with edit_defaults mode by portlet api as well.
> 
> Kind regards,
> 
> 
> Woonsan
> 
> > I noticed an implementation PortletPreferencesServiceImpl.java in jetspeed
> > source repository
> > 
> ../components\registry\src\java\org\apache\jetspeed\components\portletpreferences.
> > In this implementation I could read two methods "retrieveEntityPreferences"
> > and "storeEntityPreferences" which seems to store fragment preferences, but
> > not sure.  I appreciate if any one can confirm if this api can do the job
> > and also help me to identify the component and invoke this methods. Trying
> > to identify service for this api, I read bean definitions in
> > WEB-INF/assembly folder, but no luck.
> > 
> > 
> > 
> > 
> > -- 
> > View this message in context: 
> > 
> http://old.nabble.com/Storing-Portlet-Fragment-Preference-tp27260781p27260781.html
> > Sent from the Jetspeed - User mailing list archive at Nabble.com.
> > 
> > 
> > ---------------------------------------------------------------------
> > 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]



      

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to