org.trails.finder
Class BaseBlockFinder

java.lang.Object
  extended by org.trails.finder.BaseBlockFinder
All Implemented Interfaces:
BlockFinder
Direct Known Subclasses:
EditorBlockFinder

public class BaseBlockFinder
extends java.lang.Object
implements BlockFinder


Constructor Summary
BaseBlockFinder()
           
 
Method Summary
 org.apache.tapestry.components.Block findBlock(org.apache.tapestry.IRequestCycle cycle, IPropertyDescriptor descriptor)
          Return the block for the specified property
 org.apache.tapestry.util.ComponentAddress findBlockAddress(IPropertyDescriptor descriptor)
           
protected  org.apache.tapestry.util.ComponentAddress findBlockAddress(java.util.Map<java.lang.String,org.apache.tapestry.util.ComponentAddress> map, IPropertyDescriptor descriptor)
           
 org.apache.tapestry.util.ComponentAddress getDefaultBlockAddress()
           
 java.util.Map<java.lang.String,org.apache.tapestry.util.ComponentAddress> getEditorMap()
           
 void setDefaultBlockAddress(org.apache.tapestry.util.ComponentAddress defaultEditor)
           
 void setEditorMap(java.util.Map<java.lang.String,org.apache.tapestry.util.ComponentAddress> editorMap)
          This a map where the keys are ognl expressions and the values are component address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseBlockFinder

public BaseBlockFinder()
Method Detail

getEditorMap

public java.util.Map<java.lang.String,org.apache.tapestry.util.ComponentAddress> getEditorMap()

setEditorMap

public void setEditorMap(java.util.Map<java.lang.String,org.apache.tapestry.util.ComponentAddress> editorMap)
This a map where the keys are ognl expressions and the values are component address.

Parameters:
editorMap -

findBlockAddress

public org.apache.tapestry.util.ComponentAddress findBlockAddress(IPropertyDescriptor descriptor)
Specified by:
findBlockAddress in interface BlockFinder
Parameters:
descriptor -
Returns:
The first component address in the editorMap whose key evaluates to true for descriptor. This will be used to load an editor for the descriptor. Returns default editor if no match is found.
See Also:
BlockFinder.findBlockAddress(org.trails.descriptor.IPropertyDescriptor)

findBlockAddress

protected org.apache.tapestry.util.ComponentAddress findBlockAddress(java.util.Map<java.lang.String,org.apache.tapestry.util.ComponentAddress> map,
                                                                     IPropertyDescriptor descriptor)

findBlock

public org.apache.tapestry.components.Block findBlock(org.apache.tapestry.IRequestCycle cycle,
                                                      IPropertyDescriptor descriptor)
Description copied from interface: BlockFinder
Return the block for the specified property

Specified by:
findBlock in interface BlockFinder
Returns:

getDefaultBlockAddress

public org.apache.tapestry.util.ComponentAddress getDefaultBlockAddress()
Specified by:
getDefaultBlockAddress in interface BlockFinder

setDefaultBlockAddress

public void setDefaultBlockAddress(org.apache.tapestry.util.ComponentAddress defaultEditor)


Copyright © 2004-2008. All Rights Reserved.