Package javax.faces.context

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


        ResponseWriter writer = context.getResponseWriter();
        writer.startElement("link", component);
        writer.writeAttribute("rel", "stylesheet", null);
        writer.writeAttribute("type", "text/css", null);
        writer.writeURIAttribute
            ("href",
             context.getExternalContext().getRequestContextPath() +
             (String) component.getAttributes().get("path"), "path");
        writer.endElement("link");
        writer.writeText("\n", null);
View Full Code Here


                      "' --> uri='" + uri(context) + "'");
        }

        ResponseWriter writer = context.getResponseWriter();
        writer.startElement("base", component);
        writer.writeURIAttribute("href", uri(context), null);
        String target = (String) component.getAttributes().get("target");
        if (target != null) {
            writer.writeAttribute("target", target, "target");
        }
        writer.endElement("base");
View Full Code Here

        writer.startElement(HTML.FORM_ELEM, htmlForm);
        writer.writeAttribute(HTML.ID_ATTR, clientId, null);
        writer.writeAttribute(HTML.NAME_ATTR, clientId, null);
        writer.writeAttribute(HTML.METHOD_ATTR, "post", null);
        writer.writeURIAttribute(HTML.ACTION_ATTR,
                                 facesContext.getExternalContext().encodeActionURL(actionURL),
                                 null);

        HtmlRendererUtils.renderHTMLAttributes(writer, htmlForm, HTML.FORM_PASSTHROUGH_ATTRIBUTES);
View Full Code Here

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

             SkinSelectors.SORTABLE_HEADER_SORT_ICON_STYLE_CLASS, null);
      }
      else
      {
        writer.startElement("a", null);
        writer.writeURIAttribute("href", "#", null);
        writer.writeAttribute("onclick", sortOnclick, null);
      }
    }

    String altTextKey = null;
View Full Code Here

    }
    else if (supportsScripting(arc))
    {
      rw.startElement("a", null);
      rw.writeAttribute("onclick", parameterString, null);
      rw.writeURIAttribute("href", "#", null);
    }
    // For Non-JavaScript browsers, render an input element(type=submit) to
    // submit the page. Encode the name attribute with the parameter name
    // and value thus it would enable the browsers to include the name of
    // this element in its payLoad if it submits the page.
View Full Code Here

    // this element in its payLoad if it submits the page.
    else
    {
      rw.startElement("input", null);
      rw.writeAttribute("type", "submit", null);
      rw.writeURIAttribute("name", parameterString, null);
    }
  }

  private String _generateOnClickString(
    FacesContext        context,
View Full Code Here

      writer.writeText("\")", null);
    }
    else
    {
      // The "safe" case: just write out the source
      writer.writeURIAttribute("src", libURL, null);
    }

    writer.endElement("script");
  }
View Full Code Here

    // if we have more than one record and browser is js capable then
    // render as a link
    if (isEnabled)
    {
      writer.startElement("a", null);
      writer.writeURIAttribute("href", "#", null);
      writer.writeAttribute("onclick", onclick, null);

      // The navBar needs its initial focus to be on the Next button,
      // according to the BLAF. Render a special id on the Next button
      // if this navBar is to have the initial focus. (unless it needs
View Full Code Here

  {
    ResponseWriter writer = context.getResponseWriter();
    if (onclick != null)
    {
      writer.startElement("a", null);
      writer.writeURIAttribute("href", "#", null);
      writer.writeAttribute("onclick", onclick, null);
    }

    boolean isEnabled = (onclick != null);
    String titleKey = getIconTitleKey(isNext, isEnabled);
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.