IntelliJ Java IDE
The moose likes Portals and Portlets and the fly likes regulate preferences Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Portals and Portlets
Reply Bookmark "regulate preferences" Watch "regulate preferences" New topic
Author

regulate preferences

Randy Daal
Greenhorn

Joined: Feb 19, 2007
Posts: 3
I would like to know how I could regulate the preferences in a JSR168,
so that there is a similar situation with the PortletData & PortletConfig
objects from theIBM API.

Because what I'm missing is a preference object by user (edit mode) like
in the IBM API.

At the moment this is solved by putting the userid in the preference
name, but I thought there had to be a better solution for this.

I hope I gave you a clear explanation and you (or someone you know)
could help me with this.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Randy Randy",
Welcome to the JavaRanch.

We're a friendly group, but we do require members to have valid display names.

Display names must be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names get deleted, often without warning

thanks,
Dave


[ JavaRanch FAQ ][ Book Promotions ][ DbTamer ][ BumperStickers ][ JavaRanch Badges ]
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper

Joined: Aug 26, 2006
Posts: 4962

PortletPreferences are pretty much the same as PortletData, with the exception of being able to use APPLICATION_SCOPE, which is actually a benefit.

This best practices guide provides a little bit of insight on when it is appropriate to use PortletPreferences in a JSR-168 portlet, and when it is not.

The Dangers of Using PortletPreferences: Best Practices for JSR-168 Portlet Development with JetSpeed2 and WebSphere Portal Server


What are you trying to do with PortletConfig? The PortletContext provides a portlet-application wide scope, which is kewl. If you really need a preference like that, you could just throw a Portlet ID into a database table, and store information the same way you would have with PortletConfig.

PortletConfig was overrated, and rarely used properly, from what I saw. Nobody really understood it (you and me exclueded, of course).

What is the goal you're tyring to achieve? Got a scenario? Maybe I could help you out more if you did.

Cheers!

-Cameron McKenzie
[ March 03, 2007: Message edited by: Cameron W. McKenzie ]

Author of Hibernate Made Easy, What is WebSphere???, JSF 2.0 Made Easy and the SCJA Certification Guides
Randy Daal
Greenhorn

Joined: Feb 19, 2007
Posts: 3
Thank you for your reaction,

I will try to give a clear scenario

The portlet i'm am building is going to be used by 300/400 people.
When they log on they all have a unique user id and they
al can manage there own portlet.

When the jsp is called the portlet has to know wich userpreferences it has to cal (links on the left or the right,large fonts small fonts etc.).
I now solved this by putting the user id in front of the preference (userid.preference).
But i just wanted to know if there was a better solution for this.

hope this clears things up a bit.
thanks already.
 
 
subject: regulate preferences
 
Threads others viewed
Preferences API
Is there any way to use JDK1.4PreferenceAPI in JWS + Applet clients
storing user preferences
approach value to 1
Preference Manager
IntelliJ Java IDE