Examples of writeURIAttribute()


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

            String path = resource.getRequestPath();
            if (additionalQueryParams != null)
            {
                path = path + ((path.indexOf('?') >= 0) ? "&" : "?") + additionalQueryParams;
            }
            writer.writeURIAttribute(HTML.SRC_ATTR, facesContext.getExternalContext().encodeResourceURL(path), null);
            writer.endElement(HTML.SCRIPT_ELEM);
        }
    }

}
View Full Code Here

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

            }
            href = facesContext.getExternalContext().encodeResourceURL(href);    //TODO: or encodeActionURL ?

            //write anchor
            writer.startElement(HTML.ANCHOR_ELEM, output);
            writer.writeURIAttribute(HTML.HREF_ATTR, href, null);
            if (output instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(
                    facesContext.getExternalContext()))
            {
                behaviors = ((ClientBehaviorHolder) output).getClientBehaviors();
                if (!behaviors.isEmpty())
View Full Code Here

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

        }
        else
        {
            //write anchor
            writer.startElement(HTML.ANCHOR_ELEM, output);
            writer.writeURIAttribute(HTML.HREF_ATTR, targetHref, null);
            if (output instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(
                    facesContext.getExternalContext()))
            {
                behaviors = ((ClientBehaviorHolder) output).getClientBehaviors();
                if (!behaviors.isEmpty())
View Full Code Here

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

        if (image != null)
        {
            // type="image"
            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_IMAGE, JSFAttr.TYPE_ATTR);
            String src = facesContext.getApplication().getViewHandler().getResourceURL(facesContext, image);
            writer.writeURIAttribute(HTML.SRC_ATTR, externalContext.encodeResourceURL(src), JSFAttr.IMAGE_ATTR);
        }
        else
        {
            // type="button"
            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_BUTTON, JSFAttr.TYPE_ATTR);
View Full Code Here

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

        String image = RendererUtils.getIconSrc(facesContext, uiComponent, JSFAttr.IMAGE_ATTR);
        if (image != null)
        {
            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_IMAGE,
                    org.apache.myfaces.shared.renderkit.JSFAttr.TYPE_ATTR);
            writer.writeURIAttribute(HTML.SRC_ATTR, image, org.apache.myfaces.shared.renderkit.JSFAttr.IMAGE_ATTR);
        }
        else
        {
            String type = getType(uiComponent);
View Full Code Here

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

        }

        final String url = RendererUtils.getIconSrc(facesContext, uiComponent, JSFAttr.URL_ATTR);
        if (url != null)
        {
            writer.writeURIAttribute(HTML.SRC_ATTR, url,JSFAttr.VALUE_ATTR);
        }
        else
        {
          if (facesContext.isProjectStage(ProjectStage.Development) && log.isLoggable(Level.WARNING))
          {
View Full Code Here

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

        writer.startElement("a", component);
        writeIdAndNameAttributes(context, writer, component);

        String hrefVal = getEncodedTargetURL(context, component, navCase);
        hrefVal += getFragment(component);
        writer.writeURIAttribute("href", hrefVal, "outcome");

        renderLinkCommonAttributes(writer, component);
        renderPassThruAttributes(context, writer, component, ATTRIBUTES, null);
        writeValue(writer, component);
View Full Code Here

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

    String image =  (String)uiComponent.getAttributes().get("image");
    if(image != null){
      image = context.getApplication().getViewHandler().getResourceURL(context,image);
      image = context.getExternalContext().encodeResourceURL(image);
      writer.writeAttribute("type","image","image");
      writer.writeURIAttribute("src",image,"image");
      Object value;
      if (null == uiComponent.getAttributes().get("alt") &&  null != (value = uiComponent.getAttributes().get("value")) ) {
        writer.writeAttribute("alt",value,"value");
      }
    } else {
View Full Code Here

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

        writer.startElement(HTML.SCRIPT_ELEM, component);
        writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR,HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT,null);

        if(baseDirectory != null)
        {
            writer.writeURIAttribute(HTML.SRC_ATTR,
                    getResourceBasePath(baseDirectory)+resourceFileName, null);
        }
        else
        {
            writer.writeURIAttribute(HTML.SRC_ATTR,
View Full Code Here

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

            writer.writeURIAttribute(HTML.SRC_ATTR,
                    getResourceBasePath(baseDirectory)+resourceFileName, null);
        }
        else
        {
            writer.writeURIAttribute(HTML.SRC_ATTR,
                    getResourceMappedPath(componentClass, resourceFileName, context),
                    null);
        }

        writer.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.