OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adfinternal.view.js.laf.dhtml.rich
Class AdfMessageUtils

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adfinternal.view.js.laf.dhtml.rich.AdfMessageUtils

public class AdfMessageUtils
extends AdfObject
Singleton utility class for ADF Faces messaging.



Field Summary

private static Object
_ALL_LINK_STYLE_CLASS
private static Object
_COMBINED_MESSAGES_INTRO_LABEL
private static Object
_COMPACT_TYPE_SUMMARY
private static Object
_COMPONENT_LEVEL_MESSAGE_LABEL
private static Object
_COMPONENT_MESSAGE_LINK_STYLE_CLASS
private static Object
_COMPONENT_MESSAGES_INTRO_LABEL
private static Object
_CONTENT_STYLE_CLASS
private static Object
_DETAIL_STYLE_CLASS
private static Object
_DISABLED_STYLE_CLASS
private static Object
_FOOTER_END_STYLE_CLASS
private static Object
_FOOTER_START_STYLE_CLASS
private static Object
_FOOTER_STYLE_CLASS
private static Object
_INTRO_STYLE_CLASS
private Object
_jumpToAllMessagesHandlerStub
private Object
_jumpToMessageHandlerStub
private static Object
_MESSAGE_GROUP_TITLE_STYLE_CLASS
private static Object
_MESSAGE_GROUP_TYPE_SEPARATOR_STYLE_CLASS
private static Object
_MESSAGE_ICON
private Object
_messageCloseHandlerStub
private static Object
_MESSAGES_DETAIL_STYLE_CLASS
private static Object
_MESSAGES_ICON
private static Object
_MESSAGES_INTRO_STYLE_CLASS
private static Object
_MESSAGES_SUMMARY_STYLE_CLASS
private static Object
_MESSAGES_TYPE_STRING
private static Object
_NAVIGATOR_STYLE_CLASS
private static Object
_NEXT_LINK_STYLE_CLASS
private static Object
_NEXT_MESSAGE
private static Object
_PREVIOUS_LINK_STYLE_CLASS
private static Object
_PREVIOUS_MESSAGE
private static Object
_SET_FOCUS_ON_COMPONENT
private static Object
_SHOW_ALL_MESSAGES
private static Object
_SHOW_ALL_MESSAGES_TIP
private static Object
_STYLE_PROP
private static Object
_SUMMARY_STYLE_CLASS
private static Object
_TYPE_STRING
private static Object
_TYPE_STYLE_CLASS


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfMessageUtils()
Singleton utility class for ADF Faces messaging.


Method Summary

public static Object
addCSSClassName(HTMLElement elem, Number type)
Adds a style class to a particular element for a MessageType.
private static Object
_addMessageDomToTable(Object elem, Object message, Boolean compact, Boolean isMessages, Object hideIcon)
Adds dom for a message to an existing table.
private static Object
_addMessageWrapper(Object doc, HTMLElement outerTable, String componentClientId, Array messages, String title, Object hideIcon)
Called for messages components Adds a single message group to the given table element.
public static HTMLElement
appendComponentMessageInlineDom(HTMLElement element, Array messagesArray)
message (note no 's') dom content Constructs and retrieves the inline DOM for a particular component.
private static Object
_checkCompWithFor(Object component)
public static HTMLElement
getCombinedMessagesDom(String messageHandlerClientId, String messageOverride, Boolean globalOnly)
messages (note the 's') dom content Constructs and retrieves the DOM for a combined listing of page-level and component-level messages.
public static HTMLElement
getComponentMessagePopupDom(Object componentId)
TODO gcrawford constructs note window message dom This message should only be called if AdfMessageUtils.hasMessagePopupContent returns true Constructs and retrieves the popup DOM for a particular component.
public static HTMLElement
getComponentMessagePopupFooterDom(Object componentId)
Constructs the footer portion of the note window dom.
public static Object
getIcon(Number type, Boolean isMessages)
Retrieves a user-skinnable icon for a specific faces message type.
private static Object
_getIconKey(Object type, Object isMessages)
public static Object
getInstance()
private static HTMLElement
_getMessageDom(Object message, Boolean compact)
Returns a dom representation of a message.
public static String
getString(Number type, Boolean isMessages)
Returns a translated string for a given message type.
private static Object
_getStyleProperty(Object type)
Retrieves the private component state style class for a specific message type.
private static HTMLElement
_getTextDom(String text)
Helper for converting message text that might contain HTML decoration into a format that the message DOM will require.
public static Object
hasMessagePopupContent(Object componentId)
Checks 2 things - are there messages - if there are messages is there a message component overriding the popup content
public static Object
hasMessages(Object page, Object globalMessageCount, Object globalOnly)
protected static Object
HideMessagesDialog()
Utility to hide the combined messages dialog if applicable.
protected Object
Init()
Initializer.
public static Boolean
isPageLevelBoxNeeded(Object page, Object pageLevelMessages, Object globalOnly)
Are there messages to show in the page level message box?
private Object
_jumpToAllMessagesHandler(Event domEvent)
DOM event handler for jumping to the combined messages list.
private Object
_jumpToMessageHandler(Event domEvent)
DOM event handler for jumping to a specific component-level message indicated by the name property of the event target.
private Object
_messageCloseHandler(Event domEvent)
DOM event handler for the component-level message "close" button.
public static Object
messageGroupFocus(String messageGroupClientId)
Method called by the messages popup when the user clicks the a component-level message group title.
public static Object
removeCSSClassName(HTMLElement elem, Number type)
Removes a style class on a particular element for a MessageType.
public static Object
switchCSSClassName(HTMLElement elem, Number oldType, Number newType)
Removes a style class on a particular element for a MessageType and then adds a new one.
public static Object
switchIcon(HTMLElement elem, Number newType, Boolean isMessages)
Switches in the icon for the given messageType


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_ALL_LINK_STYLE_CLASS

private static Object _ALL_LINK_STYLE_CLASS

_COMBINED_MESSAGES_INTRO_LABEL

private static Object _COMBINED_MESSAGES_INTRO_LABEL

_COMPACT_TYPE_SUMMARY

private static Object _COMPACT_TYPE_SUMMARY

_COMPONENT_LEVEL_MESSAGE_LABEL

private static Object _COMPONENT_LEVEL_MESSAGE_LABEL

_COMPONENT_MESSAGE_LINK_STYLE_CLASS

private static Object _COMPONENT_MESSAGE_LINK_STYLE_CLASS

_COMPONENT_MESSAGES_INTRO_LABEL

private static Object _COMPONENT_MESSAGES_INTRO_LABEL

_CONTENT_STYLE_CLASS

private static Object _CONTENT_STYLE_CLASS

_DETAIL_STYLE_CLASS

private static Object _DETAIL_STYLE_CLASS

_DISABLED_STYLE_CLASS

private static Object _DISABLED_STYLE_CLASS

_FOOTER_END_STYLE_CLASS

private static Object _FOOTER_END_STYLE_CLASS

_FOOTER_START_STYLE_CLASS

private static Object _FOOTER_START_STYLE_CLASS

_FOOTER_STYLE_CLASS

private static Object _FOOTER_STYLE_CLASS

_INTRO_STYLE_CLASS

private static Object _INTRO_STYLE_CLASS

_jumpToAllMessagesHandlerStub

private Object _jumpToAllMessagesHandlerStub

_jumpToMessageHandlerStub

private Object _jumpToMessageHandlerStub

_MESSAGE_GROUP_TITLE_STYLE_CLASS

private static Object _MESSAGE_GROUP_TITLE_STYLE_CLASS

_MESSAGE_GROUP_TYPE_SEPARATOR_STYLE_CLASS

private static Object _MESSAGE_GROUP_TYPE_SEPARATOR_STYLE_CLASS

_MESSAGE_ICON

private static Object _MESSAGE_ICON

_messageCloseHandlerStub

private Object _messageCloseHandlerStub

_MESSAGES_DETAIL_STYLE_CLASS

private static Object _MESSAGES_DETAIL_STYLE_CLASS

_MESSAGES_ICON

private static Object _MESSAGES_ICON

_MESSAGES_INTRO_STYLE_CLASS

private static Object _MESSAGES_INTRO_STYLE_CLASS

_MESSAGES_SUMMARY_STYLE_CLASS

private static Object _MESSAGES_SUMMARY_STYLE_CLASS

_MESSAGES_TYPE_STRING

private static Object _MESSAGES_TYPE_STRING

_NAVIGATOR_STYLE_CLASS

private static Object _NAVIGATOR_STYLE_CLASS

_NEXT_LINK_STYLE_CLASS

private static Object _NEXT_LINK_STYLE_CLASS

_NEXT_MESSAGE

private static Object _NEXT_MESSAGE

_PREVIOUS_LINK_STYLE_CLASS

private static Object _PREVIOUS_LINK_STYLE_CLASS

_PREVIOUS_MESSAGE

private static Object _PREVIOUS_MESSAGE

_SET_FOCUS_ON_COMPONENT

private static Object _SET_FOCUS_ON_COMPONENT

_SHOW_ALL_MESSAGES

private static Object _SHOW_ALL_MESSAGES

_SHOW_ALL_MESSAGES_TIP

private static Object _SHOW_ALL_MESSAGES_TIP

_STYLE_PROP

private static Object _STYLE_PROP

_SUMMARY_STYLE_CLASS

private static Object _SUMMARY_STYLE_CLASS

_TYPE_STRING

private static Object _TYPE_STRING

_TYPE_STYLE_CLASS

private static Object _TYPE_STYLE_CLASS

Constructor Detail


AdfMessageUtils

public AdfMessageUtils()

Singleton utility class for ADF Faces messaging.

Method Detail


addCSSClassName

public static Object addCSSClassName(HTMLElement elem,
                                     Number type)

Adds a style class to a particular element for a MessageType. These are the p_AFXXX styles.

Parameters:
elem  -  a dom element
type  -  the message type
Return:
Object

_addMessageDomToTable

private static Object _addMessageDomToTable(Object elem,
                                            Object message,
                                            Boolean compact,
                                            Boolean isMessages,
                                            Object hideIcon)

Adds dom for a message to an existing table.

Parameters:
elem    
message  -  either a FacesMessage or an AdfFacesMessage object
compact  -  true if to use a minimal layout, false for detailed
isMessages  -  whether this is for a messages component. Should be false for message, true for messages.
hideIcon    
Return:
Object

_addMessageWrapper

private static Object _addMessageWrapper(Object doc,
                                         HTMLElement outerTable,
                                         String componentClientId,
                                         Array messages,
                                         String title,
                                         Object hideIcon)

Called for messages components Adds a single message group to the given table element.

Parameters:
doc    
outerTable  -  the DOM element to add the message to
componentClientId  -  the client ID of the message group or null if page-level
messages  -  the page's list of messages
title  -  the message group title or null if unknown
hideIcon    
Return:
Object

appendComponentMessageInlineDom

public static HTMLElement appendComponentMessageInlineDom(HTMLElement element,
                                                          Array messagesArray)

message (note no 's') dom content Constructs and retrieves the inline DOM for a particular component. For example, DOM that is constructed for use inside of message popup selectors.

Parameters:
element  -  the DOM element to append messages to
messagesArray  -  the array of messages for a particular component
Return:
HTMLElement - the message DOM or null if no messages are present

_checkCompWithFor

private static Object _checkCompWithFor(Object component)

Parameters:
component    
Return:
Object

getCombinedMessagesDom

public static HTMLElement getCombinedMessagesDom(String messageHandlerClientId,
                                                 String messageOverride,
                                                 Boolean globalOnly)

messages (note the 's') dom content Constructs and retrieves the DOM for a combined listing of page-level and component-level messages.

Parameters:
messageHandlerClientId  -  the client ID of the message handler component
messageOverride  -  the override for the message or null if to use the default
globalOnly  -  true if only page-level messages should be shown, false otherwise
Return:
HTMLElement - the DOM for combined listing of messages or null if no messages are present

getComponentMessagePopupDom

public static HTMLElement getComponentMessagePopupDom(Object componentId)

TODO gcrawford constructs note window message dom This message should only be called if AdfMessageUtils.hasMessagePopupContent returns true Constructs and retrieves the popup DOM for a particular component. For example, DOM that is constructed for use inside of message popup selectors.

Parameters:
componentId    
Return:
HTMLElement - the message DOM or null if no messages are present

getComponentMessagePopupFooterDom

public static HTMLElement getComponentMessagePopupFooterDom(Object componentId)

Constructs the footer portion of the note window dom. This message should only be called if AdfMessageUtils.hasMessagePopupContent returns true

Parameters:
componentId    
Return:
HTMLElement - the message DOM or null if no messages are present

getIcon

public static Object getIcon(Number type,
                             Boolean isMessages)

Retrieves a user-skinnable icon for a specific faces message type.

Parameters:
type  -  a faces message type
isMessages  -  whether this is for a messages component. Should be false for message, true for messages.
Return:
Object - the non-null icon element for the specified message type

_getIconKey

private static Object _getIconKey(Object type,
                                  Object isMessages)

Parameters:
type    
isMessages    
Return:
Object

getInstance

public static Object getInstance()

Return:
Object

_getMessageDom

private static HTMLElement _getMessageDom(Object message,
                                          Boolean compact)

Returns a dom representation of a message.

Parameters:
message  -  either a FacesMessage or an AdfFacesMessage object.
compact  -  true if to use a minimal layout, false for detailed
Return:
HTMLElement - a table containing the message

getString

public static String getString(Number type,
                               Boolean isMessages)

Returns a translated string for a given message type.

Parameters:
type  -  the message type
isMessages  -  whether this is for a messages component. Should be false for message, true for messages.
Return:
String - the translated string for the given message type

_getStyleProperty

private static Object _getStyleProperty(Object type)

Retrieves the private component state style class for a specific message type.

Parameters:
type    
Return:
Object - the private style class for the specified message type or null if not defined

_getTextDom

private static HTMLElement _getTextDom(String text)

Helper for converting message text that might contain HTML decoration into a format that the message DOM will require.

Parameters:
text  -  the message text which may contain HTML markup
Return:
HTMLElement - the resulting DOM for display in the message DOM container

hasMessagePopupContent

public static Object hasMessagePopupContent(Object componentId)

Checks 2 things - are there messages - if there are messages is there a message component overriding the popup content

Parameters:
componentId    
Return:
Object

hasMessages

public static Object hasMessages(Object page,
                                 Object globalMessageCount,
                                 Object globalOnly)

Parameters:
page    
globalMessageCount    
globalOnly    
Return:
Object

HideMessagesDialog

protected static Object HideMessagesDialog()

Utility to hide the combined messages dialog if applicable. The message handler may or may not allow hiding of the combined messages. If it is not allowed, this function will essentially perform no detectable operation.

Return:
Object

Init

protected Object Init()

Initializer.

Return:
Object
Overrides:
AdfObject.Init()

isPageLevelBoxNeeded

public static Boolean isPageLevelBoxNeeded(Object page,
                                           Object pageLevelMessages,
                                           Object globalOnly)

Are there messages to show in the page level message box?

Parameters:
page    
pageLevelMessages    
globalOnly    
Return:
Boolean - return true if the page level box needed

_jumpToAllMessagesHandler

private Object _jumpToAllMessagesHandler(Event domEvent)

DOM event handler for jumping to the combined messages list.

Parameters:
domEvent  -  the DOM event
Return:
Object

_jumpToMessageHandler

private Object _jumpToMessageHandler(Event domEvent)

DOM event handler for jumping to a specific component-level message indicated by the name property of the event target.

Parameters:
domEvent  -  the DOM event
Return:
Object

_messageCloseHandler

private Object _messageCloseHandler(Event domEvent)

DOM event handler for the component-level message "close" button.

Parameters:
domEvent  -  the DOM event
Return:
Object

messageGroupFocus

public static Object messageGroupFocus(String messageGroupClientId)

Method called by the messages popup when the user clicks the a component-level message group title.

Parameters:
messageGroupClientId  -  the client ID of the component that the message group is associated with
Return:
Object

removeCSSClassName

public static Object removeCSSClassName(HTMLElement elem,
                                        Number type)

Removes a style class on a particular element for a MessageType. These are the p_AFXXX styles.

Parameters:
elem  -  a dom element
type  -  the message type
Return:
Object

switchCSSClassName

public static Object switchCSSClassName(HTMLElement elem,
                                        Number oldType,
                                        Number newType)

Removes a style class on a particular element for a MessageType and then adds a new one. If either the oldType or the newType are null then this class does not remove or add the style respectively.

Parameters:
elem  -  a dom element
oldType  -  the old message type or null if there is no old message type
newType  -  the new message type or null if there is no new message type
Return:
Object

switchIcon

public static Object switchIcon(HTMLElement elem,
                                Number newType,
                                Boolean isMessages)

Switches in the icon for the given messageType

Parameters:
elem  -  the current icon dom element
newType  -  the faces message type of the new icon
isMessages  -  whether this is for a messages component. Should be false for message, true for messages.
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.08.31 02:41 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.