IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.struts.taglib.html
Class StrutsJspContextService

java.lang.Object
  extended bycom.ibm.btt.struts.taglib.html.StrutsJspContextService
All Implemented Interfaces:
JspContextService

public class StrutsJspContextService
extends java.lang.Object
implements JspContextService


Field Summary
protected  java.lang.String applicationID
          The application session id string
protected  Context applicationSessionContext
          The application session context
protected  java.lang.String baseWebApplURIPath
          the Web Application URI plus base path
protected  DSEException dseexception
          The current operation exception
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  javax.servlet.jsp.PageContext pageContext
          pageContext
protected  Context processContext
          The operation context.
 BTTRequestProcessorUtil processorUtil
           
protected  javax.servlet.http.HttpServletRequest request
           
protected  Context sessionContext
          The SessionCtx
protected  java.lang.String sessionID
          The session id string
protected  java.lang.String webApplURI
          the Web Application URI
 
Constructor Summary
StrutsJspContextService()
           
 
Method Summary
 Context getApplicationSessionContext()
          Return the application session context for the page which initialized this bean.
 java.lang.String getApplicationSessionId()
          Returns the current application session identifier string "as-is".
 java.lang.String getBaseWebApplURIPath()
           
 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.
 java.lang.String getFieldValidationError(java.lang.String name, int idx)
          Return the field error message text at the specified index.
 java.lang.String getInputDataInError(java.lang.String name)
           
protected  java.lang.String getProcessId(javax.servlet.http.HttpServletRequest request)
           
 Context getSessionContext()
          Return the session context for the page which initialized this bean.
 java.lang.String getSessionId()
          Returns the current session identifier string "as-is".
 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.
 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. Replaced by getValue(String).
 java.lang.String getWebApplURI()
          Gets the webApplURI
 void initialize(javax.servlet.http.HttpServletRequest request)
          The HttpServletRequest is supposed to have references to the operation context and exceptions placed by the toolkit 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 isFieldReadOnly(java.lang.String name)
          Returns the "read only" status of the named field in the context.
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)
           
protected  void setJspFormatError(java.lang.String text)
           
 java.lang.String[] translateErrors(ErrorInfo errInfo)
          Translate the field error message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processContext

protected Context processContext
The operation context.


sessionContext

protected Context sessionContext
The SessionCtx


dseexception

protected DSEException dseexception
The current operation exception


errsJsp

protected Vector errsJsp
The JSP format errors list


baseWebApplURIPath

protected java.lang.String baseWebApplURIPath
the Web Application URI plus base path


errsVal

protected java.lang.String[] errsVal
The validation errors list


errsXVal

protected java.lang.String[] errsXVal
The cross-validation errors list


webApplURI

protected java.lang.String webApplURI
the Web Application URI


applicationID

protected java.lang.String applicationID
The application session id string


applicationSessionContext

protected Context applicationSessionContext
The application session context


sessionID

protected java.lang.String sessionID
The session id string


pageContext

protected javax.servlet.jsp.PageContext pageContext
pageContext


request

protected javax.servlet.http.HttpServletRequest request

processorUtil

public BTTRequestProcessorUtil processorUtil
Constructor Detail

StrutsJspContextService

public StrutsJspContextService()
Method Detail

getStringValue

public java.lang.String getStringValue(java.lang.String name)
Returns the specified value from the operation context as a string. If the element is not present in the operation context it is looked for in the session context.

Handles exceptions by returning a null string value.

Specified by:
getStringValue in interface JspContextService
Returns:
String - The string value.

initialize

public void initialize(javax.servlet.http.HttpServletRequest request)
                throws DSEException
The HttpServletRequest is supposed to have references to the operation context and exceptions placed by the toolkit during handling of the request. Use this information to initialize the bean for use by the JSP that includes it.

Parameters:
request - javax.servlet.http.HttpServletRequest
Throws:
DSEException

getProcessId

protected java.lang.String getProcessId(javax.servlet.http.HttpServletRequest request)

setJspFormatError

protected void setJspFormatError(java.lang.Exception xcp,
                                 java.lang.String name,
                                 boolean useSess)

setJspFormatError

protected void setJspFormatError(java.lang.String text)

isFieldHidden

public boolean isFieldHidden(java.lang.String name)
Returns the "hidden" status of the named field in the context.

Specified by:
isFieldHidden in interface JspContextService
Returns:
boolean - The field hidden indicator.

isFieldReadOnly

public boolean isFieldReadOnly(java.lang.String name)
Returns the "read only" status of the named field in the context.

Specified by:
isFieldReadOnly in interface JspContextService
Returns:
boolean - The field "read only" indicator.

isFieldInError

public boolean isFieldInError(java.lang.String name)
Returns the error status of the named field in the context.

Specified by:
isFieldInError in interface JspContextService
Returns:
boolean - The field in error indicator.

getInputDataInError

public java.lang.String getInputDataInError(java.lang.String name)
Specified by:
getInputDataInError in interface JspContextService

setJspFormatError

protected void setJspFormatError(java.lang.Exception xcp,
                                 java.lang.String name)
Updates the JspFormatErrorList with information about the error occurred.

Parameters:
name - java.lang.String
xcp -

getBaseWebApplURIPath

public java.lang.String getBaseWebApplURIPath()

getElement

public DataElement getElement(java.lang.String name)
Returns the named data element from the operation context.

If the element is not present in the context, null is returned.

Specified by:
getElement in interface JspContextService
Parameters:
name - java.lang.String
Returns:
DataElement - The data element value.

getFieldValidationError

public java.lang.String getFieldValidationError(java.lang.String name,
                                                int idx)
Return the field error message text at the specified index.

This method returns a blank string if the field has no errors.

Specified by:
getFieldValidationError in interface JspContextService
Parameters:
name - java.lang.String
idx - int
Returns:
String - The validation error value.

translateErrors

public java.lang.String[] translateErrors(ErrorInfo errInfo)
Translate the field error message

Parameters:
errInfo - The errorInfo of the dataElement
Returns:
String[] Array of translated messages

getValue

public java.lang.Object getValue(java.lang.String name)
Returns the named value from the operation context in its natural format. If the element is not present in the operation context, it is looked for in the session context.

If the element is not present in the context hierarchy, null is returned.

Specified by:
getValue in interface JspContextService
Parameters:
name - java.lang.String
Returns:
Object - The context value.

getSessionValue

public java.lang.Object getSessionValue(java.lang.String name)
Returns the named value from the session context in its natural format.

If the element is not present in the context, null is returned.

Returns:
String - The session value.

getValue

protected java.lang.Object getValue(java.lang.String name,
                                    boolean useSess)
Deprecated. Replaced by getValue(String).

Returns the named value from the operation context

Parameters:
name - java.lang.String
useSess - boolean
Returns:
java.lang.Object

getValidationErrorList

public java.lang.String[] getValidationErrorList()
Returns all validation errors in a single list array.

Specified by:
getValidationErrorList in interface JspContextService
Returns:
String[] - The validation error list.

getWebApplURI

public java.lang.String getWebApplURI()
Gets the webApplURI

Returns:
Returns a String

getApplicationSessionId

public java.lang.String getApplicationSessionId()
Returns the current application session identifier string "as-is".

Returns:
String - The application id value.

getApplicationSessionContext

public Context getApplicationSessionContext()
Return the application session context for the page which initialized this bean.

Returns:
Context - The application session context value.

getSessionContext

public Context getSessionContext()
Return the session context for the page which initialized this bean.

Returns:
Context - The session context value.

getSessionId

public java.lang.String getSessionId()
Returns the current session identifier string "as-is".

Returns:
String - The session id value.

getCrossValidationErrorList

public java.lang.String[] getCrossValidationErrorList()
Return the current list of cross validation errors.

Specified by:
getCrossValidationErrorList in interface JspContextService
Returns:
String[] - The error list array value.

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005