cancel
Showing results for 
Search instead for 
Did you mean: 

Change aspect value

ndk
Champ in-the-making
Champ in-the-making
I've created a dashboard so the user can approve/reject documents.
The file is in Alfresco/web scripts extensions and is a .html.ftl

I want to put an image link on my dashboard, and when they click on it, i want to change the value of an aspect of my document.

the aspect i want to change is a boolean (true / false)

the code i wanted to use, or something like that:
function changeToEU(id){
if(id != 0){
id.properties["missionEuro"] = true; // <- is this possible, or what is the code that i need?
}
}

<a href="#" onclick="javascript:changeToEU('${c.id}');"><img src="${url.context}/images/icons/europe-non.png" border="0"></a>

c.id is the id of my document.
The aspect i want to change is missionEuro.

How can i change the aspect?
2 REPLIES 2

ndk
Champ in-the-making
Champ in-the-making
is my question clear or not?
(because i didn't received a reply yet…)

damiar
Champ in-the-making
Champ in-the-making
I think you have missed a couple of things here…

First, the way you have to use to change an aspect depends on how it is declared. So, I cannot tell you if your code is wrong or not, because you didn't mention that.
Second, you cannot change an aspect of your document in that way. You will have to make an ajax request to another webscript. This second webscript should receive as arguments the id of the document and the aspect that you want to change (and of course the value).

I'm not sure if I was clear, but hope it helps.