[jboss-user] [JBoss Portal] - Re: Packaging of portlet-instances.xml
legolas
do-not-reply at jboss.com
Fri Feb 9 06:44:52 EST 2007
I have implemented it as follows:
ValueMap preferences = instance.getPreferences();
| while (iterator.hasNext())
| {
| Element preference = (Element) iterator.next();
| String name = preference.valueOf(PREFERENCE_NAME);
| Value originalValue = preferences.getValue(name);
| if (null != originalValue)
| {
| Class<Value> valueClass = getValueClass(originalValue);
| Value value = createValue(preference, valueClass);
| preferences.setValue(name, value);
| }
| }
| instance.setPreferences(preferences);
|
This prohibits adding undefined preferences, only predefined prefs can now be overridden, and its type is taken over from the original type.
But according to you, this could be simplified to using strings only.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013578#4013578
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013578
More information about the jboss-user
mailing list