Bug 123722 Java based scripting -> getExpressionValue(int i) of IRowData returns unreasonable value
public void onPrepare( IRow row, IReportContext reportContext ) { try { row.setBookmark( "\"row-bookmark\"" ); System.out.println( row.getBookmark( ) ); } catch ( Exception e ) { e.printStackTrace( ); } } public void onCreate(IRowInstance rowInstance, IReportContext reportContext) { try { IRowData rowData = rowInstance.getRowData( ); Object int2 = rowData.getExpressionValue( 1 ); System.out.println( int2 ); } catch ( Exception e ) { e.printStackTrace( ); } } Consider the script above, according to Javadoc, rowData.getExpressionValue( 1 ) will return the first data expr. of the row, i.e. the value of the first column. However, it was noticed that "row-bookmark" was returned instead. And if i used rowData.getExpressionValue( 2 ), then i got the right value. So if it was the correct implementation, it should be clearly stated in Javadoc.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/TableItemExecutor.java
* @see org.eclipse.birt.report.engine.executor.ReportItemExecutor#execute(org.eclipse.birt.report.engine.ir.ReportItemDesign,
	 *      org.eclipse.birt.report.engine.emitter.IReportEmitter)
	 */
	public void execute( ReportItemDesign item, IContentEmitter emitter )
	{
		BirtTimer timer = new BirtTimer( );
		timer.start( );
		TableItemDesign tableDesign = (TableItemDesign) item;
		tableInfo = new TABLEINFO( tableDesign );
		logger.log( Level.FINEST, "start table item" ); 
		ITableContent tableContent = report.createTableContent( );
		assert ( tableContent instanceof TableContent );
		((TableContent)tableContent).setHeaderRepeat(tableDesign.getRepeatHeader());
		IContent parent = context.getContent( );
		context.pushContent( tableContent );
		logger.log( Level.FINEST, "start get table data" ); 
		openResultSet( item );
		logger.log( Level.FINEST, "end get table data" ); 
		initializeContent( parent, item, tableContent );
		processStyle( item, tableContent );
		processVisibility( item, tableContent );
		processBookmark( item, tableContent );
		processAction( item, tableContent );
		for ( int i = 0; i < tableDesign.getColumnCount( ); i++ )
		{
			ColumnDesign columnDesign = tableDesign.getColumn( i );
			Column column = new Column( );
			column.setStyleClass( columnDesign.getStyleName( ) );
			column.setWidth( columnDesign.getWidth( ) );
			tableContent.addColumn( column );