use of com.serotonin.m2m2.gviews.component.ScriptComponent in project ma-modules-public by infiniteautomation.
the class GraphicalViewDwr method saveScriptComponent.
@DwrPermission(user = true)
public ProcessResult saveScriptComponent(String viewComponentId, String script) {
ProcessResult response = new ProcessResult();
// Validate
if (StringUtils.isBlank(script))
response.addContextualMessage("graphicRendererScriptScript", "viewEdit.graphic.missingScript");
if (!response.getHasMessages()) {
ScriptComponent c = (ScriptComponent) getViewComponent(viewComponentId);
c.setScript(script);
resetPointComponent(c);
}
return response;
}
Aggregations