details: https://code.openbravo.com/erp/devel/pi/rev/a3138b899536
changeset: 16068:a3138b899536
user: Miguel de Juana <miguel.dejuana <at> openbravo.com>
date: Thu Apr 12 16:07:37 2012 +0200
summary: Fixed issue 17857: Exporting QueryListWidget, headers are labels
instead of ids
The CSV export of the QueryListWidget was using internal column/property names
when exporting the widget. Now is showing the names showed in the
querylistwidget grid itself.
The order of the columns in the exported file is ok. It's exporting the whole
grid (as same as maximized window).
diffstat:
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
| 7 +++++--
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
| 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r c1173672a520 -r a3138b899536
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
---
a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
Wed Apr 04 09:31:20 2012 +0200
+++
b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
Thu Apr 12 16:07:37 2012 +0200
@@ -179,8 +179,11 @@
if (value instanceof Date) {
value = xmlDateFormat.format(value);
}
-
- data.put(queryAliases[i], value);
+ if (!isExport) {
+ data.put(queryAliases[i], value);
+ } else {
+ data.put(QueryListUtils.getColumnLabel(column), value);
+ }
}
}
}
diff -r c1173672a520 -r a3138b899536
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
---
a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
Wed Apr 04 09:31:20 2012 +0200
+++
b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
Thu Apr 12 16:07:37 2012 +0200
@@ -150,7 +150,7 @@
}
}
- private static String getColumnLabel(OBCQL_QueryColumn column) {
+ public static String getColumnLabel(OBCQL_QueryColumn column) {
final String userLanguageId =
OBContext.getOBContext().getLanguage().getId();
for (QueryColumnTrl trl : column.getOBCQLQueryColumnTrlList()) {
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits