@Override public void writeResource(Reader reader, ResponseWriter writer) throws IOException { CharBuffer buffer = CharBuffer.allocate(BUFFER_SIZE); while (reader.read(buffer) != -1) { buffer.flip(); writer.append(buffer); buffer.clear(); } }
@Override public void writeResource(Reader reader, ResponseWriter writer) throws IOException { CharBuffer buffer = CharBuffer.allocate(BUFFER_SIZE); while (reader.read(buffer) != -1) { buffer.flip(); writer.append(buffer); buffer.clear(); } }
@Override public void encodeBegin(FacesContext context, UIComponent component) throws IOException { ResponseWriter rw = context.getResponseWriter(); String clientId = component.getClientId(); super.encodeBegin(context, component); clientId = clientId.replace(":", "\\\\:"); rw.append("<script>"); rw.append("$('#input_" + clientId + "').bootstrapSwitch();"); rw.append("</script>"); }
@Override public Writer append(CharSequence csq, int start, int end) throws IOException { if (isDoubleBufferEnabled()) { _cdataDoubleBufferWriter.append(csq, start, end); return this; } else { return super.append(csq, start, end); } }
@Override public Writer append(CharSequence csq, int start, int end) throws IOException { if (isDoubleBufferEnabled()) { _cdataDoubleBufferWriter.append(csq, start, end); return this; } else { return super.append(csq, start, end); } }
@Override public Writer append(CharSequence csq) throws IOException { if (isDoubleBufferEnabled()) { _cdataDoubleBufferWriter.append(csq); return this; } else { return super.append(csq); } }
@Override public Writer append(char c) throws IOException { if (isDoubleBufferEnabled()) { _cdataDoubleBufferWriter.append(c); return this; } else { return super.append(c); } }
@Override public Writer append(char c) throws IOException { if (isDoubleBufferEnabled()) { _cdataDoubleBufferWriter.append(c); return this; } else { return super.append(c); } }
@Override public Writer append(CharSequence csq, int start, int end) throws IOException { if (isDoubleBufferEnabled()) { _cdataDoubleBufferWriter.append(csq, start, end); return this; } else { return super.append(csq, start, end); } }
private void encodeSubtitleElement(String bundle, String acronym, String full, StringBuilder explanation) throws IOException { writer.startElement("li", this); writer.startElement("span", this); writer.writeAttribute("style", "color: #888", null); writer.append(BundleUtil.getString(bundle, acronym)).append(" - "); writer.endElement("span"); writer.append(BundleUtil.getString(bundle, full)); if (explanation != null) { writer.append(explanation); } writer.endElement("li"); }
private void encodeOrderOption(Integer posToTest, String label, boolean lastOption) throws IOException { encodeLink(module + "/orderCourseGroup.faces", "&courseGroupID=" + this.courseGroup.getExternalId() + "&contextID=" + this.previousContext.getExternalId() + "&pos=" + posToTest + "&toOrder=true", false, label); if (!lastOption) { writer.append(" , "); } }
private void encodeContext(CurricularPeriod curricularPeriod) throws IOException { writer.startElement("td", this); writer.writeAttribute("class", "smalltxt", null); if (!byYears) { writer.writeAttribute("align", "center", null); writer.append(CurricularPeriodLabelFormatter.getFullLabel(curricularPeriod, true)); } else { writer.append(previousContext.getParentCourseGroup().getName()); } writer.endElement("td"); }
public static void renderFunction(FacesContext context, UIComponent component, Collection<ClientBehaviorContext.Parameter> params, String submitTarget) throws IOException { ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(context, component, "action", submitTarget, params); AjaxBehavior behavior = (AjaxBehavior) context.getApplication().createBehavior(AjaxBehavior.BEHAVIOR_ID); mapAttributes(component, behavior, "execute", "render", "onerror", "onevent", "resetValues"); context.getResponseWriter().append(behavior.getScript(behaviorContext)); }
public static void renderFunction(FacesContext context, UIComponent component, Collection<ClientBehaviorContext.Parameter> params, String submitTarget) throws IOException { ClientBehaviorContext behaviorContext = ClientBehaviorContext.createClientBehaviorContext(context, component, "action", submitTarget, params); AjaxBehavior behavior = (AjaxBehavior) context.getApplication().createBehavior(AjaxBehavior.BEHAVIOR_ID); mapAttributes(component, behavior, "execute", "render", "onerror", "onevent", "resetValues"); context.getResponseWriter().append(behavior.getScript(behaviorContext)); }
private void encodeOrderOptions() throws IOException { writer.startElement("td", this); if (loggedPersonCanManageDegreeCurricularPlans()) { writer.append("("); encodeOrderOption(0, "top", false); encodeOrderOption(this.previousContext.getParentCourseGroup().getChildContextsSet().size() - 1, "end", false); encodeOrderOption(this.previousContext.getChildOrder() - 1, "up", false); encodeOrderOption(this.previousContext.getChildOrder() + 1, "down", true); writer.append(") "); } }
public void encodeDefaultCaption(FacesContext context, UIComponent component, String caption) throws IOException { encodeBegin(context, component); ResponseWriter rw = context.getResponseWriter(); rw.startElement("h3", component); rw.append(caption); rw.endElement("h3"); encodeEnd(context, component); }
public void encodeDefaultCaption(FacesContext context, UIComponent component, String caption) throws IOException { encodeBegin(context, component); ResponseWriter rw = context.getResponseWriter(); rw.startElement("h3", component); rw.append(caption); rw.endElement("h3"); encodeEnd(context, component); }
private void encodeHeader(CurricularPeriod curricularPeriod) throws IOException { writer.startElement("tr", this); writer.writeAttribute("class", "bgcolor2", null); writer.startElement("th", this); writer.writeAttribute("class", "aleft", null); writer.writeAttribute("colspan", (this.toEdit) ? 3 : 5, null); writer.append(curricularPeriod.getFullLabel()); writer.endElement("th"); if (this.toEdit) { encodeCourseGroupOptions(curricularPeriod); } writer.endElement("tr"); }
private void encodeInfoTable(String info) throws IOException { writer.startElement("table", this); writer.startElement("tr", this); writer.startElement("td", this); writer.writeAttribute("align", "center", null); writer.startElement("i", this); writer.append(BundleUtil.getString(Bundle.BOLONHA, info)); writer.endElement("i"); writer.endElement("td"); writer.endElement("tr"); writer.endElement("table"); }