Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


oracle.jbo.html
Class HtmlServices

java.lang.Object
  extended byoracle.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
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
static java.lang.String getArrayAttributeName(AttributeDef attrDef, int i)
Build an attribute path for a Array domain
static java.lang.String getAttributeStringValue(Row row, AttributeDef aDef, LocaleContext localeContext)
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 OrdHttpUploadFormData getOrdFormData(javax.servlet.http.HttpServletRequest request)
Gets the OrdHttpUploadFormData object stored in HttpServletRequest.
static java.lang.Object getOrdObject(AttributeDef attrDef, OrdFileSource tempFile, Row row, ApplicationModule am, java.lang.String mimeType)
Deprecated. since 10.1.2 see oracle.ord.im.OrdDomainUtil
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 boolean isMultipartPost(javax.servlet.http.HttpServletRequest request)
Decides whether the HttpRequest is "multipart/form-data".
static boolean isOrdDomainType(AttributeDef attrDef)
static boolean isStrutsContext(javax.servlet.jsp.PageContext pageContext)
Check if the current context is in a Struts application
static void registerORDrenderer(javax.servlet.http.HttpSession session)
Deprecated. Since 10.1.2
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.
static void updateRowAttributesFromRequestParameters(ViewObject vo, 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
See Also:
Constant Field Values

EDIT_RENDERER_KEY

public static final java.lang.String EDIT_RENDERER_KEY
The field type value for Edit renderer
See Also:
Constant Field Values

ORD_DISPLAYRENDERER_CLASSNAME

public static final java.lang.String ORD_DISPLAYRENDERER_CLASSNAME
Default Intermedia Display renderer class name
See Also:
Constant Field Values

ORD_EDITRENDERER_CLASSNAME

public static final java.lang.String ORD_EDITRENDERER_CLASSNAME
Default Intermedia Edit renderer class name
See Also:
Constant Field Values

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
See Also:
Constant Field Values

NULLSTRING

public static final java.lang.String NULLSTRING
Internal: Applications should not use this field.
See Also:
Constant Field Values

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

Throws:
java.io.IOException

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.
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

updateRowAttributesFromRequestParameters

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

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.
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException

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.
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException

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

getOrdObject

public static java.lang.Object getOrdObject(AttributeDef attrDef,
                                            OrdFileSource tempFile,
                                            Row row,
                                            ApplicationModule am,
                                            java.lang.String mimeType)
                                     throws java.lang.InstantiationException,
                                            java.lang.IllegalAccessException
Deprecated. since 10.1.2 see oracle.ord.im.OrdDomainUtil
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

registerORDrenderer

public static void registerORDrenderer(javax.servlet.http.HttpSession session)
Deprecated. Since 10.1.2
Internal: Applications should not use this method.
See Also:
ORDRegisterer

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:
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

isStrutsContext

public static boolean isStrutsContext(javax.servlet.jsp.PageContext pageContext)
Check if the current context is in a Struts application
Parameters:
pageContext -
Returns:
true if in Struts

isOrdDomainType

public static boolean isOrdDomainType(AttributeDef attrDef)

isMultipartPost

public static boolean isMultipartPost(javax.servlet.http.HttpServletRequest request)
Decides whether the HttpRequest is "multipart/form-data".

getAttributeStringValue

public static java.lang.String getAttributeStringValue(Row row,
                                                       AttributeDef aDef,
                                                       LocaleContext localeContext)

getOrdFormData

public static OrdHttpUploadFormData getOrdFormData(javax.servlet.http.HttpServletRequest request)
Gets the OrdHttpUploadFormData object stored in HttpServletRequest. This method should only be used after HtmlServices.getRequestParameters(HttpServletRequest, ServletResponse, SessionCookie); is called.
Parameters:
request - the HttpServletRequest object
Returns:
an OrdHttpUploadFormData object if the HTTP request is a "multipart/form-data" POST request; null otherwise.

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-02


Copyright © 1997, 2005, Oracle. All rights reserved.