It underlines the nodeRef variable and says nodeRef cannot be resolved to a variable… I tried searching but can't find what is the problem?
This is the EnableWebFlag.java class
import company.model.myModel;
import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.cmr.repository.NodeService;
public class EnableWebFlag extends SetActiveFlag {
protected NodeService nodeService;
@Override
protected void executeImpl(Action action, NodeRef actionedUponNodeRef) {
action.setParameterValue(SetEnableFlag.PARAM_ACTIVE, true);
QName MY_ISACTIVE = QName.createQName(myModel.NAMESPACE_COMPANY_ACTIVE_CONTENT_MODEL, "isActive");
//pass on the nodeRef being act upon, the qname of your custom property and the value you want to set.
nodeService.setProperty(nodeRef, MY_ISACTIVE, true);
super.executeImpl(action, actionedUponNodeRef);
}
}