|
|||||||||
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 com.ibm.xsp.resource.BundleResource
public class BundleResource
Corresponds to the xp:bundleResource
tag which is used to load
strings for translation
Field Summary |
---|
Fields inherited from class com.ibm.xsp.resource.AbstractResource |
---|
FAMILY |
Constructor Summary | |
---|---|
BundleResource()
|
Method Summary | |
---|---|
java.util.ResourceBundle |
getContents()
Loads the contents from the "src" location as a Java ResourceBundle object, method may be invoked programmatically but be aware that it may throw exceptions. |
java.lang.String |
getSrc()
Return the src file |
java.lang.String |
getVar()
Returns the var used to access resource in bundle |
protected java.lang.Object |
loadContents(java.lang.String url,
java.lang.String charset)
Load the contents from the URI specified source. |
void |
popData(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Map<java.lang.String,java.lang.Object> requestMap)
Pop the data associated with this data source from the request map, note, if values were added to the shadowedData list during DataPublishingObject.pushData(FacesContext, UIComponent, Map, List) , then it is not necessary to
remove them from the request map in this method (as the calling class will
remove them). |
void |
pushData(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.util.Map<java.lang.String,java.lang.Object> requestMap,
java.util.List<DataPublisher.ShadowedObject> shadowedData)
Publishes the translated ResourceBundle loaded by this resource,
under the variable name provided by getVar() . |
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setSrc(java.lang.String src)
The src file to set. |
void |
setVar(java.lang.String var)
The var to set to access resources in bundle |
Methods inherited from class com.ibm.xsp.resource.AbstractResource |
---|
encodeObject, equals, getFamily, getRendererType, getServerResourceContents, getUniqueId, isRendered, 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, toString, wait, wait, wait |
Constructor Detail |
---|
public BundleResource()
Method Detail |
---|
public java.lang.String getSrc()
src
public void setSrc(java.lang.String src)
src
- public java.lang.String getVar()
var
used to access resource in bundle
public void setVar(java.lang.String var)
var
- public java.util.ResourceBundle getContents() throws java.io.IOException
{@link
- IOException}
java.io.IOException
protected java.lang.Object loadContents(java.lang.String url, java.lang.String charset) throws java.io.IOException
AbstractResource
loadContents
in class AbstractResource
java.io.IOException
public void pushData(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.util.Map<java.lang.String,java.lang.Object> requestMap, java.util.List<DataPublisher.ShadowedObject> shadowedData) throws FacesExceptionEx
ResourceBundle
loaded by this resource,
under the variable name provided by getVar()
. Note, this does
not override AbstractResource#getServerCharset()
, because the
bundle properties files must be encoded in "ISO-8859-1".
pushData
in interface DataPublishingObject
{@link
- javax.faces.context.FacesContext}{@link
- java.util.Map}{@link
- java.util.List}
{@link
- IOException}
FacesExceptionEx
public void popData(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.util.Map<java.lang.String,java.lang.Object> requestMap) throws FacesExceptionEx
DataPublishingObject
DataPublishingObject.pushData(FacesContext, UIComponent, Map, List)
, then it is not necessary to
remove them from the request map in this method (as the calling class will
remove them). This method should do any further tidying up required.
popData
in interface DataPublishingObject
FacesExceptionEx
public java.lang.Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class AbstractResource
public void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class AbstractResource
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |