Bug 187761 Table in grid which from library can not preview[01]
Description: Table in grid which from library can not preview[01] Step: 1.New a library, new a sample datasource and dataset 2.Insert a grid and insert the table whick binding the dataset in grid cell 3.New a report and use this library. 4.Drop the grid that from library into layout 5.preview Actual result: Exception pop up at org.eclipse.birt.report.model.elements.TableItem.getColumnPosition4Cell(TableItem.java:207) at org.eclipse.birt.report.model.elements.strategy.CellPropSearchStrategy.getPropertyFromColumn(CellPropSearchStrategy.java:155) at org.eclipse.birt.report.model.elements.strategy.CellPropSearchStrategy.getColumnProperty(CellPropSearchStrategy.java:117) at org.eclipse.birt.report.model.elements.strategy.CellPropSearchStrategy.getPropertyRelatedToContainer(CellPropSearchStrategy.java:85) at org.eclipse.birt.report.model.core.PropertySearchStrategy.getPropertyExceptRomDefault(PropertySearchStrategy.java:100) at org.eclipse.birt.report.model.core.DesignElement.getProperty(DesignElement.java:927) at org.eclipse.birt.report.model.core.DesignElement.getProperty(DesignElement.java:903) at org.eclipse.birt.report.model.api.DesignElementHandle.getProperty(DesignElementHandle.java:229) at org.eclipse.birt.report.model.api.PropertyHandle.getValue(PropertyHandle.java:111) at org.eclipse.birt.report.model.api.SimpleValueHandle.getListValue(SimpleValueHandle.java:139) at org.eclipse.birt.report.model.api.PropertyHandle.getListValue(PropertyHandle.java:539) at org.eclipse.birt.report.model.api.StructureIterator.<init>(StructureIterator.java:62) at org.eclipse.birt.report.model.api.SimpleValueHandle.iterator(SimpleValueHandle.java:310) at org.eclipse.birt.report.model.api.StyleHandle.mapRulesIterator(StyleHandle.java:1457) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.setMap(EngineIRVisitor.java:1770) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitDataItem(EngineIRVisitor.java:623) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitDataItem(DesignVisitor.java:993) at org.eclipse.birt.report.model.elements.DataItem.apply(DataItem.java:59) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitCell(EngineIRVisitor.java:1168) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitCell(DesignVisitor.java:1077) at org.eclipse.birt.report.model.elements.Cell.apply(Cell.java:81) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitRow(EngineIRVisitor.java:1086) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitRow(DesignVisitor.java:1101) at org.eclipse.birt.report.model.elements.TableRow.apply(TableRow.java:75) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.createTableBand(EngineIRVisitor.java:1421) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitTable(EngineIRVisitor.java:774) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitTable(DesignVisitor.java:1053) at org.eclipse.birt.report.model.elements.TableItem.apply(TableItem.java:80) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitCell(EngineIRVisitor.java:1168) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitCell(DesignVisitor.java:1077) at org.eclipse.birt.report.model.elements.Cell.apply(Cell.java:81) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitRow(EngineIRVisitor.java:1086) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitRow(DesignVisitor.java:1101) at org.eclipse.birt.report.model.elements.TableRow.apply(TableRow.java:75) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitGrid(EngineIRVisitor.java:653) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitGrid(DesignVisitor.java:1113) at org.eclipse.birt.report.model.elements.GridItem.apply(GridItem.java:121) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.visitReportDesign(EngineIRVisitor.java:325) at org.eclipse.birt.report.model.api.DesignVisitor$Forwarder.visitReportDesign(DesignVisitor.java:1175) at org.eclipse.birt.report.model.elements.ReportDesign.apply(ReportDesign.java:89) at org.eclipse.birt.report.model.api.DesignVisitor.apply(DesignVisitor.java:123) at org.eclipse.birt.report.engine.parser.EngineIRVisitor.translate(EngineIRVisitor.java:237) at org.eclipse.birt.report.engine.parser.ReportParser.parse(ReportParser.java:177) at org.eclipse.birt.report.engine.api.impl.ReportRunnable.getReportIR(ReportRunnable.java:199) at org.eclipse.birt.report.engine.executor.ExecutionContext.getReport(ExecutionContext.java:685) at org.eclipse.birt.report.engine.executor.ReportExecutor.<init>(ReportExecutor.java:78) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:149) at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:124) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source) at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(Unknown Source)
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/ElementStructureUtil.java
Iterator childIter = new ContentIterator( module, element );
		while ( childIter.hasNext( ) )
		{
			DesignElement virtualParent = (DesignElement) parentIter.next( );
			DesignElement virtualChild = (DesignElement) childIter.next( );
			assert virtualChild.getDefn( ).getName( ) == virtualChild.getDefn( )
					.getName( );
			assert virtualParent.getID( ) > 0;
			idMap.put( new Long( virtualParent.getID( ) ), virtualChild );
		}
		return idMap;
	}
	/**
	 * Break the relationship between the given element to its parent.Set all
	 * properties values of the given element on the element locally. The
	 * following properties will be set:
	 * <ul>
	 * <li>Properties set on element itself
	 * <li>Inherited from style or element's selector style
	 * <li>Inherited from parent
	 * </ul>
	 * 
	 * @param module
	 * 
	 * @param element
	 *            the element to be localized.
	 */
	public static void localizeElement( Module module, DesignElement element )
	{
		assert element != null;