/** * Generates the output HTML of the element * * @param group String Template Group * @return Code */ @Override public ST generateTemplate(STGroup group) { ST template = group.createStringTemplate(group.rawGetTemplate(getTemplate())); List<ST> children = new ArrayList<>(); // Call generate method on all children if (this.getElementList() != null) { for (Element element : this.getElementList()) { // Generate the children children.add(element.generateTemplate(group)); } } // Generate template template.add("e", this).add("component", getComponentTag()).add("children", children); // Retrieve code return template; }