|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.xsp.complex.ValueBindingObjectImpl com.ibm.xsp.resource.AbstractResource
public abstract class AbstractResource
Useful superclass for resources
Field Summary | |
---|---|
static java.lang.String |
FAMILY
|
Constructor Summary | |
---|---|
AbstractResource()
Construct an AbstractResource instance |
Method Summary | |
---|---|
void |
encodeObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
A default implementation provided for when this resource implements EncodableObject . |
boolean |
equals(java.lang.Object o)
Comparison - used to optimize the resources added to lists. |
java.lang.String |
getFamily()
Used when this resource implements EncodableObject , see
encodeObject(FacesContext, UIComponent) . |
java.lang.String |
getRendererType()
Used when this resource implements EncodableObject , see
encodeObject(FacesContext, UIComponent) . |
protected java.lang.Object |
getServerResourceContents(java.lang.String serverUrl,
java.lang.String serverCharset,
java.lang.String contentsPropertyValue)
Utility method used by server-side resources to load the contents of the resource. |
java.lang.String |
getUniqueId()
|
boolean |
isRendered()
Returns the rendered property |
protected java.lang.Object |
loadContents(java.lang.String url,
java.lang.String charset)
Load the contents from the URI specified source. |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setRendered(boolean rendered)
Set the rendered property of the resource. |
void |
setRendererType(java.lang.String rendererType)
Used when this resource implements EncodableObject , see
encodeObject(FacesContext, UIComponent) . |
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, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FAMILY
Constructor Detail |
---|
public AbstractResource()
Method Detail |
---|
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String getUniqueId()
public boolean isRendered()
isRendered
in interface Resource
public void setRendered(boolean rendered)
Resource
setRendered
in interface Resource
rendered
- The new rendered flag to set.protected java.lang.Object getServerResourceContents(java.lang.String serverUrl, java.lang.String serverCharset, java.lang.String contentsPropertyValue) throws java.io.IOException
UIComponent
tree is processed on the server. Methods using this
utility should probably check isRendered()
before invoking this
method. The method loadContents(String, String)
is used to load
the URL contents. The loaded contents of the server URL are usually
cached, but if persistence is enabled the loaded contents are discarded
instead of serialized.
serverUrl
- path or URL to resource to be loaded on the serverserverCharset
- character set of the resource to be loaded on the servercontentsPropertyValue
- value provided through the "contents" property in the XPage
source, to be used instead of the serverUrl contents.
null
if the serverUrl is
empty
java.io.IOException
FacesExceptionEx
protected java.lang.Object loadContents(java.lang.String url, java.lang.String charset) throws java.io.IOException
java.io.IOException
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class ValueBindingObjectImpl
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class ValueBindingObjectImpl
public void encodeObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
EncodableObject
. Implementors should call
setRendererType(String)
in their constructor. It will delegate
to a ResourceRenderer
for the current family and rendererType.
java.io.IOException
public java.lang.String getFamily()
EncodableObject
, see
encodeObject(FacesContext, UIComponent)
.
public java.lang.String getRendererType()
EncodableObject
, see
encodeObject(FacesContext, UIComponent)
.
public void setRendererType(java.lang.String rendererType)
EncodableObject
, see
encodeObject(FacesContext, UIComponent)
.
rendererType
- the rendererType to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |