net.sf.beanform
Class BeanForm

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by net.sf.beanform.BeanFormComponent
                  extended by net.sf.beanform.BeanForm
All Implemented Interfaces:
EventListener, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, PageDetachListener, IComponent, IDirect, IRender, ITemplateComponent

public abstract class BeanForm
extends BeanFormComponent
implements PageDetachListener, IDirect

A form that provides edit capabilities for a Java Bean.

Author:
Daniel Gredler

Field Summary
static String BEAN_FORM_ATTRIBUTE
           
 
Constructor Summary
BeanForm()
           
 
Method Summary
 void addBody(IRender element)
           
protected  void cleanup()
           
 Map<String,IBinding> extractBindingOverrides(String prefix)
           
abstract  Object getBean()
           
protected  BeanForm getBeanForm()
          Obvious shortcut.
 List<BeanProperty> getBeanProperties()
           
 Object getBeanSafely()
           
abstract  boolean getCacheProperties()
           
abstract  IActionListener getCancel()
           
abstract  IActionListener getDelete()
           
abstract  String getExclude()
           
 Map<String,IBinding> getFieldBindingsFor(BeanProperty property)
           
 boolean getIsInsideAForm()
           
 boolean getIsNotCustomized()
           
abstract  String getProperties()
           
 BeanProperty getProperty()
          This method exists only for the convenience of users who wish to reference the current property from within OGNL binding overrides that are applied to all property input fields.
abstract  IActionListener getRefresh()
           
abstract  IActionListener getSave()
           
protected  void init()
           
 void pageDetached(PageEvent event)
           
protected  void renderComponent(IMarkupWriter writer, IRequestCycle cycle)
          All low level BeanForm components expect to be able to retrieve their containing BeanForm during the render phase.
abstract  void setBean(Object bean)
           
abstract  void setCacheProperties(boolean cacheProperties)
           
abstract  void setCancel(IActionListener cancel)
           
abstract  void setDelete(IActionListener delete)
           
abstract  void setExclude(String exclude)
           
abstract  void setProperties(String properties)
           
abstract  void setRefresh(IActionListener refresh)
           
abstract  void setSave(IActionListener save)
           
 void trigger(IRequestCycle cycle)
          All low level BeanForm components expect to be able to retrieve their containing BeanForm during the rewind phase.
 
Methods inherited from class net.sf.beanform.BeanFormComponent
getCustomField, getCustomFieldBlock, getCustomFieldBlockName, getCustomFieldName, getPropertySelectionModel, getSiblingComponent, hasCustomField, hasPropertySelectionModel
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
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.IDirect
isStateful
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
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
 

Field Detail

BEAN_FORM_ATTRIBUTE

public static final String BEAN_FORM_ATTRIBUTE
Constructor Detail

BeanForm

public BeanForm()
Method Detail

getBean

public abstract Object getBean()

setBean

public abstract void setBean(Object bean)

getProperties

public abstract String getProperties()

setProperties

public abstract void setProperties(String properties)

getExclude

public abstract String getExclude()

setExclude

public abstract void setExclude(String exclude)

getCacheProperties

public abstract boolean getCacheProperties()

setCacheProperties

public abstract void setCacheProperties(boolean cacheProperties)

getSave

public abstract IActionListener getSave()

setSave

public abstract void setSave(IActionListener save)

getCancel

public abstract IActionListener getCancel()

setCancel

public abstract void setCancel(IActionListener cancel)

getRefresh

public abstract IActionListener getRefresh()

setRefresh

public abstract void setRefresh(IActionListener refresh)

getDelete

public abstract IActionListener getDelete()

setDelete

public abstract void setDelete(IActionListener delete)

addBody

public void addBody(IRender element)
Specified by:
addBody in interface IComponent
Overrides:
addBody in class AbstractComponent

pageDetached

public void pageDetached(PageEvent event)
Specified by:
pageDetached in interface PageDetachListener

getIsInsideAForm

public boolean getIsInsideAForm()

getIsNotCustomized

public boolean getIsNotCustomized()

getBeanSafely

public Object getBeanSafely()

getBeanProperties

public List<BeanProperty> getBeanProperties()

getFieldBindingsFor

public Map<String,IBinding> getFieldBindingsFor(BeanProperty property)

extractBindingOverrides

public Map<String,IBinding> extractBindingOverrides(String prefix)

getBeanForm

protected BeanForm getBeanForm()
Obvious shortcut.

Overrides:
getBeanForm in class BeanFormComponent
See Also:
BeanFormComponent.getBeanForm()

getProperty

public BeanProperty getProperty()
This method exists only for the convenience of users who wish to reference the current property from within OGNL binding overrides that are applied to all property input fields. It could be done without this method, but the user would have to know the ID of the contained BeanFormRows component.


renderComponent

protected void renderComponent(IMarkupWriter writer,
                               IRequestCycle cycle)
All low level BeanForm components expect to be able to retrieve their containing BeanForm during the render phase.

Overrides:
renderComponent in class BaseComponent
See Also:
BeanFormComponent.getBeanForm()

trigger

public void trigger(IRequestCycle cycle)
All low level BeanForm components expect to be able to retrieve their containing BeanForm during the rewind phase.

Specified by:
trigger in interface IDirect
See Also:
BeanFormComponent.getBeanForm(), IDirect.trigger(IRequestCycle)

init

protected void init()

cleanup

protected void cleanup()


Copyright © 2006 Daniel Gredler. All Rights Reserved.