Skip to content

Commit

Permalink
fix 49758 Exception is thrown out when edit a data set whose data source
Browse files Browse the repository at this point in the history
is invalid
  • Loading branch information
pshi authored and mwu committed May 9, 2012
1 parent f0e9792 commit 6c083fc
Showing 1 changed file with 10 additions and 5 deletions.
Expand Up @@ -228,10 +228,10 @@ private void initializeControl() {
return; // nothing to initialize

String queryText = dataSetDesign.getQueryText();
if (queryText == null)
if (queryText == null || selectedFile == null)
return; // nothing to initialize

updateValuesFromQuery(queryText);
updateValuesFromQuery(queryText);

if (dataSetDesign.getPublicProperties() != null) {
currentSheetName = dataSetDesign.getPublicProperties().getProperty(
Expand Down Expand Up @@ -1325,7 +1325,7 @@ private void updateValuesFromQuery(String queryText) {
validateHasSelectedColumns();
return;
}
if ( isNewFile( queryText, getFileName( selectedFile ) ) )
if (selectedFile != null && isNewFile( queryText, getFileName( selectedFile ) ) )
{
updateColumnsFromQuery(queryText, selectedFile);
}
Expand Down Expand Up @@ -1580,7 +1580,12 @@ private void savePage(DataSetDesign dataSetDesign) {
return;
dataSetDesign.setQueryText(queryText);
savePublicProperties(dataSetDesign);


if ( selectedFile == null )
{
dataSetDesign.setResultSets(null);
return;
}
if( ! validateHasSelectedColumns() )
{
// don't prepare query; simply reset result set definition
Expand Down

0 comments on commit 6c083fc

Please sign in to comment.