Skip to content

Commit

Permalink
- Summary: Enable specific table data binding to not allow export
Browse files Browse the repository at this point in the history
- Bugzilla Bug (s) Resolved:

 - Description: Rollback the checkin about export.

- Project ID:

- Tests Description  : 

Manual test

 

- Notes to Build Team: 

None

 

- Notes to Developers: 

None

 

- Notes to QA:  

None

 

- Notes to Documentation:  

None

 

- Files Edited:

@changelist

 

- Files Added:

@addlist

 

- Files Deleted:

@deletelist
  • Loading branch information
cchao committed May 23, 2012
1 parent 6961ffa commit 8c2ac36
Showing 1 changed file with 2 additions and 39 deletions.
Expand Up @@ -111,7 +111,6 @@ public class BindingDialogHelper extends AbstractBindingDialogHelper
protected static final String GROUP = Messages.getString( "BindingDialogHelper.text.Group" ); //$NON-NLS-1$
protected static final String EXPRESSION = Messages.getString( "BindingDialogHelper.text.Expression" ); //$NON-NLS-1$
protected static final String DISPLAY_NAME = Messages.getString( "BindingDialogHelper.text.displayName" ); //$NON-NLS-1$
protected static final String ALLOW_EXPORT = Messages.getString( "BindingDialogHelper.text.allowExport" ); //$NON-NLS-1$
protected static final String DISPLAY_NAME_ID = Messages.getString( "BindingDialogHelper.text.displayNameID" ); //$NON-NLS-1$

protected static final String DEFAULT_ITEM_NAME = Messages.getString( "BindingDialogHelper.bindingName.dataitem" ); //$NON-NLS-1$
Expand Down Expand Up @@ -285,27 +284,6 @@ public void widgetSelected( SelectionEvent arg0 )
validate( );
}
} );

Label allowExportLabel = new Label( composite, SWT.NONE );
allowExportLabel.setText( ALLOW_EXPORT );
btnAllowExport = new Button( composite, SWT.CHECK );
btnAllowExport.setSelection( true );

GridData gd1 = new GridData( GridData.FILL_HORIZONTAL );
gd1.horizontalSpan = 3;
gd1.widthHint = 200;
btnAllowExport.setLayoutData( gd1 );

btnAllowExport.addSelectionListener( new SelectionAdapter( ) {

public void widgetSelected( SelectionEvent e )
{
modifyDialogContent( );
}
} );

WidgetUtil.setExcludeGridData( allowExportLabel, true );
WidgetUtil.setExcludeGridData( btnAllowExport, true );
// WidgetUtil.createGridPlaceholder( composite, 1, false );

if ( isAggregate( ) )
Expand Down Expand Up @@ -390,7 +368,6 @@ public void initDialog( )
{
setDisplayName( getBinding( ).getDisplayName( ) );
setDisplayNameID( getBinding( ).getDisplayNameID( ) );
setAllowExport( getBinding( ).allowExport( ) );
for ( int i = 0; i < DATA_TYPE_CHOICES.length; i++ )
{
if ( DATA_TYPE_CHOICES[i].getName( )
Expand All @@ -409,7 +386,7 @@ public void initDialog( )
isAggregate( ) ? DEFAULT_AGGREGATION_NAME
: DEFAULT_ITEM_NAME );
setName( this.newBinding.getName( ) );
setAllowExport( this.newBinding.allowExport( ) );

if ( !isAggregate( ) )
{
setTypeSelect( getDataTypeDisplayName( DesignChoiceConstants.COLUMN_DATA_TYPE_STRING ) );
Expand Down Expand Up @@ -448,7 +425,6 @@ public void initDialog( )
}
setDisplayName( getBinding( ).getDisplayName( ) );
setDisplayNameID( getBinding( ).getDisplayNameID( ) );
setAllowExport( getBinding( ).allowExport( ) );
for ( i = 0; i < DATA_TYPE_CHOICES.length; i++ )
{
if ( DATA_TYPE_CHOICES[i].getName( )
Expand All @@ -465,7 +441,6 @@ public void initDialog( )
setName( getBinding( ).getName( ) );
setDisplayName( getBinding( ).getDisplayName( ) );
setDisplayNameID( getBinding( ).getDisplayNameID( ) );
setAllowExport( getBinding( ).allowExport( ) );
if ( getBinding( ).getDataType( ) != null )
{
if ( DATA_TYPE_CHOICE_SET.findChoice( getBinding( ).getDataType( ) ) != null )
Expand Down Expand Up @@ -830,12 +805,6 @@ private void setDisplayNameID( String displayNameID )
txtDisplayNameID.setText( displayNameID );
}

private void setAllowExport( boolean allowExport )
{
if ( btnAllowExport != null )
btnAllowExport.setSelection( allowExport );
}

private void setTypeSelect( String typeSelect )
{
if ( dataTypes != null && cmbType != null )
Expand Down Expand Up @@ -1426,8 +1395,6 @@ public boolean differs( ComputedColumnHandle binding )
if ( cmbName != null
&& !strEquals( cmbName.getText( ), binding.getName( ) ) )
return true;
if ( btnAllowExport.getSelection( ) != binding.allowExport( ) )
return true;
if ( !strEquals( binding.getDisplayName( ),
txtDisplayName.getText( ) ) )
return true;
Expand Down Expand Up @@ -1492,8 +1459,6 @@ public boolean differs( ComputedColumnHandle binding )
if ( !strEquals( txtDisplayNameID.getText( ),
binding.getDisplayNameID( ) ) )
return true;
if ( btnAllowExport.getSelection( ) != binding.allowExport( ) )
return true;
if ( !strEquals( getDataType( ), binding.getDataType( ) ) )
return true;
if ( !expressionEquals( binding.getExpressionProperty( ComputedColumn.EXPRESSION_MEMBER ),
Expand Down Expand Up @@ -1614,7 +1579,7 @@ public ComputedColumnHandle editBinding( ComputedColumnHandle binding )
break;
}
}
binding.setAllowExport( btnAllowExport.getSelection( ) );

// binding.setExpression( cmbDataField.getText( ) );
binding.setAggregateFunction( getFunctionByDisplayName( cmbFunction.getText( ) ).getName( ) );

Expand Down Expand Up @@ -1662,7 +1627,6 @@ public ComputedColumnHandle editBinding( ComputedColumnHandle binding )
}
binding.setDisplayName( txtDisplayName.getText( ) );
binding.setDisplayNameID( txtDisplayNameID.getText( ) );
binding.setAllowExport( btnAllowExport.getSelection( ) );
ExpressionButtonUtil.saveExpressionButtonControl( txtExpression,
binding,
ComputedColumn.EXPRESSION_MEMBER );
Expand Down Expand Up @@ -1912,6 +1876,5 @@ private void modifyDialogContent( )
}

private boolean hasModified = false;
private Button btnAllowExport;

}

0 comments on commit 8c2ac36

Please sign in to comment.