cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to change values of custom properties

jacqueswvdh
Champ in-the-making
Champ in-the-making
I want to change the values of properties of a node through a form.
If I try and change the node.properties.name it works:
in the .js file:
   sellOfferNode1.properties.name = args.name;
   model.message +="<br />name changed to: " + sellOfferNode1.properties.name;
   sellOfferNode1.save();
   model.sellOfferNode= sellOfferNode1;

In the .ftl file:
   message = ${message}<br />
   Naam onderneming<sup>*</sup>:
   <input type="text" name="name" value='${sellOfferNode.properties.name}' />

If I try to change any custom property, added in then description.xml (e.g. change to
   sellOfferNode1.properties.country and
   ${sellOfferNode.properties["mn:country"]})
it failes. I cannot understand why.

Help will be greatly appreciated.
Jacques
2 REPLIES 2

jacqueswvdh
Champ in-the-making
Champ in-the-making
In the javascript bit:
sellOfferNode1.properties.country
should be changed to:
   sellOfferNode1.properties["mn:country"]
and it works.

kevinr
Star Contributor
Star Contributor
That is correct, you always need to specify the namespace if the property is not a default "cm" alfresco model property.

Thanks,

Kevin