Skip to content

Commit

Permalink
RESOLVED - issue SPAGOBI-1758: Default value is displayed instead of …
Browse files Browse the repository at this point in the history
…its description when default is calculated by a Groovy script

https://www.spagoworld.org/jira/browse/SPAGOBI-1758

git-svn-id: svn://svn.forge.objectweb.org/svnroot/spagobi/V_4.x/Server/trunk@22917 99afaf0d-6903-0410-885a-c66a8bbb5f81
  • Loading branch information
zerbetto committed Jun 5, 2014
1 parent f866a12 commit 4db614d
Showing 1 changed file with 0 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -276,47 +276,6 @@ public boolean checkSintax(String result) {
List rowsList = source.getAttributeAsList(DataRow.ROW_TAG);
if( (rowsList==null) || (rowsList.size()==0) ) {
toconvert = true;
} else {
// TODO this part can be moved to the import transformer
// RESOLVES RETROCOMPATIBILITY PROBLEMS
// finds the name of the first attribute of the rows if exists
String defaultName = "";
SourceBean rowSB = (SourceBean) rowsList.get(0);
List attributes = rowSB.getContainedAttributes();
if (attributes != null && attributes.size() > 0) {
SourceBeanAttribute attribute = (SourceBeanAttribute) attributes.get(0);
defaultName = attribute.getKey();
}
// if a value column is specified, it is considered
SourceBean valueColumnSB = (SourceBean) source.getAttribute("VALUE-COLUMN");
if (valueColumnSB != null) {
String valueColumn = valueColumnSB.getCharacters();
if (valueColumn != null) {
valueColumnName = valueColumn;
}
} else {
valueColumnName = defaultName;
}
SourceBean visibleColumnsSB = (SourceBean) source.getAttribute("VISIBLE-COLUMNS");
if (visibleColumnsSB != null) {
String allcolumns = visibleColumnsSB.getCharacters();
if (allcolumns != null) {
String[] columns = allcolumns.split(",");
visibleColumnNames = Arrays.asList(columns);
}
} else {
String[] columns = new String[] {defaultName};
visibleColumnNames = Arrays.asList(columns);
}
SourceBean descriptionColumnSB = (SourceBean) source.getAttribute("DESCRIPTION-COLUMN");
if (descriptionColumnSB != null) {
String descriptionColumn = descriptionColumnSB.getCharacters();
if (descriptionColumn != null) {
descriptionColumnName = descriptionColumn;
}
} else {
descriptionColumnName = defaultName;
}
}
}

Expand Down

0 comments on commit 4db614d

Please sign in to comment.