Examples of writeURIAttribute()


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

         if ((link.getAnchor() != null) && link.getAnchor().length() > 0)
         {
            href += "#" + link.getAnchor();
         }

         writer.writeURIAttribute("href", context.getExternalContext().encodeResourceURL(href), "href");

      }
      catch (PrettyException e)
      {
         throw new PrettyException("Failed to build URL for mapping '" + mappingId
View Full Code Here

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

            writer.writeAttribute(HTML.REL_ATTR, HTML.STYLESHEET_VALUE,null );
            writer.writeAttribute("media", "screen",null );           
            writer.writeAttribute(HTML.TYPE_ATTR,
                    (resource.getContentType() == null ? HTML.STYLE_TYPE_TEXT_CSS
                            : resource.getContentType()) , null);
            writer.writeURIAttribute(HTML.HREF_ATTR, resource.getRequestPath(), null);
            writer.endElement(HTML.LINK_ELEM);
        }
    }
   
    private boolean _initialStateMarked;
View Full Code Here

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

            ResponseWriter writer = facesContext.getResponseWriter();
            writer.startElement(HTML.SCRIPT_ELEM, component);
// We can't render the content type, because usually it returns "application/x-javascript"
// and this is not compatible with IE. We should force render "text/javascript".
            writer.writeAttribute(HTML.SCRIPT_TYPE_ATTR, HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
            writer.writeURIAttribute(HTML.SRC_ATTR, resource.getRequestPath(), null);
            writer.endElement(HTML.SCRIPT_ELEM);
        }
    }

    private boolean _initialStateMarked;
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()

        writer.writeAttribute(HTML.NAME_ATTR, clientId, null);
        writer.writeAttribute(HTML.METHOD_ATTR, method, null);
        if (acceptCharset != null) {
            writer.writeAttribute(HTML.ACCEPT_CHARSET_ATTR, acceptCharset, null);
        }
        writer.writeURIAttribute(HTML.ACTION_ATTR,
                                 facesContext.getExternalContext().encodeActionURL(actionURL),
                                 null);

        Map<String, List<ClientBehavior>> behaviors = null;
        if (htmlForm instanceof ClientBehaviorHolder && JavascriptUtils.isJavascriptAllowed(facesContext.getExternalContext()))
View Full Code Here

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

        {
            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_IMAGE,
                    org.apache.myfaces.shared_impl.renderkit.JSFAttr.TYPE_ATTR);
            String src = facesContext.getApplication().getViewHandler()
                    .getResourceURL(facesContext, image);
            writer.writeURIAttribute(HTML.SRC_ATTR, externalContext
                    .encodeResourceURL(src),
                    org.apache.myfaces.shared_impl.renderkit.JSFAttr.IMAGE_ATTR);
        }
        else
        {
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_impl.renderkit.JSFAttr.TYPE_ATTR);
            writer.writeURIAttribute(HTML.SRC_ATTR, image, org.apache.myfaces.shared_impl.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 (log.isLoggable(Level.WARNING)) log.warning("Graphic with id " + uiComponent.getClientId(facesContext) + " has no value (url or name).");
        }
View Full Code Here

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

        if (image != null)
        {
            writer.writeAttribute(HTML.TYPE_ATTR, HTML.INPUT_TYPE_IMAGE, null);
            String src = facesContext.getApplication().getViewHandler().getResourceURL(
                    facesContext, image);
            writer.writeURIAttribute(HTML.SRC_ATTR, externalContext.encodeResourceURL(src),
                    JSFAttr.IMAGE_ATTR);
        }
        else
        {
            String type = getType(uiComponent);
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.