hg merge release-2.0 (merge release2 into development)
This commit is contained in:
commit
5176931fc1
|
@ -53,13 +53,13 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||||
*/
|
*/
|
||||||
public class GenericPOElementHandler extends AbstractElementHandler {
|
public class GenericPOElementHandler extends AbstractElementHandler {
|
||||||
|
|
||||||
private String tableName;
|
private String m_tableName;
|
||||||
|
|
||||||
public GenericPOElementHandler() {
|
public GenericPOElementHandler() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericPOElementHandler(String tableName) {
|
public GenericPOElementHandler(String tableName) {
|
||||||
this.tableName = tableName;
|
this.m_tableName = tableName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
public void startElement(PIPOContext ctx, Element element) throws SAXException {
|
||||||
|
@ -223,6 +223,12 @@ public class GenericPOElementHandler extends AbstractElementHandler {
|
||||||
document.startElement("", "", tables[index], atts);
|
document.startElement("", "", tables[index], atts);
|
||||||
PoExporter filler = new PoExporter(ctx, document, po);
|
PoExporter filler = new PoExporter(ctx, document, po);
|
||||||
filler.export(excludes, true);
|
filler.export(excludes, true);
|
||||||
|
ctx.packOut.getCtx().ctx.put("Table_Name",tables[index]);
|
||||||
|
try {
|
||||||
|
new CommonTranslationHandler().packOut(ctx.packOut,document,null,po.get_ID());
|
||||||
|
} catch(Exception e) {
|
||||||
|
if (log.isLoggable(Level.INFO)) log.info(e.toString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (int i=index+1; i<tables.length; i++) {
|
for (int i=index+1; i<tables.length; i++) {
|
||||||
|
@ -252,8 +258,8 @@ public class GenericPOElementHandler extends AbstractElementHandler {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
tableId = MTable.get(packout.getCtx().ctx, tableName).getAD_Table_ID();
|
tableId = MTable.get(packout.getCtx().ctx, m_tableName).getAD_Table_ID();
|
||||||
sql = "SELECT * FROM " + tableName + " WHERE " + tableName + "_ID=" + recordId;
|
sql = "SELECT * FROM " + m_tableName + " WHERE " + m_tableName + "_ID=" + recordId;
|
||||||
}
|
}
|
||||||
packout.getCtx().ctx.put(DataElementParameters.AD_TABLE_ID, Integer.toString(tableId));
|
packout.getCtx().ctx.put(DataElementParameters.AD_TABLE_ID, Integer.toString(tableId));
|
||||||
packout.getCtx().ctx.put(DataElementParameters.SQL_STATEMENT, sql);
|
packout.getCtx().ctx.put(DataElementParameters.SQL_STATEMENT, sql);
|
||||||
|
|
|
@ -69,6 +69,8 @@ public class GridTab2PackExporter implements IGridTabExporter {
|
||||||
sql.append("))");
|
sql.append("))");
|
||||||
}
|
}
|
||||||
for(GridTab child : childs) {
|
for(GridTab child : childs) {
|
||||||
|
if (child.getTableName().toLowerCase().endsWith("_trl")) // ignore trl tabs as they are exported as translation
|
||||||
|
continue;
|
||||||
if (child.getTabLevel() > gridTab.getTabLevel()+1) {
|
if (child.getTabLevel() > gridTab.getTabLevel()+1) {
|
||||||
sql = sql.append(">").append(child.getTableName());
|
sql = sql.append(">").append(child.getTableName());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue