List bindingList = DEUtil.getAllColumnBindingList( input, true ); List bindingNameList = new LinkedList( ); for ( int i = 0; i < bindingList.size( ); i++ ) bindingNameList.add( ( (ComputedColumnHandle) bindingList.get( i ) ).getName( ) );  for ( Iterator iter = columnList.iterator( ); iter.hasNext( ); ) { ComputedColumn resultSetColumn = (ComputedColumn) iter.next( ); if ( bindingColumn != null ) { if ( bindingColumn.getName( ) .equals( resultSetColumn.getName( ) ) ) isBindingDataSet = true; else if ( bindingNameList.contains( resultSetColumn.getName( ) ) ) continue; } list.add( resultSetColumn.getName( ) ); }  setDataItemNames( convertListToStrings( list ) );  if ( bindingColumn != null ) { if ( !isBindingDataSet ) { String names[] = new String[itemNames.length + 1]; System.arraycopy( itemNames, 0, names, 1, itemNames.length ); names[0] = bindingColumn.getName( ); setDataItemNames( names ); } setNameSelect( bindingColumn.getName( ) ); setTypeSelect( dataTypeChoiceSet.findChoice( bindingColumn.getDataType( ) ) .getDisplayName( ) ); setExpression( bindingColumn.getExpression( ) ); setAggregateOnSelect( bindingColumn.getAggregateOn( ) ); } else { String names[] = new String[itemNames.length + 1]; System.arraycopy( itemNames, 0, names, 1, itemNames.length ); names[0] = createColumnName( input, DEFAULT_ITEM_NAME ); setDataItemNames( names ); setNameSelect( itemNames[0] ); setTypeSelect( dataTypes[0] ); } }
	public void setInput( ReportItemHandle input )	{		this.input = input;		setAggregateOns( DEUtil.getGroups( input ) );		setDataTypes( ChoiceSetFactory.getDisplayNamefromChoiceSet( dataTypeChoiceSet ) );		try		{			String bindingName = ( (DataItemHandle) input ).getResultSetColumn( );			setTitle( bindingName == null ? NEW_DATAITEM_TITLE					: EDIT_DATAITEM_TITLE );			if ( bindingName != null )			{				bindingColumn = getInputBinding( input, bindingName );			}			List columnList = DataUtil.generateComputedColumns( input );			if ( ( columnList == null || columnList.size( ) == 0 )					&& bindingColumn == null )			{				setDataItemNames( new String[]{					createColumnName( input, DEFAULT_ITEM_NAME )				} );				setNameSelect( itemNames[0] );			}			else			{				// Add data set items.				boolean isBindingDataSet = false;				List list = new LinkedList( );				List bindingList = DEUtil.getAllColumnBindingList( input, true );				List bindingNameList = new LinkedList( );				for ( int i = 0; i < bindingList.size( ); i++ )					bindingNameList.add( ( (ComputedColumnHandle) bindingList.get( i ) ).getName( ) );				for ( Iterator iter = columnList.iterator( ); iter.hasNext( ); )				{					ComputedColumn resultSetColumn = (ComputedColumn) iter.next( );					if ( bindingColumn != null )					{						if ( bindingColumn.getName( )								.equals( resultSetColumn.getName( ) ) )							isBindingDataSet = true;						else if ( bindingNameList.contains( resultSetColumn.getName( ) ) )							continue;					}					list.add( resultSetColumn.getName( ) );				}				setDataItemNames( convertListToStrings( list ) );				if ( bindingColumn != null )				{					if ( !isBindingDataSet )					{						String names[] = new String[itemNames.length + 1];						System.arraycopy( itemNames,								0,								names,								1,								itemNames.length );						names[0] = bindingColumn.getName( );						setDataItemNames( names );					}					setNameSelect( bindingColumn.getName( ) );					setTypeSelect( dataTypeChoiceSet.findChoice( bindingColumn.getDataType( ) )							.getDisplayName( ) );					setExpression( bindingColumn.getExpression( ) );					setAggregateOnSelect( bindingColumn.getAggregateOn( ) );				}				else				{					String names[] = new String[itemNames.length + 1];					System.arraycopy( itemNames, 0, names, 1, itemNames.length );					names[0] = createColumnName( input, DEFAULT_ITEM_NAME );					setDataItemNames( names );					setNameSelect( itemNames[0] );					setTypeSelect( dataTypes[0] );				}			}		}		catch ( Exception e )		{			ExceptionHandler.handle( e );		}	}