provide the title of the page in the resulting JSON
This commit is contained in:
parent
8cdc7730cf
commit
1cdfb21bdd
@ -75,6 +75,15 @@ public class ElementCommand : InstanceCommand
|
|||||||
obj2.Add("widget", JsonValue.Create("root"));
|
obj2.Add("widget", JsonValue.Create("root"));
|
||||||
obj2.Add("body", widget.ToJSONObject(ctx));
|
obj2.Add("body", widget.ToJSONObject(ctx));
|
||||||
|
|
||||||
|
JsonObject objTitle = new JsonObject();
|
||||||
|
string label = oms.GetAttributeValue<string>(widget.ParentInstance, oms.GetInstance(KnownAttributeGuids.Text.Label));
|
||||||
|
if (label == null)
|
||||||
|
{
|
||||||
|
label = oms.GetInstanceText(widget.ParentInstance);
|
||||||
|
}
|
||||||
|
objTitle.Add("label", label);
|
||||||
|
obj2.Add("title", objTitle);
|
||||||
|
|
||||||
JsonObject obj = new JsonObject();
|
JsonObject obj = new JsonObject();
|
||||||
obj.Add("result", "success");
|
obj.Add("result", "success");
|
||||||
obj.Add("value", obj2);
|
obj.Add("value", obj2);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user