org.trails.descriptor
Class BaseBlockFinder

java.lang.Object
  extended by org.trails.descriptor.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)
           
 org.apache.tapestry.util.ComponentAddress getDefaultBlockAddress()
           
 java.util.Map getEditorMap()
           
 void setDefaultBlockAddress(org.apache.tapestry.util.ComponentAddress defaultEditor)
           
 void setEditorMap(java.util.Map 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 getEditorMap()

setEditorMap

public void setEditorMap(java.util.Map 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:
org.trails.descriptor.BlockFinder#findBlockAdress(org.trails.descriptor.IPropertyDescriptor)

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)
Specified by:
setDefaultBlockAddress in interface BlockFinder


Copyright © 2004-2007. All Rights Reserved.