org.apache.tapestry.form
Class ListEdit

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.form.ListEdit
All Implemented Interfaces:
Locatable, LocationHolder, IFormComponent, IComponent, IDirectEvent, IRender

public abstract class ListEdit
extends AbstractFormComponent

A specialized component used to edit a list of items within a form; it is similar to a Foreachbut leverages hidden inputs within the <form> to store the items in the list. [ Component Reference ]

Since:
1.0.2
Author:
Howard Lewis Ship

Field Summary
 
Fields inherited from class org.apache.tapestry.AbstractComponent
_clientId
 
Constructor Summary
ListEdit()
           
 
Method Summary
protected  boolean getCanTakeFocus()
          Returns false; ListEdit components can't take focus.
 String getClientId()
          Returns the component's client-side element id.
abstract  DataSqueezer getDataSqueezer()
           
 String getDisplayName()
          May be implemented to return a user-presentable, localized name for the component, which is used in labels or error messages.
abstract  String getElement()
           
abstract  IActionListener getListener()
           
abstract  ListenerInvoker getListenerInvoker()
          Injected.
abstract  Iterator getSource()
           
abstract  ValueConverter getValueConverter()
           
 boolean isDisabled()
          Returns true if the component is disabled.
protected  void render(IMarkupWriter writer, IRequestCycle cycle, Iterator i)
           
protected  void renderFormComponent(IMarkupWriter writer, IRequestCycle cycle)
          Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to render the component.
protected  void rewindFormComponent(IMarkupWriter writer, IRequestCycle cycle)
          Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the component.
abstract  void setIndex(int index)
           
abstract  void setValue(Object value)
           
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getForm, getIdParameter, getName, getRenderBodyOnRewind, isRequired, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, renderIdAttribute, setForm, setName, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, toString, triggerEvent
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

ListEdit

public ListEdit()
Method Detail

renderFormComponent

protected void renderFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Description copied from class: AbstractFormComponent
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to render the component.

Specified by:
renderFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.renderFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

rewindFormComponent

protected void rewindFormComponent(IMarkupWriter writer,
                                   IRequestCycle cycle)
Description copied from class: AbstractFormComponent
Invoked from AbstractFormComponent.renderComponent(IMarkupWriter, IRequestCycle) to rewind the component. If the component is disabled this will not be invoked.

Specified by:
rewindFormComponent in class AbstractFormComponent
See Also:
AbstractFormComponent.rewindFormComponent(org.apache.tapestry.IMarkupWriter, org.apache.tapestry.IRequestCycle)

render

protected void render(IMarkupWriter writer,
                      IRequestCycle cycle,
                      Iterator i)

getElement

public abstract String getElement()

getListener

public abstract IActionListener getListener()
Since:
2.2 *

isDisabled

public boolean isDisabled()
Description copied from interface: IFormComponent
Returns true if the component is disabled. This is important when the containing form is submitted, since disabled parameters do not update their bindings.

Since:
3.0 *

getSource

public abstract Iterator getSource()
Since:
4.0

setValue

public abstract void setValue(Object value)
Since:
4.0

setIndex

public abstract void setIndex(int index)
Since:
4.0

getDataSqueezer

public abstract DataSqueezer getDataSqueezer()
Since:
4.0

getValueConverter

public abstract ValueConverter getValueConverter()
Since:
4.0

getListenerInvoker

public abstract ListenerInvoker getListenerInvoker()
Injected.

Since:
4.0

getCanTakeFocus

protected boolean getCanTakeFocus()
Returns false; ListEdit components can't take focus.

Overrides:
getCanTakeFocus in class AbstractFormComponent
Since:
4.0

getClientId

public String getClientId()
Description copied from class: AbstractComponent
Returns the component's client-side element id. This has traditionally been an IFormComponent only binding but now applies to all components. The method should check to see if any id parameter/property has been set already and use that above all others, falling back to IComponent.getId() if nothing else is found.

Specified by:
getClientId in interface IFormComponent
Specified by:
getClientId in interface IComponent
Overrides:
getClientId in class AbstractComponent
Returns:
the id, or null if the component doesn't support a client id.

getDisplayName

public String getDisplayName()
Description copied from interface: IFormComponent
May be implemented to return a user-presentable, localized name for the component, which is used in labels or error messages. Most components simply return null.



Copyright © 2006 Apache Software Foundation. All Rights Reserved.