AnsweredAssumed Answered

Adding aspects to cm:person nodes?

Question asked by risenhoover on Feb 4, 2009
Does anybody know if we can add aspects to person nodes?  I'm executing this code in a Javascript web script and it *says* it's adding the aspect but when I look in the node repository at the user node, it's not there.


model.user_info = person.properties["d3:user_info"];
if ( model.user_info == null ) {
  model.user_info = new Array();
  model.user_info["d3:title"] = "";
  model.user_info["d3:telephone"] = "";

  //model.title = "Spaceman";
  model.title = "";
  model.telephone = "";

  if ( person.addAspect("{d3.model}user_info", model.user_info)) {
    logger.log("Added aspect 'd3:user_info' to person" );
    person.save();
  }
}

else {
  model.title = model.user_info["d3:title"];
  model.telephone = model.user_info["d3:telephone"];
}

Outcomes