}
}
protected final void doAddPref(ActionRequest request, ActionResponse response) throws PortletException
{
PortletEntity entity = getPortletEntity(request);
String newName = request.getParameter("newPreferenceName");
if(newName == null || newName.length() < 1)
{
throw new PortletException("You must specify a name for a new preference.");
}
String[] newValues = request.getParameterValues("newPreferenceValue");
if(newValues == null || newValues.length == 0)
{
throw new PortletException("You must specfiy a value for the new preference "+newName);
}
PreferenceSetComposite prefSet = (PreferenceSetComposite) entity.getPreferenceSet();
prefSet.add(newName, Arrays.asList(newValues));
try
{
entityAccess.storePortletEntity(entity);
}