All Downloads are FREE. Search and download functionalities are using the official Maven repository.

facesdoc.HTML_BASIC.renderkit-summary.html Maven / Gradle / Ivy

Go to download

This is the master POM file for Sun's Implementation of the JSF 2.1 Specification.

There is a newer version: 2.2.20
Show newest version






Faces RenderKit






HTML_BASIC RenderKit


The standard HTML RenderKit. Please see the spec for additional details for the standard render-kit.

The following new renderers have been added in this release of the specification. The default implementation of the spec must not expose these renderers to JSP based views.

javax.faces.Output
javax.faces.Body
javax.faces.Head
javax.faces.resource.Script
javax.faces.resource.Stylesheet
javax.faces.Composite

General notes on decoding

    Only Renderers for components which cause data to sent to the server on a page submit need to implement decode behavior. In practical terms, this means Renderers for components that implement from javax.faces.component.EditableValueHolder or javax.faces.component.ActionSource or Renderers for javax.faces.component.UIForm components. Renderers for components that do not send data to the server on page submit may choose to accept the no-op decode behavior of the javax.faces.render.Renderer abstract class. In the Renderer descriptions that follow, the omission of a Decode Behavior section indicates that this Renderer does no decoding.

    If a Renderer chooses to implement decode behavior, it must consult the "disabled" and "readonly" attributes of the component to be rendered, if the value of either attribute is equal to, ignoring case, the string "true" (without the quotes) the decode method must take no action and return immediately.

    If the component associated with the Renderer implements the javax.faces.component.behavior.ClientBehaviorHolder interface, process javax.faces.component.behavior.ClientBehaviors as follows:

    • Determine if there are javax.faces.component.behavior.ClientBehaviors associated with this component by calling the implementation of javax.faces.component.behavior.ClientBehaviorHolder.getClientBehaviors.
    • If there are client behaviors, determine the client behavior event name from the request parameter: javax.faces.behavior.event.
    • If that request parameter exists, get the List of javax.faces.component.behavior.ClientBehaviors for the behavior event name from the Map returned from javax.faces.component.behavior.ClientBehaviorHolder.getClientBehaviors.
    • If there are client behaviors for the behavior event name, determine the behavior source name from the request parameter: javax.faces.source.
    • If the request parameter exists, and its value is the same as this component's clientId, iterate over the List of javax.faces.component.behavior.ClientBehaviors and call the decode() method for each one.
    Behavior decoding is applicable to components that are "readonly", but it is not applicable to components that are "disabled".

General notes on encoding

    If the value of the component's "rendered" property is false, the component, and its children must not be rendered.

    General notes regarding the id attribute

      All components, and therefore all tags for those components support the id attribute. This attribute is optional. If not present its value is autogenerated by the implementation and used for internal purposes only. If present, an id attribute must not start with the String listed as the value of the constant UIViewRoot.UNIQUE_ID_PREFIX, and it must be unique within the scope of the nearest component that is a NamingContainer.

      All renderers must take the following action regarding the id attribute: If the value returned from component.getId() is non-null and does not start with UIViewRoot.UNIQUE_ID_PREFIX, call component.getClientId() and render the result as the value of the id attribute in the markup for the component. See the javadoc for component.getClientId() for details, particularly note that the Renderer has a chance to modify the client id before it is rendered. If the component doesn't generate any markup elements, include the id attribte on a "span" element that encloses the content for the component.

      In addition to any action already specified in the renderers, all renderers for UIInput components must take the following action regarding the id attribute: Call component.getClientId() and render the result as the value of the name attribute. This may cause some renderers to have "id" and "name" attributes that have exactly the same value.

    General notes regarding the rendering of JavaScript in the standard components.

      The intent of the standard renderkit is to specify the minimal Renderers a JSF implementation must provide. As such, it is the baseline for building JSF applications that are maximally portable across JSF implementations and user agents. Therefore, the use of JavaScript must be minimized as not all browsers support JavaScript, nor do all users enable JavaScript support in their user agents.

      Compliant implementations must only generate JavaScript in the javax.faces.Link and javax.faces.Button Renderers for the javax.faces.Command component. The generation of JavaScript in any other Renderer in the HTML_BASIC renderkit is not permitted. However, any JavaScript code provided by the user as the value of a passthru attribute, such as "onmouseover", is excluded from this restriction.

    General notes regarding the rendering of component Client Behaviors.

      Components that implement the javax.faces.component.behavior.ClientBehaviorHolder interface are eligable to have ClientBehavior instances attached to them. The standard renderers are responsible for inserting the scripts produced by client behaviors into the component's rendered content. Components may obtain script from multiple sources. Event handler scripts may be specified by page authors, scripts may be produced by client behaviors and renderers may produce ther own scripts. When multiple scripts are present, the scripts must be chained together in this order:

      • User specified event handler scripts
      • client behavior scripts
      • renderer specific scripts
      If any of the scripts in the chain returns false, subsequent script must not be executed. The specification provides a utility function jsf.util.chain to handle this capability. If there are UIParameter children the parameter names and values must be passed into the client behavior getScript method via the ClientBehaviorContext.

Renderer Summary
component-family renderer-type description
javax.faces.Command javax.faces.Button

Renders an HTML "input" element.

javax.faces.Link

Render an HTML "a" anchor element that acts like a form submit button when clicked.

javax.faces.Data javax.faces.Table

Renders an HTML "table" element compliant with the HTML 401 specification.

javax.faces.Form javax.faces.Form Renders an HTML "form" element.
javax.faces.Graphic javax.faces.Image

Renders an HTML "img" element.

javax.faces.Input javax.faces.Hidden

Renders an HTML "input" element of type "hidden".

javax.faces.Secret

Renders an HTML "input" element of "type" "password".

javax.faces.Text

Renders an HTML "input" element of "type" "text".

javax.faces.Textarea

Renders an HTML "textarea" element.

javax.faces.Message javax.faces.Message

Render a single message for a specific component.

javax.faces.Messages javax.faces.Messages

The same as for the Message renderer, but output all the messages.

javax.faces.NamingContainer javax.faces.Composite

Renders a composite component.

javax.faces.OutcomeTarget javax.faces.Button
Render an HTML "input" element of type "button".
javax.faces.Link
Render an HTML "a" anchor element.
javax.faces.Output javax.faces.Body

Render the markup for a <body> element.

javax.faces.CompositeFacet

Renders a facet at this particular point in the composite component PDL page.

javax.faces.Format

Render parameterized text.

javax.faces.Head

Render the markup for a <head> element.

javax.faces.Label Renders an HTML "label" element.
javax.faces.Link Render an HTML "a" anchor element.
javax.faces.Text If the "styleClass", "style", "dir" or "lang" attributes are present, render a "span" element.
javax.faces.resource.Script

Render the markup for a <script> element that renders the script Resource specified by the optional name attribute and library attributes.

javax.faces.resource.Stylesheet

Render the markup for a <link> element that renders the style Resource specified by the optional name and library attributes.

javax.faces.Panel javax.faces.Grid Renders an HTML "table" element, conforming to the rules in the HTML 401 specification.
javax.faces.Group Intended for use in situations when only one UIComponent child can be nested, such as in the case of facets.
javax.faces.SelectBoolean javax.faces.Checkbox

Renders an HTML "input" element of type "checkbox".

javax.faces.SelectMany javax.faces.Checkbox

Render an HTML checkbox list.

javax.faces.Listbox

Render an HTML option list.

javax.faces.Menu

Render an HTML option list.

javax.faces.SelectOne javax.faces.Listbox

Render an HTML option list.

javax.faces.Menu

Render an HTML option list.

javax.faces.Radio

Render a set of html "input" elements of type "radio".


Copyright ? 2002-2004 Sun Microsystems, Inc. All Rights Reserved.




© 2015 - 2024 Weber Informatics LLC | Privacy Policy