You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Tomba Rakesh <to...@yahoo.com> on 2005/09/14 15:14:00 UTC
Portlet Preference. HELP!
Hi All
I have following three points
1. I have define portlet preference in portlet.xml as below:
<portlet-preferences>
<preference>
<name>myValue</name>
<value>10</value>
</preference>
</portlet-preferences>
2. Assuming that there is no "myValue" preference key set in the database (jetspeed database "Hypersonic DB").
3. Enclose Portlet code:
PortletPreferences pref = request.getPreferences( );
String strValue = pref.getValue( "myValue", "" );
So default value of "strValue" should always be "10". This is 100% corect.
But sometimes "strValue" is giving empty string "" value [as specified in pref.getValue( "myValue", "" )]. This is happen when I change the jetspeed database.
How pref.getValue(str,str) is implemented? Even though changing jetspeed database, default value of "strValue" should always be "10".
Kindly help in this regard.....
Regards
Rakesh
---------------------------------
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.