Skip to main content

render_subtree

Function render_subtree 

Source
pub fn render_subtree(target_id: &str, spec: &Spec, data: &Value) -> String
Expand description

Render only the subtree rooted at target_id.

  • If target_id == "ferro-json-ui" (the well-known nav target): renders spec.root and wraps it in the standard <div id="ferro-json-ui" …> shell.
  • Otherwise: looks up target_id in spec.elements and renders that element. If the element is not found, returns an HTML comment.

Used by the framework fragment response path when X-FJUI-Target is present.