Package javax.faces.context

Examples of javax.faces.context.ResponseWriter.writeText()


 
  public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException {
        ResponseWriter responseWriter = facesContext.getResponseWriter();
        String value = getValueAsString(facesContext,(UIOutput) component);
        if(value != null){
          responseWriter.writeText(value,"value")
        }   
        responseWriter.endElement("description")
 
}
View Full Code Here


    else
      out.writeAttribute("style", _style, null);

    out.writeAttribute("href", contextPath + "/caucho.jsf.developer.aid", null);

    out.writeText("JSF Dev Aid", null);

    out.endElement("a");
  }

  public void encodeChildren(FacesContext context)
View Full Code Here

        }
        responseWriter.startElement(SCRIPT, null);
        responseWriter.writeAttribute(TYPE, TEXT_JAVASCRIPT, null);
        for (Object script : scripts) {
            ScriptUtils.writeToStream(responseWriter, script);
            responseWriter.writeText("\n", null);
        }
        if (!pageReadyScripts.isEmpty()) {
            responseWriter.writeText("RichFaces.jQuery(document).ready(function() {\n", null);
            for (Object script : pageReadyScripts) {
                ScriptUtils.writeToStream(responseWriter, script);
View Full Code Here

        for (Object script : scripts) {
            ScriptUtils.writeToStream(responseWriter, script);
            responseWriter.writeText("\n", null);
        }
        if (!pageReadyScripts.isEmpty()) {
            responseWriter.writeText("RichFaces.jQuery(document).ready(function() {\n", null);
            for (Object script : pageReadyScripts) {
                ScriptUtils.writeToStream(responseWriter, script);
                responseWriter.writeText("\n", null);
            }
            responseWriter.writeText("});\n", null);
View Full Code Here

        }
        if (!pageReadyScripts.isEmpty()) {
            responseWriter.writeText("RichFaces.jQuery(document).ready(function() {\n", null);
            for (Object script : pageReadyScripts) {
                ScriptUtils.writeToStream(responseWriter, script);
                responseWriter.writeText("\n", null);
            }
            responseWriter.writeText("});\n", null);
        }
        responseWriter.endElement(SCRIPT);
    }
View Full Code Here

            responseWriter.writeText("RichFaces.jQuery(document).ready(function() {\n", null);
            for (Object script : pageReadyScripts) {
                ScriptUtils.writeToStream(responseWriter, script);
                responseWriter.writeText("\n", null);
            }
            responseWriter.writeText("});\n", null);
        }
        responseWriter.endElement(SCRIPT);
    }
}
View Full Code Here

            ResponseWriter writer = facesContext.getResponseWriter();
            writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
            writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/javascript", null);
            JSObject script = new JSObject("RichFaces.ui.Autocomplete.setData", component.getClientId(facesContext) + "Items",
                fetchValues);
            writer.writeText(script, null);
            writer.endElement(HtmlConstants.SCRIPT_ELEM);
        }
    }

    public void encodeItem(FacesContext facesContext, AbstractAutocomplete comboBox, Object item,
View Full Code Here

            strategy.encodeItem(facesContext, comboBox);
        } else {
            if (item != null) {
                strategy.encodeItemBegin(facesContext, comboBox);
                writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-au-itm rf-au-opt rf-au-fnt rf-au-inp", null);
                writer.writeText(item, null);
                strategy.encodeItemEnd(facesContext, comboBox);
            }
        }
    }
View Full Code Here

            if (facet != null && facet.isRendered()) {
                facet.encodeAll(context);
            } else {
                Object noDataLabel = table.getAttributes().get("noDataLabel");
                if (noDataLabel != null) {
                    writer.writeText(noDataLabel, "noDataLabel");
                }
            }
            writer.endElement(HtmlConstants.DIV_ELEM);
        } else {
            table.getAttributes().put("clientFirst", 0);
View Full Code Here

            ResponseWriter responseWriter = facesContext.getResponseWriter();

            responseWriter.startElement(HTML.SCRIPT_ELEM, component);
            responseWriter.writeAttribute(HTML.TYPE_ATTR, "text/javascript", null);
            responseWriter.writeText("var " + AJAX_SUBMIT + " = function(data, options) {" + ajaxFunction.toScript()
                    + "};", null);
            responseWriter.endElement(HTML.SCRIPT_ELEM);
        }
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.