* channel definition to determine the original value and restore it
* or discover that this is an ad-hoc parameter and can be removed.
*/
try
{
IPortletDefinitionRegistry registry = PortletDefinitionRegistryLocator.getPortletDefinitionRegistry();
int pubId = Integer.parseInt(getChannelPublishId());
IPortletDefinition def = registry.getPortletDefinition(getChannelPublishId());
IPortletDefinitionParameter parm = def.getParameter(parameterName);
if (parm == null) // ad-hoc parm so delete
{
parameters.remove(parameterName);