NextApp Echo3
v3.0.b4

nextapp.echo.webcontainer.sync.component
Class AbstractListComponentPeer

java.lang.Object
  extended by nextapp.echo.webcontainer.AbstractComponentSynchronizePeer
      extended by nextapp.echo.webcontainer.sync.component.AbstractListComponentPeer
All Implemented Interfaces:
ComponentSynchronizePeer
Direct Known Subclasses:
ListBoxPeer, SelectFieldPeer

public class AbstractListComponentPeer
extends AbstractComponentSynchronizePeer

Base synchronization peer for AbstractListComponents.


Nested Class Summary
static class AbstractListComponentPeer.ListDataPeer
          Server-to-client serialization peer for ListData objects.
 
Nested classes/interfaces inherited from class nextapp.echo.webcontainer.AbstractComponentSynchronizePeer
AbstractComponentSynchronizePeer.EventPeer
 
Constructor Summary
AbstractListComponentPeer()
          Default constructor.
 
Method Summary
 java.lang.String getClientComponentType(boolean shortType)
          Returns the remote client component type name.
 java.lang.Class getComponentClass()
          Returns the (most basic) supported component class.
 java.lang.Class getInputPropertyClass(java.lang.String propertyName)
          Returns null.
 java.lang.Object getOutputProperty(nextapp.echo.app.util.Context context, nextapp.echo.app.Component component, java.lang.String propertyName, int propertyIndex)
          Returns any property from the local style of the Component.
 java.lang.String getOutputPropertyMethodName(nextapp.echo.app.util.Context context, nextapp.echo.app.Component component, java.lang.String propertyName)
          Returns null.
 java.util.Iterator getUpdatedOutputPropertyNames(nextapp.echo.app.util.Context context, nextapp.echo.app.Component component, nextapp.echo.app.update.ServerComponentUpdate update)
          Returns property names that have been updated in the specified ServerComponentUpdate that are either part of the local style or have been added via the addOutputProperty() method.
 void init(nextapp.echo.app.util.Context context, nextapp.echo.app.Component component)
          Invokes the init() methods of peers of required component classes (added via addRequiredComponentClass()).
 void storeInputProperty(nextapp.echo.app.util.Context context, nextapp.echo.app.Component component, java.lang.String propertyName, int index, java.lang.Object newValue)
          Does nothing.
 
Methods inherited from class nextapp.echo.webcontainer.AbstractComponentSynchronizePeer
addEvent, addOutputProperty, addOutputProperty, addRequiredComponentClass, getEventDataClass, getEventTypes, getOutputPropertyIndices, getOutputPropertyNames, hasListeners, hasUpdatedListeners, isOutputPropertyIndexed, isOutputPropertyReferenced, processEvent, setOutputPropertyReferenced
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractListComponentPeer

public AbstractListComponentPeer()
Default constructor. Installs additional output properties.

Method Detail

getClientComponentType

public java.lang.String getClientComponentType(boolean shortType)
Description copied from interface: ComponentSynchronizePeer
Returns the remote client component type name.

Parameters:
shortType - flag indicating whether short type or normal type name should be returned
Returns:
the client component type name
See Also:
ComponentSynchronizePeer.getClientComponentType(boolean)

getComponentClass

public java.lang.Class getComponentClass()
Description copied from class: AbstractComponentSynchronizePeer
Returns the (most basic) supported component class.

Specified by:
getComponentClass in interface ComponentSynchronizePeer
Specified by:
getComponentClass in class AbstractComponentSynchronizePeer
Returns:
the (most basic) supported component class
See Also:
ComponentSynchronizePeer.getComponentClass()

getInputPropertyClass

public java.lang.Class getInputPropertyClass(java.lang.String propertyName)
Description copied from class: AbstractComponentSynchronizePeer
Returns null. Implementations receiving input properties should override.

Specified by:
getInputPropertyClass in interface ComponentSynchronizePeer
Overrides:
getInputPropertyClass in class AbstractComponentSynchronizePeer
Parameters:
propertyName - the name of the property
Returns:
the property Class
See Also:
AbstractComponentSynchronizePeer.getInputPropertyClass(java.lang.String)

getOutputProperty

public java.lang.Object getOutputProperty(nextapp.echo.app.util.Context context,
                                          nextapp.echo.app.Component component,
                                          java.lang.String propertyName,
                                          int propertyIndex)
Description copied from class: AbstractComponentSynchronizePeer
Returns any property from the local style of the Component. Implementations should override if they wish to support additional properties.

Specified by:
getOutputProperty in interface ComponentSynchronizePeer
Overrides:
getOutputProperty in class AbstractComponentSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
component - the Component being rendered
propertyName - the name of the property being rendered
propertyIndex - the property index (only relevant for indexed properties, -1 will be provided for non-indexed properties)
Returns:
the property value
See Also:
AbstractComponentSynchronizePeer.getOutputProperty( nextapp.echo.app.util.Context, nextapp.echo.app.Component, java.lang.String, int)

getOutputPropertyMethodName

public java.lang.String getOutputPropertyMethodName(nextapp.echo.app.util.Context context,
                                                    nextapp.echo.app.Component component,
                                                    java.lang.String propertyName)
Description copied from class: AbstractComponentSynchronizePeer
Returns null. Implementations should override if they wish to set properties on the client by invoking specific methods other than setProperty()/setIndexedProperty().

Specified by:
getOutputPropertyMethodName in interface ComponentSynchronizePeer
Overrides:
getOutputPropertyMethodName in class AbstractComponentSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
component - the component
propertyName - the property name
Returns:
the property name
See Also:
AbstractComponentSynchronizePeer.getOutputPropertyMethodName( nextapp.echo.app.util.Context, nextapp.echo.app.Component, java.lang.String)

getUpdatedOutputPropertyNames

public java.util.Iterator getUpdatedOutputPropertyNames(nextapp.echo.app.util.Context context,
                                                        nextapp.echo.app.Component component,
                                                        nextapp.echo.app.update.ServerComponentUpdate update)
Description copied from class: AbstractComponentSynchronizePeer
Returns property names that have been updated in the specified ServerComponentUpdate that are either part of the local style or have been added via the addOutputProperty() method.

Specified by:
getUpdatedOutputPropertyNames in interface ComponentSynchronizePeer
Overrides:
getUpdatedOutputPropertyNames in class AbstractComponentSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
component - the component
update - the ServerComponentUpdate being rendered
Returns:
an Iterator of property names to update on the client
See Also:
AbstractComponentSynchronizePeer.getUpdatedOutputPropertyNames( nextapp.echo.app.util.Context, nextapp.echo.app.Component, nextapp.echo.app.update.ServerComponentUpdate)

init

public void init(nextapp.echo.app.util.Context context,
                 nextapp.echo.app.Component component)
Description copied from class: AbstractComponentSynchronizePeer
Invokes the init() methods of peers of required component classes (added via addRequiredComponentClass()). Implementations requiring initialization should override this method and invoke the super-implementation out of convention (even if they do not presently have any dependencies on other components).

Specified by:
init in interface ComponentSynchronizePeer
Overrides:
init in class AbstractComponentSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ServerMessage
component - the component being rendered
See Also:
ComponentSynchronizePeer.init(nextapp.echo.app.util.Context, Component)

storeInputProperty

public void storeInputProperty(nextapp.echo.app.util.Context context,
                               nextapp.echo.app.Component component,
                               java.lang.String propertyName,
                               int index,
                               java.lang.Object newValue)
Description copied from class: AbstractComponentSynchronizePeer
Does nothing. Implementations that receive input from the client should override this method.

Specified by:
storeInputProperty in interface ComponentSynchronizePeer
Overrides:
storeInputProperty in class AbstractComponentSynchronizePeer
Parameters:
context - the relevant Context, provides standard contextual information described in class description, in addition to the following:
  • ClientMessage
  • ClientUpdateManager
component - the updated Component
propertyName - the name of the property
index - the index of the property (or -1 in the typical case of a non-indexed property)
newValue - the new value of the property
See Also:
AbstractComponentSynchronizePeer.storeInputProperty( nextapp.echo.app.util.Context, nextapp.echo.app.Component, java.lang.String, int, java.lang.Object)

NextApp Echo3
v3.0.b4