public boolean isInline() { return _compDef.isInlineMacro(); }
/*package*/ void doCatch (Throwable throwable) throws JspException{ if(!_compDef.isInlineMacro()){ if(!_composeHandle.doCatch(throwable)){ throw new JspException(throwable); } }else{// is inlineMacro, throw exception anyway... throw new JspException(throwable); } }
public boolean isInline() { return getDefinition().isInlineMacro(); }
/*package*/ void doFinally () throws JspException{ if(!_compDef.isInlineMacro()) _composeHandle.doFinally(); }
/*package */ void afterComposeComponent() throws JspException{ if(_compDef.isInlineMacro()){// the comps are already initialized by ZK. if ( _comps==null) throw new JspTagException("newComponent() returns null"); _parenttag.addChildTag(this); } else super.afterComposeComponent(); }
private static Component[] execCreateChild(CreateInfo ci, Component parent, ComponentInfo childInfo, ReplaceableText replaceableText, Component insertBefore) { final ComponentDefinition childdef = childInfo.getComponentDefinition(); if (childdef.isInlineMacro()) { if (insertBefore != null) throw new UnsupportedOperationException("The inline macro doesn't support template"); final Map<String, Object> props = new HashMap<String, Object>(); props.put("includer", parent); childInfo.evalProperties(props, ci.page, parent, true); return new Component[] { ci.exec.createComponents(childdef.getMacroURI(), parent, props) }; } else { String rt = null; if (replaceableText != null) { // ZK-3549 should ignore blank but was not able to do so in Parser, e.g. applying template if (parent == null || parent.getDefinition().isBlankPreserved()) { rt = replaceableText.text; } replaceableText.text = childInfo.getReplaceableText(); if (replaceableText.text != null) return new Component[0]; //Note: replaceableText is one-shot only //So, replaceable text might not be generated //and it is ok since it is only blank string } Component child = execCreateChild0(ci, parent, childInfo, rt, insertBefore); return child != null ? new Component[] { child } : new Component[0]; } }
if (_compDef.isInlineMacro()) {// the tag holds multiple components. final Map props = new HashMap(); Component parent = this._parenttag.getComponent(); else _roottag.addChildTag(this); if(!_compDef.isInlineMacro())// apply attributes to component... evaluateDynaAttributes(_comp, _attrMap);