Package org.apache.tapestry5.services
Interface BeanBlockSource
- 
- All Known Implementing Classes:
 BeanBlockSourceImpl
@UsesConfiguration(BeanBlockContribution.class) public interface BeanBlockSource
A source ofBlocks used to display the properties of a bean (used by theGridcomponent), or to edit the properties of a bean (used by theBeanEditFormcomponent). Contributions to this service (a configuration ofBeanBlockContributions) define what properties may be editted. Blocks are accessed in terms of a data type a string that identifies the type of data to be editted, such as "string", "date", "boolean", etc. Tapestry contributes a number of default data types and corresponding edit and display blocks. TheBeanBlockOverrideSourceservice allows these to be overridden. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockgetDisplayBlock(String datatype)Returns a block which can be used to render output for the given data type.BlockgetEditBlock(String datatype)Returns a block which can be used to render an editor for the given data type, in the form of a field label and input field.booleanhasDisplayBlock(String datatype)Checks to see if there is a display block for the indicated data type. 
 - 
 
- 
- 
Method Detail
- 
getEditBlock
Block getEditBlock(String datatype)
Returns a block which can be used to render an editor for the given data type, in the form of a field label and input field.- Parameters:
 datatype- logical name for the type of data to be displayed- Returns:
 - the Block
 - Throws:
 RuntimeException- if no appropriate block is available
 
- 
getDisplayBlock
Block getDisplayBlock(String datatype)
Returns a block which can be used to render output for the given data type.- Parameters:
 datatype- logical name for the type of data to be displayed- Returns:
 - the Block
 - Throws:
 RuntimeException- if no appropriate block is available
 
- 
hasDisplayBlock
boolean hasDisplayBlock(String datatype)
Checks to see if there is a display block for the indicated data type.- Parameters:
 datatype- to check for- Returns:
 - true if a block is available
 
 
 - 
 
 -