|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo2.webcontainer.syncpeer.ListComponentPeer
public class ListComponentPeer
ComponentSynchronizePeer
implementation for
AbstractListComponent
-based components.
This peer renders the content of list components in the
ServerMessage
's initialization section
(ServerMessage.GROUP_ID_INIT
) such that a single
rendering of content may be used by multiple list components
if possible.
This class should not be extended or used by classes outside of the Echo framework.
Field Summary | |
---|---|
static nextapp.echo2.webrender.Service |
LIST_COMPONENT_SERVICE
Service to provide supporting JavaScript library. |
Fields inherited from interface nextapp.echo2.webcontainer.ActionProcessor |
---|
ACTION_NAME, ACTION_VALUE |
Fields inherited from interface nextapp.echo2.webcontainer.PropertyUpdateProcessor |
---|
PROPERTY_NAME, PROPERTY_VALUE |
Constructor Summary | |
---|---|
ListComponentPeer()
Default constructor. |
Method Summary | |
---|---|
java.lang.String |
getContainerId(nextapp.echo2.app.Component child)
Returns the id of the HTML element in which the specified component should be rendered. |
void |
processAction(ContainerInstance ci,
nextapp.echo2.app.Component component,
org.w3c.dom.Element actionElement)
Notifies the ComponentSynchronizePeer that a client action
has occurred. |
void |
processPropertyUpdate(ContainerInstance ci,
nextapp.echo2.app.Component component,
org.w3c.dom.Element propertyElement)
Notifies the ComponentSynchronizePeer that a client property
update has occurred. |
void |
renderAdd(RenderContext rc,
nextapp.echo2.app.update.ServerComponentUpdate update,
java.lang.String targetId,
nextapp.echo2.app.Component component)
Renders a client update which adds an HTML representation of the provided component to the client DOM as a child of the HTML element identified by targetId . |
void |
renderDispose(RenderContext rc,
nextapp.echo2.app.update.ServerComponentUpdate update,
nextapp.echo2.app.Component component)
Renders a client update to dispose of resources/listeners created for the specified component on the client. |
void |
renderSetFocus(RenderContext rc,
nextapp.echo2.app.Component component)
Renders a directive to set the client input focus to the specified component. |
boolean |
renderUpdate(RenderContext rc,
nextapp.echo2.app.update.ServerComponentUpdate update,
java.lang.String targetId)
Renders the specified ServerComponentUpdate by adding and
removing children and updating properties of the specified
component . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final nextapp.echo2.webrender.Service LIST_COMPONENT_SERVICE
Constructor Detail |
---|
public ListComponentPeer()
Method Detail |
---|
public java.lang.String getContainerId(nextapp.echo2.app.Component child)
ComponentSynchronizePeer
component
should be rendered. The specified
component
must be an immediate child of
an instance of the class of component that this peer supports.
A child component's renderer may invoke this method to
determine where it should place its rendered content.
getContainerId
in interface ComponentSynchronizePeer
child
- a Component
whose parent is of the type
synchronized by this peer object.
ComponentSynchronizePeer.getContainerId(nextapp.echo2.app.Component)
public void processAction(ContainerInstance ci, nextapp.echo2.app.Component component, org.w3c.dom.Element actionElement)
ActionProcessor
ComponentSynchronizePeer
that a client action
has occurred.
processAction
in interface ActionProcessor
ci
- the relevant ContainerInstance
component
- the target Component
actionElement
- the XML element describing the action
(the name and value of the action may be obtained
by querying the ACTION_NAME
and
ACTION_VALUE
attribute values.ActionProcessor.processAction(nextapp.echo2.webcontainer.ContainerInstance,
nextapp.echo2.app.Component, org.w3c.dom.Element)
public void processPropertyUpdate(ContainerInstance ci, nextapp.echo2.app.Component component, org.w3c.dom.Element propertyElement)
PropertyUpdateProcessor
ComponentSynchronizePeer
that a client property
update has occurred.
processPropertyUpdate
in interface PropertyUpdateProcessor
ci
- the relevant ContainerInstance
component
- the target Component
propertyElement
- the XML element describing the property update
(the name and value of the changed property may be obtained
by querying the PROPERTY_NAME
and
PROPERTY_VALUE
attribute values.PropertyUpdateProcessor.processPropertyUpdate(nextapp.echo2.webcontainer.ContainerInstance,
nextapp.echo2.app.Component, org.w3c.dom.Element)
public void renderAdd(RenderContext rc, nextapp.echo2.app.update.ServerComponentUpdate update, java.lang.String targetId, nextapp.echo2.app.Component component)
ComponentSynchronizePeer
targetId
.
renderAdd
in interface ComponentSynchronizePeer
rc
- the relevant RenderContext
update
- the ServerComponentUpdate
for which this
operation is being performedtargetId
- the id of the HTML element in which the component's
HTML output should be renderedcomponent
- the component to be rendered (this component must
be of a type supported by this synchronization peer).ComponentSynchronizePeer.renderAdd(
nextapp.echo2.webcontainer.RenderContext, nextapp.echo2.app.update.ServerComponentUpdate,
java.lang.String, nextapp.echo2.app.Component)
public void renderDispose(RenderContext rc, nextapp.echo2.app.update.ServerComponentUpdate update, nextapp.echo2.app.Component component)
ComponentSynchronizePeer
renderUpdate()
method being invoked, and thus
implementations SHOULD NOT redundantly attempt
to remove the HTML in this method.
Implementations must handle the condition where the component to be
disposed is not present in the client DOM, as this method may be invoked
under such a condition.
renderDispose
in interface ComponentSynchronizePeer
rc
- the relevant RenderContext
update
- the ServerComponentUpdate
for which this
operation is being performedComponentSynchronizePeer.renderDispose(nextapp.echo2.webcontainer.RenderContext,
nextapp.echo2.app.update.ServerComponentUpdate, nextapp.echo2.app.Component)
public void renderSetFocus(RenderContext rc, nextapp.echo2.app.Component component)
FocusSupport
renderSetFocus
in interface FocusSupport
rc
- the relevant RenderContext
component
- the Component
to be focused.FocusSupport.renderSetFocus(nextapp.echo2.webcontainer.RenderContext, nextapp.echo2.app.Component)
public boolean renderUpdate(RenderContext rc, nextapp.echo2.app.update.ServerComponentUpdate update, java.lang.String targetId)
ComponentSynchronizePeer
ServerComponentUpdate
by adding and
removing children and updating properties of the specified
component
.
If the component is not a container, the implementation only needs to
analyze the updated properties of the component. If the component is
a container, the implementation should additionally query
update
for information about added children, removed
children, and children with updated LayoutData
states.
The implementation is responsible for rendering added children by
obtaining their ComponentSynchronizePeer
s and invoking their
renderAdd()
methods. Alternatively, if a child's
ComponentSynchronizePeer
implements the
DomUpdateSupport
interface, the implementation may invoke
the child peer's renderHtml()
method instead.
This method should return true if, in the course of its rendering operation, it has re-rendered the entire component hierarchy beneath the parent component of the update. Returning true will ensure that updates to descendants are NOT rendered. The method should return false in all cases if the component is not a container.
renderUpdate
in interface ComponentSynchronizePeer
rc
- the relevant RenderContext
update
- the ServerComponentUpdate
for which this
operation is being performedtargetId
- the id of the HTML element inside of which the
components HTML code should be rendered.
ComponentSynchronizePeer.renderUpdate(
nextapp.echo2.webcontainer.RenderContext, nextapp.echo2.app.update.ServerComponentUpdate, java.lang.String)
|
NextApp Echo2 v2.1.1 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |