Class f_core

Object
  extended by f_core

public class f_core
extends Object

f_core class


Method Summary
static String AddParameter(String url, String parameterName, String... parameterValue)
           
static void Assert(boolean expr, String message)
          Throws a message if the expression is true.
static void ComputeDialogPosition(Object parameters)
          Compute the popup position.
static void Debug(String name, String message, Error exception)
           
static void Error(String name, String message, Error exception)
           
static HTMLElement FindComponent(String id, HTMLDocument doc)
          Find a child by its identifier.
static String GetCookieValue(String cookieName, HTMLDocument doc)
           
static Object GetDocumentSize(Object values, Document doc)
          Returns the size of the document.
static HTMLElement GetElementByClientId(String id, HTMLDocument doc)
          Find a child by its identifier.
static HTMLElement GetElementById(String id, HTMLDocument document)
          Deprecated.  
static Object GetViewPosition(HTMLDocument doc)
          Returns the position of the Window.
static Object GetViewSize(Object values, HTMLDocument doc)
          Returns the size of the View.
static void Info(String name, String message, Error exception)
           
static boolean IsAppendMode(Event evt)
           
static boolean IsAppendRangeMode(Event evt)
           
static boolean IsDebugEnabled(String name)
          Is debug logging currently enabled ?
static boolean IsErrorEnabled(String name)
           Is error logging currently enabled ?
static boolean IsInfoEnabled(String name)
           Is info logging currently enabled ?
static boolean IsTraceEnabled(String name)
          Is trace logging currently enabled ?
static boolean IsWarnEnabled(String name)
           Is warning logging currently enabled ?
static Map ListParameters(String url)
           
static Window OpenWindow(Window win, Object parameters, boolean modal)
           
static void ProfileExit(Window win)
           
static void ReportError(String tokenId)
           
static boolean SetCookieValue(String cookieName, String cookieValue, HTMLDocument doc)
           
static boolean SetFocus(HTMLElement component, boolean asyncMode)
           
static void ShowComponent(HTMLElement component)
           
static void ShowVersion()
           
static boolean Submit(String url, String dest, HTMLElement elt, f_event event, Object createWindowParameters, any closeWindow, any modal)
           
static boolean SubmitCloseWindow(f_event event)
          Submit the page, and close the window.
static boolean SubmitEvent(f_event event)
           
static boolean SubmitModalDialog(String dest, Object createWindowParameters, f_event event)
          Submit the page, and open a new window to show the response.
static boolean SubmitOpenWindow(String dest, Object createWindowParameters, boolean modal, f_event event)
          Submit the page, and open a new window to show the response.
static void Trace(String name, String message, Error exception)
           
static boolean ValidateForm(HTMLElement component)
           
static void Warn(String name, String message, Error exception)
           
static String f_getName()
           
static String toString()
          Returns a string representing the specified object.
 
Methods inherited from class Object
toString
 

Method Detail

SetCookieValue

public static boolean SetCookieValue(String cookieName,
                                     String cookieValue,
                                     HTMLDocument doc)
Parameters:
cookieName -
cookieValue - Value to associate with cookie, or null to delete cookie !
doc - Html document
Returns:
Returns true if success.

GetViewPosition

public static Object GetViewPosition(HTMLDocument doc)
Returns the position of the Window.

Parameters:
doc -
Returns:
Object which defines 2 fields: x and y

AddParameter

public static String AddParameter(String url,
                                  String parameterName,
                                  String... parameterValue)
Parameters:
url -
parameterName -
parameterValue -

SubmitOpenWindow

public static boolean SubmitOpenWindow(String dest,
                                       Object createWindowParameters,
                                       boolean modal,
                                       f_event event)
Submit the page, and open a new window to show the response.

Parameters:
dest - Window name.
createWindowParameters -
modal - Modal state
event - Event if any.
Returns:
true if success.

OpenWindow

public static Window OpenWindow(Window win,
                                Object parameters,
                                boolean modal)
Parameters:
win - A specific Window or null
parameters -
modal - Modal State

ReportError

public static void ReportError(String tokenId)
Parameters:
tokenId -

IsAppendMode

public static boolean IsAppendMode(Event evt)
Parameters:
evt -

ValidateForm

public static boolean ValidateForm(HTMLElement component)
Parameters:
component -

FindComponent

public static HTMLElement FindComponent(String id,
                                        HTMLDocument doc)
Find a child by its identifier. (The naming separator IS ':')

Parameters:
id - The identifier of the component. (naming separator is ':')
doc - The document.

GetDocumentSize

public static Object GetDocumentSize(Object values,
                                     Document doc)
Returns the size of the document.

Parameters:
values -
doc -
Returns:
Object which defines 2 fields: width and height

ShowComponent

public static void ShowComponent(HTMLElement component)
Parameters:
component -

ComputeDialogPosition

public static void ComputeDialogPosition(Object parameters)
Compute the popup position. (centred horizontaly and verticaly)

Parameters:
parameters - Fill fields "x" and "y" into the "parameters" object.

Trace

public static void Trace(String name,
                         String message,
                         Error exception)
Parameters:
name - Log name.
message - The message.
exception - An exception if any.

IsWarnEnabled

public static boolean IsWarnEnabled(String name)

Is warning logging currently enabled ?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than info.

Parameters:
name - Log name.
Returns:
true if info logging is enabled.

Debug

public static void Debug(String name,
                         String message,
                         Error exception)
Parameters:
name - Log name.
message - The message.
exception - An exception if any.

ShowVersion

public static void ShowVersion()

SubmitCloseWindow

public static boolean SubmitCloseWindow(f_event event)
Submit the page, and close the window.

Parameters:
event -
Returns:
true if success.

Warn

public static void Warn(String name,
                        String message,
                        Error exception)
Parameters:
name - Log name.
message - The message.
exception - An exception if any.

GetElementByClientId

public static HTMLElement GetElementByClientId(String id,
                                               HTMLDocument doc)
Find a child by its identifier. (The naming separator might not be ':')

Parameters:
id - The identifier of the component. (naming separator might not be is ':')
doc - Document.

IsAppendRangeMode

public static boolean IsAppendRangeMode(Event evt)
Parameters:
evt -

Assert

public static void Assert(boolean expr,
                          String message)
Throws a message if the expression is true.

Parameters:
expr - Expression.
message - The message.

SubmitModalDialog

public static boolean SubmitModalDialog(String dest,
                                        Object createWindowParameters,
                                        f_event event)
Submit the page, and open a new window to show the response.

Parameters:
dest - Window name.
createWindowParameters -
event - Event if any.
Returns:
true if success.

GetViewSize

public static Object GetViewSize(Object values,
                                 HTMLDocument doc)
Returns the size of the View.

Parameters:
values - Object which will contain the result or null.
doc -
Returns:
Object which defines 2 fields: width and height

f_getName

public static String f_getName()

GetElementById

public static HTMLElement GetElementById(String id,
                                         HTMLDocument document)
Deprecated. 

Find a child by its identifier. (The naming separator might not be ':')

Parameters:
id - The identifier of the component. (naming separator might not be is ':')
document -

SetFocus

public static boolean SetFocus(HTMLElement component,
                               boolean asyncMode)
Parameters:
component -
asyncMode -
Returns:
true is success !

GetCookieValue

public static String GetCookieValue(String cookieName,
                                    HTMLDocument doc)
Parameters:
cookieName -
doc - Html document.
Returns:
value associated to the cookie, or null.

toString

public static String toString()
Description copied from class: Object
Returns a string representing the specified object.

Overrides:
toString in class Object

Submit

public static boolean Submit(String url,
                             String dest,
                             HTMLElement elt,
                             f_event event,
                             Object createWindowParameters,
                             any closeWindow,
                             any modal)
Parameters:
url - or f_event object
dest - Window name.
elt -
event -
createWindowParameters -
Returns:
Boolean closeWindow

SubmitEvent

public static boolean SubmitEvent(f_event event)
Parameters:
event -
Returns:
true if success.

IsErrorEnabled

public static boolean IsErrorEnabled(String name)

Is error logging currently enabled ?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than error.

Parameters:
name - Log name.
Returns:
true if error logging is enabled.

IsDebugEnabled

public static boolean IsDebugEnabled(String name)

Is debug logging currently enabled ?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than debug.

Parameters:
name - Log name.
Returns:
true if debug logging is enabled.

ListParameters

public static Map ListParameters(String url)
Parameters:
url -

Error

public static void Error(String name,
                         String message,
                         Error exception)
Parameters:
name - Log name.
message - The message.
exception - An exception if any.

IsTraceEnabled

public static boolean IsTraceEnabled(String name)

Is trace logging currently enabled ?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than trace.

Parameters:
name - Log name.
Returns:
true if debug logging is enabled.

Info

public static void Info(String name,
                        String message,
                        Error exception)
Parameters:
name - Log name.
message - The message.
exception - An exception if any.

ProfileExit

public static void ProfileExit(Window win)
Parameters:
win -

IsInfoEnabled

public static boolean IsInfoEnabled(String name)

Is info logging currently enabled ?

Call this method to prevent having to perform expensive operations (for example, String concatenation) when the log level is more than info.

Parameters:
name - Log name.
Returns:
true if info logging is enabled.