The statements that the block defines are executed in sequence.
3233343536373839404142
String pageName = componentClassResolver.resolvePageClassNameToPageName(pageClass); final Page page = this.pageCache.get(pageName); final Block block = page.getRootElement().getBlock( contribution.getBlockId()); result.add(block); } return result;
4041424344454647484950
return overrideSource.hasDisplayBlock(datatype) || masterSource.hasDisplayBlock(datatype); } public Block getDisplayBlock(String datatype) { Block result = overrideSource.getDisplayBlock(datatype); if (result == null) result = masterSource.getDisplayBlock(datatype); if (result == null)
5354555657585960616263
return result; } public Block getEditBlock(String datatype) { Block result = overrideSource.getEditBlock(datatype); if (result == null) result = masterSource.getEditBlock(datatype); if (result == null)
} @Test public void false_test_renders_else_block() { Block block = mockBlock(); replay(); If component = new If();
8283848586878889909192
{ Page page = newPage(PAGE_NAME); Component component = mockComponent(); ComponentModel model = mockComponentModel(); TypeCoercer coercer = mockTypeCoercer(); Block block = mockBlock(); Logger logger = mockLogger(); Instantiator ins = newInstantiator(component, model); train_getLogger(model, logger);
144145146147148149150151152153154155
{ Page page = newPage(PAGE_NAME); Component component = mockComponent(); ComponentModel model = mockComponentModel(); TypeCoercer coercer = mockTypeCoercer(); Block block1 = mockBlock(); Block block2 = mockBlock(); Logger logger = mockLogger(); train_getLogger(model, logger); Instantiator ins = newInstantiator(component, model);
233234235236237238239240241242243
} public Block getBlockForColumn() { Block override = overrides.getOverrideBlock(columnModel.getId() + "Header"); if (override != null) return override; return standardHeader; }
7677787980818283848586
* Invoked from subclasses to do the rendering. The subclass controls the naming convention for locating an * overriding Block parameter (it is the name of the property possibly suffixed with a value). */ protected Object renderPropertyValue(MarkupWriter writer, String overrideBlockId) { Block override = overrides.getOverrideBlock(overrideBlockId); if (override != null) return override; String datatype = model.getDataType();