def = PortletApplicationUtils.getPortletOrClone(app, paNodeBean.getName());
}
if (newName != null && newValue != null && newLocale != null)
{
GenericMetadata metadata = (def == null ? app.getMetadata() : def.getMetadata());
LocalizedFieldBean fieldBean = new LocalizedFieldBean(metadata.createLocalizedField());
fieldBean.setName(newName);
fieldBean.setLocaleString(newLocale);
fieldBean.setValue(newValue);
metadata.addField(fieldBean.getLocalizedField());
newName = null;
newValue = null;
newLocale = null;
}