1 15 package org.apache.tapestry.contrib.table.components; 16 17 import org.apache.hivemind.ApplicationRuntimeException; 18 import org.apache.tapestry.IRequestCycle; 19 import org.apache.tapestry.contrib.table.model.ITableRowSource; 20 21 28 public abstract class AbstractTableRowComponent extends AbstractTableViewComponent 29 { 30 public ITableRowSource getTableRowSource() 31 { 32 IRequestCycle objCycle = getPage().getRequestCycle(); 33 34 Object objSourceObj = objCycle.getAttribute(ITableRowSource.TABLE_ROW_SOURCE_ATTRIBUTE); 35 ITableRowSource objSource = (ITableRowSource) objSourceObj; 36 37 if (objSource == null) 38 throw new ApplicationRuntimeException( 39 "The component " 40 + getId() 41 + " must be contained within an ITableRowSource component, such as TableRows", 42 this, 43 null, 44 null); 45 46 return objSource; 47 } 48 49 } 50 | Popular Tags |