{
List<RPProperty> nListConnectionRPP = anagraficaObject
.getAnagrafica4view().get(
shortName);
RPProperty nConnectionRPP = null;
if (nListConnectionRPP != null && nListConnectionRPP.size() > 0)
{
List<RPProperty> toRemove = new LinkedList<RPProperty>();
for (RPProperty p : nListConnectionRPP)
{
toRemove.add(p);
}
for(RPProperty to : toRemove) {
anagraficaObject.removeProprieta(to);
}
// nConnectionRPP = nListConnectionRPP.get(0);
}
// else
// {
nConnectionRPP = anagraficaObject
.createProprieta(applicationService
.findPropertiesDefinitionByShortName(
RPPropertiesDefinition.class,
shortName));
// }
TextValue nConnectionValue = new TextValue();
nConnectionValue.setOggetto(value);
nConnectionRPP.setValue(nConnectionValue);
nConnectionRPP.setVisibility(VisibilityConstants.PUBLIC);
}