Commit fe055761 authored by Boris Kocherov's avatar Boris Kocherov

demo: getContent on every render

parent 81467967
......@@ -155,14 +155,21 @@
var g = this;
return g.getDeclaredGadget("form_view")
.push(function (form_view) {
if (g.state.json_document) {
document.getElementById("json_document_content").textContent =
JSON.stringify(g.state.json_document, null, " ");
}
return form_view.render({
value: g.state.json_document,
schema_url: g.state.schema_url
});
})
.push(function () {
return form_view.getContent();
})
.push(function (ret) {
if (ret === undefined) {
ret = {};
}
g.state.json_document = ret;
document.getElementById("json_document_content").textContent =
JSON.stringify(ret, null, " ");
});
});
});
......
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