nextapp.echoservlet
Class ContentPaneUI

java.lang.Object
  extended by nextapp.echoservlet.AbstractComponentPeer
      extended by nextapp.echoservlet.AbstractPaneUI
          extended by nextapp.echoservlet.ContentPaneUI
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, ComponentPeer, PaneUI, Service
Direct Known Subclasses:
AsynchContentPaneUI

public class ContentPaneUI
extends AbstractPaneUI
implements PaneUI, java.beans.PropertyChangeListener, Service

A peer object for ContentPanes. This class is responsible for rendering HTML documents that contain rendered components.

See Also:
Serialized Form

Field Summary
static StaticText SERVICE_CONTENT_PANE_SCRIPT
          A JavaScript include that contains functionality required for content panes, such as functions that input and action components will use to notify the server of updated state.
static StaticText SERVICE_DETECT_SCRIPT
           
static StaticText SERVICE_KEY_ACTION_COMMAND_SCRIPT
          A service that will provide the JavaScript used to manage a keyActionCommand's state.
static StaticText SERVICE_POPS_SCRIPT
           
static StaticText SERVICE_TIMER_SCRIPT
          A service that will provide the JavaScript used to manage a timer's state.
static StaticText SERVICE_X_SCRIPT
           
 
Fields inherited from interface nextapp.echoservlet.PaneUI
SCROLLING_ALWAYS, SCROLLING_AUTO, SCROLLING_NEVER
 
Fields inherited from interface nextapp.echoservlet.ComponentPeer
IGNORE_PROPERTY_CHANGE
 
Constructor Summary
ContentPaneUI()
          Creates a new ContentPaneUI.
 
Method Summary
static PleaseWaitRenderer getPleaseWaitRenderer()
           
static java.lang.String getScriptSetAction(java.lang.String id, java.lang.String command)
          Returns the JavaScript method call necessary to send an action command.
static java.lang.String getScriptSetAction(java.lang.String id, java.lang.String command, boolean async)
           
static java.lang.String getScriptSetParameter(java.lang.String id, java.lang.String value)
          Returns the JavaScript method call necessary to store a parameter in the Controller frame's hidden form.
 java.lang.String getScrolling()
          Returns the scrolling property of the pane.
 java.lang.String getUri(Connection conn)
          Returns the URI from which the pane's service may be rendered.
 boolean isRedrawEnabled()
           
static void processInitializeScripts(HtmlDocument doc, Connection conn)
           
 void propertyChange(java.beans.PropertyChangeEvent e)
           
 void registered()
          Called when the component is registered.
 void service(Connection conn)
          Services an HTTP request.
 void setRedrawEnabled(boolean redrawEnabled)
           
 void unregistered()
          Called when the component is unregistered.
 
Methods inherited from class nextapp.echoservlet.AbstractPaneUI
render
 
Methods inherited from class nextapp.echoservlet.AbstractComponentPeer
addAncillaryService, generateId, getCalculatedBackground, getCalculatedFont, getCalculatedForeground, getChildCount, getChildren, getComponent, getFocusedElementId, getId, getInstancePeer, getParentComponentPeer, getPeer, redraw, registerAncillaryServices, removeAncillaryService, setComponent, setId, setInstancePeer, unregisterAncillaryServices
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nextapp.echoservlet.PaneUI
getId
 
Methods inherited from interface nextapp.echoservlet.Service
getId
 

Field Detail

SERVICE_CONTENT_PANE_SCRIPT

public static final StaticText SERVICE_CONTENT_PANE_SCRIPT
A JavaScript include that contains functionality required for content panes, such as functions that input and action components will use to notify the server of updated state. This script will be referenced in every content pane.


SERVICE_KEY_ACTION_COMMAND_SCRIPT

public static final StaticText SERVICE_KEY_ACTION_COMMAND_SCRIPT
A service that will provide the JavaScript used to manage a keyActionCommand's state.


SERVICE_TIMER_SCRIPT

public static final StaticText SERVICE_TIMER_SCRIPT
A service that will provide the JavaScript used to manage a timer's state.


SERVICE_X_SCRIPT

public static final StaticText SERVICE_X_SCRIPT

SERVICE_POPS_SCRIPT

public static final StaticText SERVICE_POPS_SCRIPT

SERVICE_DETECT_SCRIPT

public static final StaticText SERVICE_DETECT_SCRIPT
Constructor Detail

ContentPaneUI

public ContentPaneUI()
Creates a new ContentPaneUI.

Method Detail

getScriptSetAction

public static java.lang.String getScriptSetAction(java.lang.String id,
                                                  java.lang.String command)
Returns the JavaScript method call necessary to send an action command. This method is called by components to generate script that will cause server interaction. For instance, a button that generates a link might make its element's "href" attribute: "javascript:E_setAction('4f', 'press')", such that the server would be notified that component '4f' triggered an action with the command 'press'. On the server, the ComponentPeer with Id '4f' would have its clientActionPerformed() method called with the parameter 'press'.

Parameters:
id - The Id of the component setting the action.
command - The action command that is to be sent.

getScriptSetAction

public static java.lang.String getScriptSetAction(java.lang.String id,
                                                  java.lang.String command,
                                                  boolean async)

getScriptSetParameter

public static java.lang.String getScriptSetParameter(java.lang.String id,
                                                     java.lang.String value)
Returns the JavaScript method call necessary to store a parameter in the Controller frame's hidden form. During the next server interaction, the data held in this hidden parameter will be provided to the ComponentPeer with the corresponding Id. The value will be sent as the parameter of a clientInput() method call.

Parameters:
id - The Id of the component setting the parameter.
value - The new value of the parameter.

getScrolling

public java.lang.String getScrolling()
Description copied from interface: PaneUI
Returns the scrolling property of the pane.

Specified by:
getScrolling in interface PaneUI
Returns:
The scrolling property of the pane, one of the following values:
  • SCROLLING_AUTO
  • SCROLLING_ALWAYS
  • SCROLLING_NEVER
See Also:
PaneUI.getScrolling()

getUri

public java.lang.String getUri(Connection conn)
Description copied from interface: PaneUI
Returns the URI from which the pane's service may be rendered.

Specified by:
getUri in interface PaneUI
Parameters:
conn - The connection from which to derive the URI.
Returns:
The URI from which the pane's service may be rendered.
See Also:
PaneUI.getUri(Connection)

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent e)
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
See Also:
PropertyChangeListener.propertyChange(PropertyChangeEvent)

registered

public void registered()
Description copied from class: AbstractComponentPeer
Called when the component is registered. This method should be overridden if necessary.

Specified by:
registered in interface ComponentPeer
Overrides:
registered in class AbstractComponentPeer
See Also:
ComponentPeer.registered()

service

public void service(Connection conn)
Description copied from interface: Service
Services an HTTP request. Information about the HTTP request as well as methods for issuing a response are available from the provided Connection object.

Specified by:
service in interface Service
Parameters:
conn - A Connection object which wraps HttpServletRequest and HttpServletResponse objects and provides access to the facilities of the Echo application container.
See Also:
Service.service(Connection)

processInitializeScripts

public static void processInitializeScripts(HtmlDocument doc,
                                            Connection conn)

unregistered

public void unregistered()
Description copied from class: AbstractComponentPeer
Called when the component is unregistered. This method should be overridden if necessary.

Specified by:
unregistered in interface ComponentPeer
Overrides:
unregistered in class AbstractComponentPeer
See Also:
ComponentPeer.unregistered()

isRedrawEnabled

public boolean isRedrawEnabled()

setRedrawEnabled

public void setRedrawEnabled(boolean redrawEnabled)

getPleaseWaitRenderer

public static PleaseWaitRenderer getPleaseWaitRenderer()