Script Collector

The script collector structures JavaScriptâ„¢ that is emitted into a page so that it can be used in a portal or Ajax environment.

 

Component class

javax.faces.component.html.HtmlScriptCollector

 

Component at runtime

There is no visible runtime rendering of the

Script Collector component. It renders the JavaScript that it contains.

 

Properties and All Attributes views

The Properties view for a component shows the most common set of attributes you can set on a component, and, depending on the component, you might also see options for adding controls, actions, or other components. To open the Properties view, click

Window | Show View | Properties.

The All Attributes view shows a table of all the attributes you can set on a component, which includes those attributes you can access from the Properties view. To switch to the All Attributes view, click the

All Attributes icon in the upper right corner of the Properties view.

Table 1.

Attribute name

Represented in Properties view by

Description

binding

Not represented

An expression that binds the component's instance (usually a user interface component) to a bean property (usually in the backing file).

decode

Not represented

This takes a javax.faces.el.MethodBinding string that points to a method to execute during the decode phase of the JSF lifecycle.

id

Not represented

Assigns a name to a component. Should be a unique name within a JSP.

prerender

Not represented

This takes a javax.faces.el.MethodBinding string that points to a method to execute during the render phase of the JSF lifecycle. Excuted when the opening tag (encodeBegin) of the scriptCollector is reached during the rendering phase of the JSF lifecycle.
postrender

Not represented

This takes a javax.faces.el.MethodBinding string that points to a method to execute during the render phase of the JSF lifecycle. Excuted when the closing tag (encodeEnd) of the scriptCollector is reached during the rendering phase of the JSF lifecycle.

rendered

Not represented

If false, the component will not be rendered (put into the page sent to the browser) at runtime. If omitted or true, the component is rendered.