}
private void setProps(ModelNode requestProperties) throws Exception {
props = new TreeSet<RequestProp>();
if (opName.equals("add")) {
UserObject usrObj = (UserObject)node.getUserObject();
props.add(new RequestProp("/" + usrObj.getName() + "=<name>/", "Resource name for the new " + usrObj.getName(), true, ModelType.STRING));
}
if (opName.equals("write-attribute") && node.isLeaf()) {
ModelNode nameNode = requestProperties.get("name");
nameNode.get("type").set(ModelType.UNDEFINED); // undefined type will display as uneditable String
UserObject usrObj = (UserObject)node.getUserObject();
ModelNode nameNodeValue = new ModelNode();
nameNodeValue.set(usrObj.getName());
props.add(new RequestProp("name", requestProperties.get("name"), nameNodeValue));
ModelNode rscDesc = cliGuiCtx.getExecutor().doCommand(node.addressPath() + ":read-resource-description");
ModelNode valueNode = rscDesc.get("result", "attributes", usrObj.getName());
valueNode.get("required").set(false); // value is never required for write-attribute
ModelNode valueNodeValue = usrObj.getBackingNode().get(usrObj.getName());
props.add(new RequestProp("value", valueNode, valueNodeValue));
return;
}
for (Property prop : requestProperties.asPropertyList()) {