NextApp Echo
App Container 1.1.4

nextapp.echoservlet
Class ClientObjects

java.lang.Object
  extended bynextapp.echoservlet.ClientObjects

public class ClientObjects
extends java.lang.Object

General-purpose constants and class methods used in the generation of HTML and JavaScript code for the client browser.


Field Summary
static java.lang.String COMPONENT_ID_PREFIX
          The standard prefix prepended to component Ids.
static java.lang.String CONTROLLER_FRAME_NAME
          The name of the JavaScript Controller frame.
static java.lang.String IMAGE_NAME_PREFIX
          The standard prefix prepended to image names.
static java.lang.String PARAMETER_ID
          The standard prefix prepended to Ids.
static java.lang.String STD_PREFIX
          The standard prefix that is prepended to all client-side variables and method names.
 
Method Summary
static void addServiceIdFormElement(Connection conn, Service service, Element form)
          Adds a hidden parameter field to the form containing the service Id.
static java.lang.String getImageName(Id id)
          Returns the JavaScript name of the image identified by the given Id.
static java.lang.String getObjectName(Id id)
          Returns the JavaScript name of the component identified by the given Id.
static java.lang.String getServiceUri(Connection conn, Service service)
          Returns the URI of the specified service in relation to the specified Connection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STD_PREFIX

public static final java.lang.String STD_PREFIX
The standard prefix that is prepended to all client-side variables and method names. Appending this standard prefix is necessary--as browsers continually expand their built-in JavaScript capabilities--to avoid method conflicts. This does have a negative effect on the aesthetics of JavaScript code, but it has proven to be very necessary such that Echo doesn't have to be updated every time a browser company issues a service pack.

See Also:
Constant Field Values

COMPONENT_ID_PREFIX

public static final java.lang.String COMPONENT_ID_PREFIX
The standard prefix prepended to component Ids.

See Also:
Constant Field Values

IMAGE_NAME_PREFIX

public static final java.lang.String IMAGE_NAME_PREFIX
The standard prefix prepended to image names.

See Also:
Constant Field Values

PARAMETER_ID

public static final java.lang.String PARAMETER_ID
The standard prefix prepended to Ids.

See Also:
Constant Field Values

CONTROLLER_FRAME_NAME

public static final java.lang.String CONTROLLER_FRAME_NAME
The name of the JavaScript Controller frame.

See Also:
Constant Field Values
Method Detail

getObjectName

public static java.lang.String getObjectName(Id id)
Returns the JavaScript name of the component identified by the given Id.

Parameters:
id - The Id of the ComponentPeer.
Returns:
The component's JavaScript name.

getImageName

public static java.lang.String getImageName(Id id)
Returns the JavaScript name of the image identified by the given Id.

Parameters:
id - The Id of the image.
Returns:
The image's JavaScript name.

getServiceUri

public static java.lang.String getServiceUri(Connection conn,
                                             Service service)
Returns the URI of the specified service in relation to the specified Connection.


addServiceIdFormElement

public static void addServiceIdFormElement(Connection conn,
                                           Service service,
                                           Element form)
Adds a hidden parameter field to the form containing the service Id.

Parameters:
conn - The connection to which the rendered HTML document that contains the specified form Element will be written.
service - The service that requires a hidden parameter field.
form - The form that will contain the hidden parameter field.

NextApp Echo
App Container 1.1.4