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/ListingElementExecutor.java
protected ListingElementExecutor( ExecutionContext context,
			IReportItemVisitor visitor )
	{
		super( context, visitor );
	}
	/**
	 * access the query and create the contents. the execution process is:
	 * <li> the cursor is at the begin of result set.
	 * <li> call listing's onStart event
	 * <li> create the header
	 * <li> for each row:
	 * <ul>
	 * <li> call onRow event.
	 * <li> if the row start some groups, create the group header for that
	 * group.
	 * <li> create the detail row.
	 * <li> if the row end some groups, create the group footer for that group.
	 * </ul>
	 * <li> create the footer.
	 * <li> call the onFinish event.
	 */
	protected void accessQuery( ReportItemDesign design, IContentEmitter emitter )
	{
		ListingDesign listing = (ListingDesign) design;
		rsetCursor = -1;
		outputEmitter = emitter;
		int groupCount = listing.getGroupCount( );
		int NONE_GROUP = groupCount + 1;
		int groupIndex;
		int pageBreakInterval = listing.getPageBreakInterval( );