OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adf.view.js.base
Class AdfFacesMessage

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.base.AdfFacesMessage

public class AdfFacesMessage
extends AdfObject
Implementation of the AdfFacesMessage class in Javascript. This class intentionally has the same API as the Trinidad TrFacesMessage with the exception of the message types. Conversion of the getSeverity and setSeverity is done automatically for message types.



Field Summary

private Object
_detail
private Object
_messageType
private Object
_summary
public static Object
TYPE_CONFIRMATION
public static Object
TYPE_ERROR
public static Object
TYPE_FATAL
public static Object
TYPE_INFO
public static Object
TYPE_WARNING


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfFacesMessage(Number messageType, String summary, String detail)
Implementation of the AdfFacesMessage class in Javascript.


Method Summary

public String
getDetail()
Returns the detail for this message.
public Number
getMessageType()
Returns the message type
public Number
getSeverity()
Returns the severity for this message.
public static Number
getSeverity(Number type)
Returns a faces severity for a given type.
public String
getSummary()
Returns the summary for this message.
public static Number
getType(Number severity)
Returns a message type for a given severity.
public static Number
getTypeFromMessage(TrFacesMessage message)
This method detects whether a message is an AdfFacesMessage or a normal faces message and returns the appropriate message type.
protected Object
Init(Number messageType, String summary, String detail)
Executes the constructor logic.
public Object
setDetail(String detail)
Sets the detail message
public Object
setMessageType(Number type)
Sets the messageType for this object.
public Object
setSeverity(Number severity)
Sets the severity for this object.
public Object
setSummary(String summary)
Sets the summary message


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

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


Field Detail


_detail

private Object _detail

_messageType

private Object _messageType

_summary

private Object _summary

TYPE_CONFIRMATION

public static Object TYPE_CONFIRMATION

TYPE_ERROR

public static Object TYPE_ERROR

TYPE_FATAL

public static Object TYPE_FATAL

TYPE_INFO

public static Object TYPE_INFO

TYPE_WARNING

public static Object TYPE_WARNING

Constructor Detail


AdfFacesMessage

public AdfFacesMessage(Number messageType,
                       String summary,
                       String detail)

Implementation of the AdfFacesMessage class in Javascript. This class intentionally has the same API as the Trinidad TrFacesMessage with the exception of the message types. Conversion of the getSeverity and setSeverity is done automatically for message types.

Parameters:
messageType  -  the type of message
summary  -  the summary line for this message
detail  -  the detail line for this message

Method Detail


getDetail

public String getDetail()

Returns the detail for this message. Returns the summary if detail is null or empty string.

Return:
String - the message detail

getMessageType

public Number getMessageType()

Returns the message type

Return:
Number - the message type

getSeverity

public Number getSeverity()

Returns the severity for this message. In general the rich renderkit will use messageType instead.

Return:
Number - the FacesMessage severity of this message

getSeverity

public static Number getSeverity(Number type)

Returns a faces severity for a given type. The valid types are:
  • AdfFacesMessage.TYPE_INFO
  • AdfFacesMessage.TYPE_CONFIRMATION
  • AdfFacesMessage.TYPE_WARNING
  • AdfFacesMessage.TYPE_ERROR
  • AdfFacesMessage.TYPE_FATAL

Parameters:
type  -  the message type
Return:
Number - the severity for the given message type

getSummary

public String getSummary()

Returns the summary for this message.

Return:
String - the message summary

getType

public static Number getType(Number severity)

Returns a message type for a given severity. The severity types are:
  • TrFacesMessage.SEVERITY_INFO
  • TrFacesMessage.SEVERITY_CONFIRMATION
  • TrFacesMessage.SEVERITY_WARNING
  • TrFacesMessage.SEVERITY_ERROR
  • TrFacesMessage.SEVERITY_FATAL

Parameters:
severity  -  the severity to find the type for
Return:
Number - the message type for the given severity

getTypeFromMessage

public static Number getTypeFromMessage(TrFacesMessage message)

This method detects whether a message is an AdfFacesMessage or a normal faces message and returns the appropriate message type.

Parameters:
message  -  the faces message or AdfFacesMessage to check
Return:
Number - the valid message type

Init

protected Object Init(Number messageType,
                      String summary,
                      String detail)

Executes the constructor logic.

Parameters:
messageType  -  the type of message
summary  -  the summary line for this message
detail  -  the detail line for this message
Return:
Object
Overrides:
AdfObject.Init()

setDetail

public Object setDetail(String detail)

Sets the detail message

Parameters:
detail  -  the detail message
Return:
Object

setMessageType

public Object setMessageType(Number type)

Sets the messageType for this object.

Parameters:
type  -  the AdfFacesMessage type
Return:
Object

setSeverity

public Object setSeverity(Number severity)

Sets the severity for this object. When the severity is set, the MessageType is set to a default value for this severity. In general the Rich renderkit will want to set the message type, but this method is provided in order to maintain compatibility with the TrFacesMessage object in trinidad.

Parameters:
severity  -  the TrFacesMessage severity
Return:
Object

setSummary

public Object setSummary(String summary)

Sets the summary message

Parameters:
summary  -  the summary message
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.