|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.cs.html.DSEJspContextServices
This class implements the JspContextServices interface.
It receives the operation context from the request and provides various interfaces to access the context information.
Field Summary | |
protected java.lang.String |
baseWebPath
The base web path string |
protected DSEException |
dseexception
The current operation exception |
protected java.lang.String |
errorMarker
The error marker value |
protected java.lang.String |
errorPrefix
The error decorator "prefix" value |
protected java.lang.String |
errorSuffix
The error decorator "suffix" value |
protected Vector |
errsJsp
The JSP format errors list |
protected java.lang.String[] |
errsVal
The validation errors list |
protected java.lang.String[] |
errsXVal
The cross-validation errors list |
protected java.lang.String |
extraPathInfo
The locale (extra path) string. |
protected Context |
operationContext
The operation context. |
protected java.lang.String |
pageId
The pageId for the displaying page |
protected Context |
sessionContext
The session context. |
protected java.lang.String |
sessionID
The session id string |
Constructor Summary | |
DSEJspContextServices()
DSEJspContextServices default constructor. |
Method Summary | |
double |
asDouble(java.lang.String strval)
Useful service for converting a String into it's equivalent double value. |
float |
asFloat(java.lang.String strval)
Useful service for converting a String into it's equivalent float value. |
int |
asInt(java.lang.String strval)
Useful service for converting a String into it's equivalent integer value. |
long |
asLong(java.lang.String strval)
Useful service for converting a String into it's equivalent long value. |
java.lang.String |
getBaseWebPath()
Obtain the relative path for jsp resources. |
Context |
getContext()
Get the operation context for the page which initialized this bean. |
java.lang.String[] |
getCrossValidationErrorList()
Return the current list of cross validation errors. |
DataElement |
getElement(java.lang.String name)
Returns the named data element from the operation context. |
protected DataElement |
getElement(java.lang.String name,
boolean useSess)
Insert the method's description here. |
java.lang.String |
getErrorPageHtml(java.lang.String name)
|
DSEException |
getException()
If the framework placed an exception in the HttpServletRequest with key name dseexception, then it can be saved here when the bean is initialized. |
java.lang.String |
getExceptionMessage()
Return message text cooresponding to the current exception. |
java.lang.String |
getFieldErrorMarker(java.lang.String name)
Return the current error marker only if the given field is in error. |
java.lang.String |
getFieldLabel(java.lang.String name)
Returns the label associated with the given field in the context. |
java.lang.String |
getFieldValidationError(java.lang.String name,
int idx)
Return the field error message text at the specified index. |
java.lang.String |
getFieldValidationErrorDecorated(java.lang.String name,
int idx)
Return the field error message text at the specified index decorated with prefix and suffix HTML strings. |
java.lang.String[] |
getFieldValidationErrorList(java.lang.String name)
Retrieve the entire error list for the field. |
java.lang.String[] |
getJspFormatErrorList()
Returns the list of Jsp Format Errors that were found during Jsp Processing. |
java.lang.String |
getLinkToPage(java.lang.String webPath,
java.lang.String pageName,
java.lang.String linkText)
Emit the Html to the JspWriter stream to create a link with given text to a given JSP saved in a given web path (relative to the base JSP path for the application server). |
java.lang.String |
getLocaleId()
Obtain any extra information passed on the call to establish the session. |
java.lang.String |
getRequiredHtmlFields()
Returns a string containing the HTML for all of the HTML Client required fields using the current processor name gotten from the table of stored processors. |
java.lang.String |
getRequiredHtmlFields(java.lang.String parentCtx,
java.lang.String opName)
Returns a string containing the HTML for all of the HTML Client required fields using the passed parameters to fill in the user specifiable information. |
java.lang.String |
getRequiredHtmlFieldsForGETMethod()
Returns a string containing the HTML for all of the HTML Client required fields using the current processor name gotten from the table of stored processors. |
java.lang.String |
getRequiredHtmlFieldsForGETMethod(java.lang.String parentCtx,
java.lang.String opName)
Returns a string containing the HTML for all of the HTML Client required fields using the passed parameters to fill in the user specifiable information. |
Context |
getSessionContext()
Return the session context for the page which initialized this bean. |
DataElement |
getSessionElement(java.lang.String name)
Returns the named data element from the session context. |
java.lang.String |
getSessionId()
Returns the current session identifier string "as-is". |
java.lang.String |
getSessionIdHtmlField()
Returns the current session identifier string as an HTML hidden field. |
java.lang.String |
getSessionIdParameter()
Returns the current session identifier string as a URL parameter. |
java.lang.String |
getSessionStringValue(java.lang.String name)
Returns the specified value from the session context as a string. |
java.lang.Object |
getSessionValue(java.lang.String name)
Returns the named value from the session context in its natural format. |
java.lang.String |
getStringValue(java.lang.String name)
Returns the specified value from the operation context as a string. |
protected java.lang.String |
getStringValue(java.lang.String name,
boolean useSess)
Deprecated. This method will be removed in a future version of this API. |
java.lang.String[] |
getValidationErrorList()
Returns all validation errors in a single list array. |
java.lang.Object |
getValue(java.lang.String name)
Returns the named value from the operation context in its natural format. |
protected java.lang.Object |
getValue(java.lang.String name,
boolean useSess)
Deprecated. This method will be removed in a future version of this API. |
void |
initialize(javax.servlet.http.HttpServletRequest request)
The HttpServletRequest is supposed to have references to the operation context and exceptions placed by the framework during handling of the request. |
boolean |
isFieldHidden(java.lang.String name)
Returns the "hidden" status of the named field in the context. |
boolean |
isFieldInError(java.lang.String name)
Returns the error status of the named field in the context. |
boolean |
isFieldMandatory(java.lang.String name)
Returns the "input mandatory" status of the named field in the context. |
boolean |
isFieldReadOnly(java.lang.String name)
Returns the "read only" status of the named field in the context. |
void |
setErrorDecorationPrefix(java.lang.String pfx)
Sets up the error decorator prefix. |
void |
setErrorDecorationSuffix(java.lang.String sfx)
Sets up the error decorator suffix. |
void |
setErrorMarker(java.lang.String newmarker)
Sets up the error marker value. |
protected void |
setException(DSEException newException)
If the framework placed an exception in the HttpServletRequest with key name dseexception, then it can be saved here when the bean is initialized. |
protected void |
setJspFormatError(java.lang.Exception xcp,
java.lang.String name)
Updates the JspFormatErrorList with information about the error occurred. |
protected void |
setJspFormatError(java.lang.Exception xcp,
java.lang.String name,
boolean useSess)
Deprecated. This method will be removed in a future version of this API. |
protected void |
setJspFormatError(java.lang.String text)
Updates the JspFormatErrorList with information about the error occurred. |
protected void |
setOperationAndSessionContext(javax.servlet.http.HttpServletRequest req)
Save the operation context, and use it to obtain the session context, which is saved as well. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected Context operationContext
protected Context sessionContext
protected DSEException dseexception
protected java.lang.String baseWebPath
protected java.lang.String extraPathInfo
protected java.lang.String sessionID
protected java.lang.String errorMarker
protected java.lang.String errorPrefix
protected java.lang.String errorSuffix
protected java.lang.String[] errsVal
protected java.lang.String[] errsXVal
protected Vector errsJsp
protected java.lang.String pageId
Constructor Detail |
public DSEJspContextServices()
Method Detail |
public double asDouble(java.lang.String strval)
public float asFloat(java.lang.String strval)
public int asInt(java.lang.String strval)
public long asLong(java.lang.String strval)
public java.lang.String getBaseWebPath()
Relative to the web app server web path
public Context getContext()
public java.lang.String[] getCrossValidationErrorList()
public DataElement getElement(java.lang.String name)
If the element is not present in the context, null is returned.
protected DataElement getElement(java.lang.String name, boolean useSess)
name
- java.lang.StringuseSess
- booleanpublic java.lang.String getErrorPageHtml(java.lang.String name)
public DSEException getException()
public java.lang.String getExceptionMessage()
public java.lang.String getFieldErrorMarker(java.lang.String name)
Returns a blank string if no error exists.
public java.lang.String getFieldLabel(java.lang.String name)
public java.lang.String getFieldValidationError(java.lang.String name, int idx)
This method returns a blank string if the field has no errors.
public java.lang.String getFieldValidationErrorDecorated(java.lang.String name, int idx)
This method returns a blank string if the field has no errors.
public java.lang.String[] getFieldValidationErrorList(java.lang.String name)
An array of zero size is returned if there are no errors associated with the field.
public java.lang.String[] getJspFormatErrorList()
public java.lang.String getLinkToPage(java.lang.String webPath, java.lang.String pageName, java.lang.String linkText)
public java.lang.String getLocaleId()
public java.lang.String getRequiredHtmlFields()
public java.lang.String getRequiredHtmlFields(java.lang.String parentCtx, java.lang.String opName)
parentctx
- java.lang.Stringopname
- java.lang.Stringpublic java.lang.String getRequiredHtmlFieldsForGETMethod()
public java.lang.String getRequiredHtmlFieldsForGETMethod(java.lang.String parentCtx, java.lang.String opName)
parentctx
- java.lang.Stringopname
- java.lang.Stringpublic Context getSessionContext()
public DataElement getSessionElement(java.lang.String name)
If the element is not present in the context, null is returned.
public java.lang.String getSessionId()
public java.lang.String getSessionIdHtmlField()
public java.lang.String getSessionIdParameter()
public java.lang.String getSessionStringValue(java.lang.String name)
Handles exceptions by returning a null string value.
public java.lang.Object getSessionValue(java.lang.String name)
If the element is not present in the context, null is returned.
public java.lang.String getStringValue(java.lang.String name)
Handles exceptions by returning a null string value.
protected java.lang.String getStringValue(java.lang.String name, boolean useSess)
public java.lang.String[] getValidationErrorList()
public java.lang.Object getValue(java.lang.String name)
If the element is not present in the context hierarchy, null is returned.
protected java.lang.Object getValue(java.lang.String name, boolean useSess)
public void initialize(javax.servlet.http.HttpServletRequest request) throws DSEException
request
- javax.servlet.http.HttpServletRequestpublic boolean isFieldHidden(java.lang.String name)
public boolean isFieldInError(java.lang.String name)
public boolean isFieldMandatory(java.lang.String name)
public boolean isFieldReadOnly(java.lang.String name)
public void setErrorDecorationPrefix(java.lang.String pfx)
This prefix is prepended to any error information returned in a "decorated" error string.
public void setErrorDecorationSuffix(java.lang.String sfx)
This suffix is appended to any error information returned in a "decorated" error string.
public void setErrorMarker(java.lang.String newmarker)
This is the string that is returned by the "getFieldErrorMarker" method if the field is found to be in error.
protected void setException(DSEException newException)
newException
- com.ibm.dse.base.DSEExceptionprotected void setJspFormatError(java.lang.Exception xcp, java.lang.String name)
text
- java.lang.Stringprotected void setJspFormatError(java.lang.Exception xcp, java.lang.String name, boolean useSess)
protected void setJspFormatError(java.lang.String text)
text
- java.lang.Stringprotected void setOperationAndSessionContext(javax.servlet.http.HttpServletRequest req) throws DSEException
newOperationContext
- com.ibm.dse.base.Context
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |