|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.xsp.complex.ValueBindingObjectImpl
com.ibm.xsp.resource.AbstractResource
com.ibm.xsp.resource.ScriptResource
public class ScriptResource
Corresponds to the xp:script tag which defines a client or server-side script library
| Field Summary | |
|---|---|
static java.lang.String |
RENDERER_TYPE
|
static java.lang.String |
TYPE_DEFAULT
The type to use if getType() returns null: "text/javascript" |
| Fields inherited from class com.ibm.xsp.resource.AbstractResource |
|---|
FAMILY |
| Constructor Summary | |
|---|---|
ScriptResource()
Default Constructor |
|
ScriptResource(java.lang.String src,
boolean clientSide)
Constructor |
|
| Method Summary | |
|---|---|
void |
addAttr(Attr attr)
Add an Attr, to appear as an attribute in the HTML output of this control
or object tag. |
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
An unmodifiable map of attributes to output on the HTML script tag. |
java.util.List<Attr> |
getAttrs()
The extra attributes to be output on the base element at the root of this control or object tag. |
java.lang.String |
getCharset()
Returns the character encoding of the script designated by the link |
java.lang.String |
getContents()
For script resources, the "contents" property can be set in the XPage source and this method can be used to retrieve the XPage source value. |
java.lang.String |
getServerResourceContents()
|
java.lang.String |
getSrc()
Returns the location of an external script |
java.lang.String |
getType()
Returns the type of script language being used |
boolean |
isClientSide()
Returns true if script is client side only, false if not |
java.lang.String |
removeAttribute(java.lang.String name)
Add an attribute |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
java.lang.String |
setAttribute(java.lang.String name,
java.lang.String value)
Add an attribute |
void |
setAttrs(java.util.List<Attr> attrs)
This method is not used by the XPage generated .java file - instead the addAttr(Attr) method is used to add attributes to the list. |
void |
setCharset(java.lang.String charset)
Sets the character encoding |
void |
setClientSide(boolean clientSide)
Set the clientSide value |
void |
setContents(java.lang.String contents)
Set the contents of the script |
void |
setSrc(java.lang.String src)
The src location of the external script |
void |
setType(java.lang.String type)
The type of script language to be set. |
java.lang.String |
toString()
|
| Methods inherited from class com.ibm.xsp.resource.AbstractResource |
|---|
encodeObject, equals, getFamily, getRendererType, getServerResourceContents, getUniqueId, isRendered, loadContents, setRendered, setRendererType |
| Methods inherited from class com.ibm.xsp.complex.ValueBindingObjectImpl |
|---|
getComponent, getFacesContext, getValueBinding, isTransient, setComponent, setTransient, setValueBinding |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.ibm.xsp.complex.EncodableObject |
|---|
encodeObject |
| Field Detail |
|---|
public static final java.lang.String TYPE_DEFAULT
public static final java.lang.String RENDERER_TYPE
| Constructor Detail |
|---|
public ScriptResource()
public ScriptResource(java.lang.String src,
boolean clientSide)
| Method Detail |
|---|
public boolean isClientSide()
clientSidepublic void setClientSide(boolean clientSide)
clientSide value
clientSide -
public java.lang.String setAttribute(java.lang.String name,
java.lang.String value)
name - the attribute to add to the listvalue - the attribute to add to the listpublic java.lang.String removeAttribute(java.lang.String name)
name - the attribute to add to the listvalue - the attribute to add to the listpublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
getAttrs() property may be set in the XPage source.
public java.lang.String getType()
type of script language being used
public void setType(java.lang.String type)
type of script language to be set.
type - public java.lang.String getSrc()
srcpublic void setSrc(java.lang.String src)
src location of the external script
src - public java.lang.String getCharset()
charsetpublic void setCharset(java.lang.String charset)
charset - public java.lang.String getContents()
contents of scriptpublic void setContents(java.lang.String contents)
contents of the script
contents - The contents to set.public java.util.List<Attr> getAttrs()
null. The addAttr(Attr)
method should be used to add an Attr.
getAttrs in interface FacesAttrsObjectpublic void addAttr(Attr attr)
Attr, to appear as an attribute in the HTML output of this control
or object tag. This is only used when isClientSide() is true.
addAttr in interface FacesAttrsObjectaction - public void setAttrs(java.util.List<Attr> attrs)
addAttr(Attr) method is used to add attributes to the list.
public java.lang.String getServerResourceContents()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState in interface javax.faces.component.StateHoldersaveState in class AbstractResource
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
restoreState in interface javax.faces.component.StateHolderrestoreState in class AbstractResourcepublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||