public void redraw(Writer out) throws IOException { if (_inRedraw) { //if callback, invoke super super.redraw(out); } else { _inRedraw = true; try { draw(out); } finally { _inRedraw = false; } } } /** A draw implementation for {@link #redraw} to encapsulate
public void redraw(Writer out) throws IOException { final Execution exec = Executions.getCurrent(); if (!HtmlPageRenders.isDirectContent(exec)) { super.redraw(out); return; } final boolean idRequired = isIdRequired(); if (idRequired) { out.write("<span id=\""); out.write(getUuid()); out.write("\">"); } out.write(_encode ? XMLs.encodeText(_value) : _value); if (idRequired) out.write("</span>"); final TagRenderContext rc = PageRenderer.getTagRenderContext(exec); if (rc != null) { rc.renderBegin(this, getClientEvents(), getSpecialRendererOutput(this), false); rc.renderEnd(this); } }
|| (exec != null && "complete".equals(ExecutionsCtrl.getPageRedrawControl(exec)))); if (exec == null || exec.isAsyncUpdate(null) || (!root && !HtmlPageRenders.isDirectContent(exec))) { super.redraw(out); //renderProperties (assume in zscript) return;
public void redraw(java.io.Writer out) throws java.io.IOException { if (_tagnm == null) throw new UiException("The tag name is not initialized yet"); final Execution exec = Executions.getCurrent(); if (exec == null || exec.isAsyncUpdate(null) || !HtmlPageRenders.isDirectContent(exec)) { super.redraw(out); // generate JavaScript return; } TagRenderContext rc = PageRenderer.getTagRenderContext(exec); final boolean rcRequired = rc == null; Object ret = null; if (rcRequired) { ret = PageRenderer.beforeRenderTag(exec); rc = PageRenderer.getTagRenderContext(exec); } out.write(getPrologHalf(false)); rc.renderBegin(this, getClientEvents(), getSpecialRendererOutput(this), false); redrawChildrenDirectly(rc, exec, out); out.write(getEpilogHalf()); rc.renderEnd(this); if (rcRequired) { out.write(rc.complete()); PageRenderer.afterRenderTag(exec, ret); } }