Bug 189397 Columns for exported should be listed as display order or order in binding pane.[0001]
Description: Columns for exported should be listed as display order or order in binding pane. Build number:2.2.0.v200705281033 Steps to reproduce: 1. New sample db and dataset from OFFICES. 2. Drag the dataset to layout 3. Preview in Web Viewer 4. Click Export Data button. Expected result: Columns are listed as display orders Actual result: Columns are listed in meaningless order. Error log:N/A
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/api/querydefn/BaseQueryDefinition.java
/*
	 * (non-Javadoc)
	 * @see org.eclipse.birt.data.engine.api.IBaseQueryDefinition#addBinding(java.lang.String, org.eclipse.birt.data.engine.api.IBinding)
	 */
	public void addBinding( IBinding binding ) throws DataException
	{ 
		
		
		if ( binding.getExpression( )!= null && binding.getExpression().getGroupName( ).equals( IBaseExpression.GROUP_OVERALL ))
				binding.getExpression( ).setGroupName( null );
		
		this.bindingMap.put( binding.getBindingName( ), binding );
	}
	
	/*
	 * (non-Javadoc)
	 * @see org.eclipse.birt.data.engine.api.IBaseQueryDefinition#getBindings()
	 */
	public Map getBindings( ) 
	{
		for( Iterator it = this.resultExprsMap.keySet( ).iterator( ); it.hasNext( );)
		{
			String key = it.next( ).toString( );
			IBaseExpression expr = (IBaseExpression)this.resultExprsMap.get( key );
			if ( this.bindingMap.get( key ) == null )
			{
				Binding binding = new Binding( key );
				binding.setExpression( expr );
				this.bindingMap.put( key, binding );
			}