Business Components

oracle.jbo.html
Class HtmlServices

java.lang.Object
  |
  +--oracle.jbo.html.HtmlServices

public final class HtmlServices
extends java.lang.Object

The HtmlServices class contains several useful class fields and methods. It cannot be instantiated.

Since:
JDeveloper 9.0.2

Field Summary
TypeField
static java.lang.String DISP_RENDERER_KEY
          The field type value for Display renderer
static java.lang.String EDIT_RENDERER_KEY
          The field type value for Edit renderer
static java.lang.String NULLSTRING
          Internal: Applications should not use this field.
static java.lang.String ORD_DISPLAYRENDERER_CLASSNAME
          Default Intermedia Display renderer class name
static java.lang.String ORD_EDITRENDERER_CLASSNAME
          Default Intermedia Edit renderer class name
static java.lang.String ORD_PARAM
          Internal: Applications should not use this field.
Key to identify request paramater list in the page context
 
Constructor Summary
HtmlServices()
           
 
Method Summary
TypeMethod
static java.lang.String getArrayAttributeName(AttributeDef attrDef, int i)
          Build an attribute path for a Array domain
static HTMLFieldRenderer getFieldRendererFromClassName(java.lang.String sClassName, javax.servlet.jsp.PageContext page)
          Load and instanciate a Renderer class
static java.lang.String getHiddenAttributeName(java.lang.String attrName)
          Build the name of the hidden field used to store the original value of an attribute
static java.lang.String getRendererKeyFromDomainName(java.lang.String className, java.lang.String type)
          Build a string key from a Domain class name
static java.lang.String getRequestParameter(javax.servlet.jsp.PageContext pageContext, java.lang.String key)
          Retrieve a single request parameter from the request parameter list.
static RequestParameters getRequestParameters(javax.servlet.http.HttpServletRequest request, javax.servlet.ServletResponse response, SessionCookie cookie)
          Internal: Applications should not use this method.
static RequestParameters getRequestParameters(javax.servlet.jsp.PageContext pageContext)
          Retrieve the list of request parameters.
static java.lang.String getStructAttributeName(AttributeDef attrDef, AttributeDef subAttrDef)
          Build an attribute path for a Struct domain
static void internalSetAttribute(java.lang.String sName, AttributeList attrList, AttributeDef attrDef, RequestParameters params, LocaleContext locale)
          Internal: Applications should not use this method.
static void registerORDrenderer(javax.servlet.http.HttpSession session)
          Internal: Applications should not use this method.
static void releaseRequestParameters(javax.servlet.jsp.PageContext pageContext)
          Internal: Applications should not use this method.
static void setAttributeFromRequest(Row row, AttributeDef attrDef, javax.servlet.http.HttpServletRequest request, LocaleContext locale)
          Internal: Applications should not use this method.
static void setAttributeFromRequestParameters(Row row, AttributeDef attrDef, RequestParameters params, LocaleContext locale)
          Internal: Applications should not use this method.
static java.lang.String treatInvalidCharacter(java.lang.String x)
          Format a String to be readable by a JavaScript method
static void updateRowAttributesFromRequestParameters(DataSource ds, Row row, RequestParameters params)
          Internal: Applications should not use this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DISP_RENDERER_KEY

public static final java.lang.String DISP_RENDERER_KEY
The field type value for Display renderer

EDIT_RENDERER_KEY

public static final java.lang.String EDIT_RENDERER_KEY
The field type value for Edit renderer

ORD_DISPLAYRENDERER_CLASSNAME

public static final java.lang.String ORD_DISPLAYRENDERER_CLASSNAME
Default Intermedia Display renderer class name

ORD_EDITRENDERER_CLASSNAME

public static final java.lang.String ORD_EDITRENDERER_CLASSNAME
Default Intermedia Edit renderer class name

ORD_PARAM

public static final java.lang.String ORD_PARAM
Internal: Applications should not use this field.
Key to identify request paramater list in the page context

NULLSTRING

public static final java.lang.String NULLSTRING
Internal: Applications should not use this field.
Constructor Detail

HtmlServices

public HtmlServices()
Method Detail

getRequestParameters

public static RequestParameters getRequestParameters(javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.ServletResponse response,
                                                     SessionCookie cookie)
                                              throws java.io.IOException
Internal: Applications should not use this method.

Retrieve the list of request parameters


releaseRequestParameters

public static void releaseRequestParameters(javax.servlet.jsp.PageContext pageContext)
Internal: Applications should not use this method.

Release resources associated with the request parameters list


getRequestParameters

public static RequestParameters getRequestParameters(javax.servlet.jsp.PageContext pageContext)
Retrieve the list of request parameters. This method know how to deal with multipart contentype.
Used by the Datatags library and the component tag JSP file. The parameters list is cached in the page context for the duration of the request.

Parameters:
pageContext - PageContext of the current JSP
Returns:
The list of parameters
See Also:
RequestParameters

getRequestParameter

public static java.lang.String getRequestParameter(javax.servlet.jsp.PageContext pageContext,
                                                   java.lang.String key)
Retrieve a single request parameter from the request parameter list.

Parameters:
pageContext - PageContext of the current JSP
key - name of the request parameter to retrieve
Returns:
The value of the parameter

updateRowAttributesFromRequestParameters

public static void updateRowAttributesFromRequestParameters(DataSource ds,
                                                            Row row,
                                                            RequestParameters params)
                                                     throws java.lang.InstantiationException,
                                                            java.lang.IllegalAccessException
Internal: Applications should not use this method.

internalSetAttribute

public static void internalSetAttribute(java.lang.String sName,
                                        AttributeList attrList,
                                        AttributeDef attrDef,
                                        RequestParameters params,
                                        LocaleContext locale)
Internal: Applications should not use this method.

setAttributeFromRequestParameters

public static void setAttributeFromRequestParameters(Row row,
                                                     AttributeDef attrDef,
                                                     RequestParameters params,
                                                     LocaleContext locale)
                                              throws java.lang.IllegalAccessException,
                                                     java.lang.InstantiationException
Internal: Applications should not use this method.

setAttributeFromRequest

public static void setAttributeFromRequest(Row row,
                                           AttributeDef attrDef,
                                           javax.servlet.http.HttpServletRequest request,
                                           LocaleContext locale)
                                    throws java.lang.IllegalAccessException,
                                           java.lang.InstantiationException
Internal: Applications should not use this method.

getHiddenAttributeName

public static java.lang.String getHiddenAttributeName(java.lang.String attrName)
Build the name of the hidden field used to store the original value of an attribute

Parameters:
attrName - Name of the attribute
Returns:
html hidden field name

registerORDrenderer

public static void registerORDrenderer(javax.servlet.http.HttpSession session)
Internal: Applications should not use this method.

getRendererKeyFromDomainName

public static java.lang.String getRendererKeyFromDomainName(java.lang.String className,
                                                            java.lang.String type)
Build a string key from a Domain class name

This key is used to identify the renderer associated with a Domain.

Parameters:
className - Class name of the domain
type - Renderer type ("DISPLAY" or "EDIT")
Returns:
html hidden field name

getFieldRendererFromClassName

public static HTMLFieldRenderer getFieldRendererFromClassName(java.lang.String sClassName,
                                                              javax.servlet.jsp.PageContext page)
Load and instanciate a Renderer class

Errors are reported to a servlet log file.

Parameters:
className - Class name of the renderer
page - pageContext PageContext of the current JSP
Returns:
HTMLFieldRenderer instance

getStructAttributeName

public static java.lang.String getStructAttributeName(AttributeDef attrDef,
                                                      AttributeDef subAttrDef)
Build an attribute path for a Struct domain

Parameters:
attrDef - Attribute definition of the Struct class
subAttrDef - Attribute definition of the attribute inside the Struct class
Returns:
a path to identify the sub-attribute

getArrayAttributeName

public static java.lang.String getArrayAttributeName(AttributeDef attrDef,
                                                     int i)
Build an attribute path for a Array domain

Parameters:
attrDef - Attribute definition of the Array class
i - index of the current Array element
Returns:
a path to identify the array element

treatInvalidCharacter

public static java.lang.String treatInvalidCharacter(java.lang.String x)
Format a String to be readable by a JavaScript method

Replace \ by \\, ' by \' and " by \".

Parameters:
x - string to format
Returns:
formatted string

Business Components