|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataSource
Method Summary | |
---|---|
java.lang.String |
getBeanId()
The unique id under which the associated data object will be stored. |
DataContainer |
getDataContainer()
Return the associated data container |
java.lang.String |
getRequestParamPrefix()
Return the request parameter prefix to be used by this data source. |
java.lang.String |
getScope()
Return the scope identifier under which the data object will be stored. |
java.lang.String |
getUniqueId()
The id identifying the data. |
java.lang.String |
getVar()
Return the user settable request-scope attribute under which the data object will be exposed. |
java.lang.String[] |
getVars()
Return the request-scope attribute names under which various objects associated with this data source will be exposed, including getVar() variable name. |
boolean |
isIgnoreRequestParams()
/** Return true if request parameters should be ignored . |
boolean |
isReadonly()
Return true if this is a read only data object |
void |
refresh()
Refresh the current state of the data object |
boolean |
save(javax.faces.context.FacesContext context,
boolean removeFromManager)
Save the current state of the data object. |
void |
setIgnoreRequestParams(boolean ignore)
Set a flag to indicate if request parameters should be ignored. |
void |
setRequestParamPrefix(java.lang.String prefix)
Set the request parameter prefix to be used by this data source. |
void |
setScope(java.lang.String scope)
Set the scope identifier under which the data object will be stored. |
void |
setVar(java.lang.String var)
Set the user settable request-scope attribute under which the data object will be exposed. |
Methods inherited from interface com.ibm.xsp.model.DataPublishingObject |
---|
popData, pushData |
Method Detail |
---|
java.lang.String getBeanId()
java.lang.String getUniqueId()
java.lang.String[] getVars()
getVar()
variable name.
java.lang.String getVar()
void setVar(java.lang.String var)
java.lang.String getScope()
void setScope(java.lang.String scope)
boolean isReadonly()
boolean isIgnoreRequestParams()
Most data sources have a mechanism where the values of some of their properties can be read from the request parameters to the XPage, for example if you have an XPage containing a document data source and you open that XPage with a URL like /page1.xsp?documentId=AAAA, then the document data source will behave as if it were configured with the "documentId" property set to the value "AAA" in the XPage source.
If you do not want a data source to read property values from the request parameters at the end of the URL, then the data source should be configured with ignoreRequestParameters="true".
A related behavior is, if you have multiple data sources in an XPage, then by default they would both read the same request parameters from the URL and they would both be configured to point to the same document. To avoid that behavior you can configure one or both of the data sources with a request parameter prefix, so the data source reads the parameters values with the specified prefix before their parameter name.
getRequestParamPrefix()
void setIgnoreRequestParams(boolean ignore)
java.lang.String getRequestParamPrefix()
isIgnoreRequestParams()
void setRequestParamPrefix(java.lang.String prefix)
boolean save(javax.faces.context.FacesContext context, boolean removeFromManager) throws FacesExceptionEx
FacesExceptionEx
void refresh()
DataContainer getDataContainer() throws FacesExceptionEx
FacesExceptionEx
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |