hg merge release-3.1 (merge release3.1 into development)

This commit is contained in:
Carlos Ruiz 2016-07-27 15:54:02 +02:00
commit fb70ffc87d
11 changed files with 87 additions and 63 deletions

View File

@ -74,13 +74,14 @@ public class Document {
document.newPage();
}
final PdfTemplate tp = cb.createTemplate(w, h);
final Graphics2D g2 = tp.createGraphics(w, h, mapper);
PdfTemplate tp = cb.createTemplate(w, h);
Graphics2D g2 = tp.createGraphics(w, h, mapper);
tp.setWidth(w);
tp.setHeight(h);
pageable.getPrintable(page).print(g2, pf, page);
g2.dispose();
cb.addTemplate(tp, 0, 0);
writer.releaseTemplate(tp);
}
document.close();

View File

@ -2826,7 +2826,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
public String processCallout (GridField field)
{
//
if (isProcessed() && !field.isAlwaysUpdateable()) // only active records
if (isProcessed() && !field.isAlwaysUpdateable() && !field.isKey()) // only active records
return ""; // "DocProcessed";
Object value = field.getValue();

View File

@ -631,8 +631,47 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
table.setNeedClosingTag(false);
PrintWriter w = new PrintWriter(writer);
if (onlyTable)
table.output(w);
else
{
XhtmlDocument doc = new XhtmlDocument();
doc.getHtml().setNeedClosingTag(false);
doc.getBody().setNeedClosingTag(false);
doc.appendHead("<meta charset=\"UTF-8\" />");
doc.appendBody(table);
appendInlineCss (doc);
if (extension != null && extension.getStyleURL() != null)
{
// maybe cache style content with key is path
String pathStyleFile = extension.getFullPathStyle(); // creates a temp file - delete below
Path path = Paths.get(pathStyleFile);
List<String> styleLines = Files.readAllLines(path, Ini.getCharset());
Files.delete(path); // delete temp file
StringBuilder styleBuild = new StringBuilder();
for (String styleLine : styleLines){
styleBuild.append(styleLine); //.append("\n");
}
appendInlineCss (doc, styleBuild);
}
if (extension != null && extension.getScriptURL() != null && !isExport)
{
script jslink = new script();
jslink.setLanguage("javascript");
jslink.setSrc(extension.getScriptURL());
doc.appendHead(jslink);
}
if (extension != null && !isExport){
extension.setWebAttribute(doc.getBody());
}
doc.output(w);
}
thead thead = new thead();
tbody tbody = new tbody();
tbody.setNeedClosingTag(false);
Boolean [] colSuppressRepeats = m_layout == null || m_layout.colSuppressRepeats == null? LayoutEngine.getColSuppressRepeats(m_printFormat):m_layout.colSuppressRepeats;
Object [] preValues = new Object [colSuppressRepeats.length];
@ -654,7 +693,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
tr.setClass(cssPrefix + "-lastgrouprow");
}
// add row to table body
tbody.addElement(tr);
//tbody.addElement(tr);
} else {
// add row to table header
thead.addElement(tr);
@ -792,50 +831,21 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
}
} // printed
} // for all columns
/* output table header */
if (row == -1){
thead.output(w);
// output open of tbody
tbody.output(w);
}else{
// output row by row
tr.output(w);
}
} // for all rows
if (onlyTable)
table.output(w);
else
{
XhtmlDocument doc = new XhtmlDocument();
doc.getHtml().setNeedClosingTag(false);
doc.getBody().setNeedClosingTag(false);
doc.appendHead("<meta charset=\"UTF-8\" />");
doc.appendBody(table);
appendInlineCss (doc);
if (extension != null && extension.getStyleURL() != null)
{
// maybe cache style content with key is path
String pathStyleFile = extension.getFullPathStyle(); // creates a temp file - delete below
Path path = Paths.get(pathStyleFile);
List<String> styleLines = Files.readAllLines(path, Ini.getCharset());
Files.delete(path); // delete temp file
StringBuilder styleBuild = new StringBuilder();
for (String styleLine : styleLines){
styleBuild.append(styleLine); //.append("\n");
}
appendInlineCss (doc, styleBuild);
}
if (extension != null && extension.getScriptURL() != null && !isExport)
{
script jslink = new script();
jslink.setLanguage("javascript");
jslink.setSrc(extension.getScriptURL());
doc.appendHead(jslink);
}
if (extension != null && !isExport){
extension.setWebAttribute(doc.getBody());
}
doc.output(w);
}
thead.output(w);
tbody.output(w);
w.println();
w.println("</tbody>");
w.println("</table>");
if (!onlyTable)
{

View File

@ -20,6 +20,7 @@ package org.adempiere.pipo2.handler;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.List;
import java.util.logging.Level;
import javax.xml.transform.sax.TransformerHandler;
@ -63,6 +64,7 @@ public class PrintFormatElementHandler extends AbstractElementHandler {
return;
}
element.recordId = mPrintFormat.getAD_PrintFormat_ID();
if (mPrintFormat.is_new() || mPrintFormat.is_Changed()) {
X_AD_Package_Imp_Detail impDetail = createImportDetail(ctx, element.qName, X_AD_PrintFormat.Table_Name,
X_AD_PrintFormat.Table_ID);
@ -134,6 +136,13 @@ public class PrintFormatElementHandler extends AbstractElementHandler {
addTypeName(atts, "table");
document.startElement("", "", I_AD_PrintFormat.Table_Name, atts);
createPrintFormatBinding(ctx, document, m_Printformat);
PackOut packOut = ctx.packOut;
packOut.getCtx().ctx.put("Table_Name",I_AD_PrintFormat.Table_Name);
try {
new CommonTranslationHandler().packOut(packOut,document,null,m_Printformat.get_ID());
} catch(Exception e) {
if (log.isLoggable(Level.INFO)) log.info(e.toString());
}
}
String sql = "SELECT AD_PrintFormatItem_ID FROM AD_PrintFormatItem WHERE AD_PrintFormat_ID= "

View File

@ -143,6 +143,7 @@ public class PackInProcess extends SvrProcess {
adPackageImp.setDateProcessed(new Timestamp(System.currentTimeMillis()));
adPackageImp.setP_Msg(msg);
adPackageImp.saveEx();
commitEx(); // we need to commit to capture HERE when the deferred validation of foreign keys can fail
} catch (Exception e) {
adPackageImp.setP_Msg(e.getLocalizedMessage());
packIn.getNotifier().addStatusLine(e.getLocalizedMessage());

View File

@ -632,7 +632,7 @@ stop () {
if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15"
else
echo "Trying direct kill with signal -9"
log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus

View File

@ -102,7 +102,7 @@ stop () {
if [ $IDEMPIERESTATUS -ne 0 ] ; then
log_success_msg "Service stopped with kill -15"
else
echo "Trying direct kill with signal -9"
log_warning_msg "Trying direct kill with signal -9"
kill -9 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus

View File

@ -85,13 +85,13 @@ stop () {
cd $IDEMPIERE_HOME/utils
source $ENVFILE
# try shutdown from OSGi console, then direct kill with signal 15, then signal 9
log_warning_msg "Trying shutdown from OSGi console"
echo "Trying shutdown from OSGi console"
( echo exit; echo y; sleep 5 ) | telnet localhost 12612 > /dev/null 2>&1
getidempierestatus
if [ $IDEMPIERESTATUS -ne 0 ] ; then
echo_success
else
log_warning_msg "Trying direct kill with signal -15"
echo "Trying direct kill with signal -15"
kill -15 -`ps ax o pgid,command | grep -v grep | grep $IDEMPIERE_HOME | sed -e 's/^ *//g' | cut -f 1 -d " " | sort -u`
sleep 5
getidempierestatus

View File

@ -190,7 +190,5 @@ public class WImageEditor extends WEditor
*/
@Override
public void fillHorizontal() {
// getComponent().setWidth(defaultWidth);
// getComponent().setHeight(defaultHeight);
}
}

View File

@ -180,6 +180,8 @@ span.grid-combobox-editor {
.image-field {
cursor: pointer;
border: 1px solid #C5C5C5;
height: 24px;
width: 24px;
}
.image-field.image-field-readonly {
cursor: default;

View File

@ -1,43 +1,46 @@
@Title ... p2 director
@Echo off
@Echo on
cd %~dp0
set DESTINATION=%cd%
@echo %DESTINATION%
@echo %1%
copy idempiere.ini idempiere.ini.sav
if exist jetty.xml.sav del /q jetty.xml.sav
if exist jettyhome/etc/jetty.xml (
copy jettyhome/etc/jetty.xml jetty.xml.sav
if exist jettyhome\etc\jetty.xml (
copy jettyhome\etc\jetty.xml jetty.xml.sav
)
if exist jetty-ssl.xml.sav del /q jetty-ssl.xml.sav
if exist jettyhome/etc/jetty-ssl.xml (
copy jettyhome/etc/jetty-ssl.xml jetty-ssl.xml.sav
if exist jettyhome\etc\jetty-ssl.xml (
copy jettyhome\etc\jetty-ssl.xml jetty-ssl.xml.sav
)
if exist jetty-selector.xml.sav del /q jetty-selector.xml.sav
if exist jettyhome/etc/jetty-selector.xml (
copy jettyhome/etc/jetty-selector.xml jetty-selector.xml.sav
if exist jettyhome\etc\jetty-selector.xml (
copy jettyhome\etc\jetty-selector.xml jetty-selector.xml.sav
)
FOR %%c in (plugins\org.eclipse.equinox.launcher_1.*.jar) DO set JARFILE=%%c
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -u org.adempiere.server.product
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination $DESTINATION -repository $1 -i org.adempiere.server.product
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -u org.adempiere.server.product
java -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient4 -Djava.net.preferIPv4Stack=true -jar %JARFILE% -install director -configuration director/configuration -application org.eclipse.equinox.p2.director -consoleLog -profileProperties org.eclipse.update.install.features=true -destination %DESTINATION% -repository %1% -i org.adempiere.server.product
copy idempiere.ini.sav idempiere.ini
if exist jetty.xml.sav (
copy jetty.xml.sav jettyhome/etc/jetty.xml
copy jetty.xml.sav jettyhome\etc\jetty.xml
del /q jetty.xml.sav
)
if exist jetty-ssl.xml.sav (
copy jetty-ssl.xml.sav jettyhome/etc/jetty-ssl.xml
copy jetty-ssl.xml.sav jettyhome\etc\jetty-ssl.xml
del /q jetty-ssl.xml.sav
)
if exist jetty-selector.xml.sav (
copy jetty-selector.xml.sav jettyhome/etc/jetty-selector.xml
copy jetty-selector.xml.sav jettyhome\etc\jetty-selector.xml
del /q jetty-selector.xml.sav
)