com.sun.webui.jsf.component
Class Script

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by com.sun.webui.jsf.component.Script
All Implemented Interfaces:
javax.faces.component.StateHolder

public class Script
extends javax.faces.component.UIComponentBase

The Script component is can be used to refer to a Javascript file, by using the url attribute. The tag can also be used embed Javascript code within the rendered HTML page.


Constructor Summary
Script()
          Default constructor.
 
Method Summary
 java.lang.String getCharset()
          Defines the character (charset) encoding of the target URL.
 java.lang.String getFamily()
          Return the family for this component.
 java.lang.String getType()
          Indicates the MIME type of the script.
 java.lang.String getUrl()
          Defines the absolute or relative URL to a file that contains the script.
 void restoreState(javax.faces.context.FacesContext _context, java.lang.Object _state)
          Restore the state of this component.
 java.lang.Object saveState(javax.faces.context.FacesContext _context)
          Save the state of this component.
 void setCharset(java.lang.String charset)
          Defines the character (charset) encoding of the target URL.
 void setId(java.lang.String id)
          The component identifier for this component.
 void setRendered(boolean rendered)
          Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page.
 void setType(java.lang.String type)
          Indicates the MIME type of the script.
 void setUrl(java.lang.String url)
          Defines the absolute or relative URL to a file that contains the script.
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setParent, setRendererType, setTransient, setValueBinding, setValueExpression
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Script

public Script()
Default constructor.

Method Detail

getFamily

public java.lang.String getFamily()

Return the family for this component.

Specified by:
getFamily in class javax.faces.component.UIComponent

setId

public void setId(java.lang.String id)
The component identifier for this component. This value must be unique within the closest parent component that is a naming container.

Overrides:
setId in class javax.faces.component.UIComponentBase

setRendered

public void setRendered(boolean rendered)
Use the rendered attribute to indicate whether the HTML code for the component should be included in the rendered HTML page. If set to false, the rendered HTML page does not include the HTML for the component. If the component is not rendered, it is also not processed on any subsequent form submission.

Overrides:
setRendered in class javax.faces.component.UIComponentBase

getCharset

public java.lang.String getCharset()

Defines the character (charset) encoding of the target URL. See iana.org for a complete list of character encodings.


setCharset

public void setCharset(java.lang.String charset)

Defines the character (charset) encoding of the target URL. See iana.org for a complete list of character encodings.

See Also:
getCharset()

getType

public java.lang.String getType()

Indicates the MIME type of the script. Default is "text/javascript"


setType

public void setType(java.lang.String type)

Indicates the MIME type of the script. Default is "text/javascript"

See Also:
getType()

getUrl

public java.lang.String getUrl()

Defines the absolute or relative URL to a file that contains the script. Use this attribute to refer to a file instead of inserting the script into your HTML document


setUrl

public void setUrl(java.lang.String url)

Defines the absolute or relative URL to a file that contains the script. Use this attribute to refer to a file instead of inserting the script into your HTML document

See Also:
getUrl()

restoreState

public void restoreState(javax.faces.context.FacesContext _context,
                         java.lang.Object _state)

Restore the state of this component.

Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext _context)

Save the state of this component.

Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase


Copyright © 2008 Sun Microsystems, Inc. All Rights Reserved.