Skip to content

Commit

Permalink
- Summary: Improper message avoids editing group in cube.
Browse files Browse the repository at this point in the history
- Bugzilla Bug (s) Resolved:

- Description: Fix the logic of checking duplicate dimension name.
  • Loading branch information
cchao authored and xgu committed Sep 7, 2011
1 parent 63866a7 commit f9867dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Expand Up @@ -802,7 +802,15 @@ protected boolean checkDuplicateName( String name )
{
try
{
if(SessionHandleAdapter.getInstance( ).getReportDesignHandle( ).findDimension( name )!=null)
DimensionHandle dimension = SessionHandleAdapter.getInstance( )
.getReportDesignHandle( )
.findDimension( name );
DimensionHandle input = null;
if ( hierarchy != null )
{
input = (DimensionHandle) hierarchy.getContainer( );
}
if ( dimension != null && dimension != input )
return true;
}
catch ( Exception e )
Expand Down
Expand Up @@ -128,7 +128,8 @@ else if ( !UIUtil.validateDimensionName( text.getText( ) ) )
getButton( IDialogConstants.OK_ID ).setEnabled( false );
setErrorMessage( Messages.getString( "RenameInputDialog.Message.NumericName" ) ); //$NON-NLS-1$
}
else if(checkDuplicateName(text.getText( ))){
else if ( checkDuplicateName( text.getText( ) ) )
{
getButton( IDialogConstants.OK_ID ).setEnabled( false );
setErrorMessage( Messages.getString( "RenameInputDialog.Message.DuplicateName" ) ); //$NON-NLS-1$
}
Expand Down Expand Up @@ -173,7 +174,10 @@ protected boolean checkDuplicateName( String name )
{
try
{
if(SessionHandleAdapter.getInstance( ).getReportDesignHandle( ).findDimension( name )!=null)
DimensionHandle handle = SessionHandleAdapter.getInstance( )
.getReportDesignHandle( )
.findDimension( name );
if ( handle != null && handle != dimension )
return true;
}
catch ( Exception e )
Expand Down

0 comments on commit f9867dc

Please sign in to comment.