Commit a9db2f2c by everdarkgreen

JsonNode: (draft14) adding headers to empty card

parent 6ebd14df
......@@ -115,8 +115,6 @@ public class Main implements MessageListener {
// Configure ObjectMapper
OBJECT_MAPPER.configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
constructTableHeader();
// SOURCE FORM: Получение данных исходной формы (той, по которой запущен маршрут)
URL sourceFormURL = new URL(SYNERGY_ADDRESS + "/rest/api/asforms/data/" + SOURCE_FORM_DATA_UUID);
String sourceFormDataAsString = synergyApiGetString(sourceFormURL);
......@@ -287,6 +285,20 @@ public class Main implements MessageListener {
tableDataNodesList.add(n5);
tableDataNodesList.add(n6);
tableDataNodesList.add(n7);
} else {
// get root data node, it is our target
AsNode rootDataNode = findNode(targetFormData, "data");
// construct new "table" node
AsNode newDataNode = new AsNode();
List<AsNode> header = constructTableHeader();
// pushing fields to new node
newDataNode.setId("table");
newDataNode.setType("appendable_table");
newDataNode.setKey("");
newDataNode.setData(header);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment