svn commit: r1770621 [5/5] - in /ofbiz/trunk/specialpurpose/pricat: ./ config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/ofbiz/ src/main/jav...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1770621 [5/5] - in /ofbiz/trunk/specialpurpose/pricat: ./ config/ data/ entitydef/ groovyScripts/ groovyScripts/pricat/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/ofbiz/ src/main/jav...

shijh
Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/pricatreport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/pricatreport.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/pricatreport.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/pricatreport.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,529 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<#assign report = Static["org.apache.ofbiz.htmlreport.HtmlReport"].getInstance(request, response)>
+<#assign resourceParam = "resource"
+         borderStyle = "2px inset ThreeDHighlight"
+     borderSimpleStyle = "2px solid ThreeDFace">
+<#if report.isMultiOperation(request)?string("true", "false") == "true">
+ <#assign resourceParam = null>
+</#if>
+<#assign action = report.getParamAction(request)>
+<#-- start of switch statement -->
+<#switch action>
+ <#case "reportupdate">
+<#-- ACTION: get report update -->
+ <#assign htmlStart = report.htmlStart(false)>
+ ${StringUtil.wrapString(htmlStart)}
+
+<script language='JavaScript'>
+<!--
+
+function a(message) {
+ parent.append(message);
+}
+
+function aH(message) {
+ parent.appendHead(message);
+}
+
+function aW(message) {
+ parent.appendWarning(message);
+}
+
+function aE(message) {
+ parent.appendError(message);
+}
+
+function aN(message) {
+ parent.appendNote(message);
+}
+
+function aO(message) {
+ parent.appendOk(message);
+}
+
+function aT(message) {
+ parent.appendThrowable(message);
+}
+
+function aB() {
+ parent.appendBr();
+}
+
+var active = null;
+
+function init() {
+ if (active != null) {
+ clearTimeout(active);
+ }
+ <#assign alive = report.isAlive(request)?string("true", "false")>
+  var alive=${alive};
+    
+  parent.flushArray();
+
+${StringUtil.wrapString(report.getReportUpdate())}
+
+  parent.update();
+ if (alive) {
+     active = setTimeout("reload('reportupdate');", 2000);
+  } else {
+   var hasNext = "${report.getParamThreadHasNext(request)}";
+   if (hasNext == "true") {
+   if (!${report.hasError()?string("true", "false")} || parent.isContinueChecked()) {
+   // all actions ok or continue checked, continue automatically
+   continueReport();
+   } else {
+   // wait for user interaction
+   setTimeout('parent.stop();', 10);
+   }// end hasError
+   } else {
+    setTimeout('parent.stop();', 10);
+   }// end hasNext
+  }// end alive
+}
+
+function reload(actionParam) {
+    <#assign resName = report.getResourceList(request).get(0)>
+ var resName = "${resName}";
+ if (resName != "") {
+ resName = "&resource=" + encodeURIComponent(resName);
+ }
+ <#assign dialogUri = report.getDialogRealUri(request)
+         thread = report.getParamThread(request)
+         threadhasnext = report.getParamThreadHasNext(request)>
+ location.href="${StringUtil.wrapString(dialogUri)}?action=" + actionParam + "&thread=${thread}&threadhasnext=${threadhasnext}" + resName;
+}
+
+
+
+function continueReport() {
+ if (!parent.buttonsInitialized) {
+ parent.initButtons();
+ }
+ parent.disableButtons("buttonrowok");
+ parent.displayButtonRowOk();
+ parent.hasError = false;
+ parent.lastError = "";
+ setTimeout("reload('reportend');", 2000);
+ if (parent.document.main.threadhasnext) {
+ parent.document.main.threadhasnext.value = "false";
+ }
+}
+
+// -->
+</script>
+
+    ${StringUtil.wrapString(report.bodyStart("empty", "style=\"background-color:ThreeDFace;\" onLoad=\"init();\""))}
+    ${StringUtil.wrapString(report.bodyEnd())}
+    ${StringUtil.wrapString(report.htmlEnd())}
+
+ <#break>
+ <#-- ACTION: report begin -->
+ <#case "reportbegin">
+ <#default>
+ ${report.setParamAction("reportend")}
+
+${StringUtil.wrapString(report.htmlStart())}
+
+<script type="text/javascript" language="JavaScript">
+<!--
+
+// saves the HTML of the extended report format,
+// built from the server-side generated JavaScripts
+var htmlText = "";
+
+// boolean flag whether this report is still running
+var isRunning = false;
+
+// boolean flag whether this report received the output of a warning/error message
+var hasError = false;
+
+// saves the last received headline in the report output
+var lastHeadline = "";
+
+// saves the last received warning/error message in the report output
+var lastError = "";
+
+// array to save the formats of the last received messages
+var reportOutputFormats = new Array();
+
+// array to save the last received messages
+var reportOutputMessages = new Array();
+
+// format flags for the HTML formatting of the messages
+var FORMAT_DEFAULT = 0;
+var FORMAT_WARNING = 1;
+var FORMAT_HEADLINE = 2;
+var FORMAT_NOTE = 3;
+var FORMAT_OK = 4;
+var FORMAT_NEWLINE = 5;
+var FORMAT_THROWABLE = 6;
+var FORMAT_ERROR = 7;
+
+// flag indicating that the button rows are initialized
+var buttonsInitialized = false;
+
+function append(message) {
+ reportOutputFormats.push(FORMAT_DEFAULT);
+ reportOutputMessages.push(message);
+}
+
+function appendHead(message) {
+ reportOutputFormats.push(FORMAT_HEADLINE);
+ reportOutputMessages.push(message);
+ lastHeadline = "" + message;
+}
+
+function appendWarning(message) {
+ reportOutputFormats.push(FORMAT_WARNING);
+ reportOutputMessages.push(message);
+}
+
+function appendError(message) {
+ reportOutputFormats.push(FORMAT_ERROR);
+ reportOutputMessages.push(message);
+ hasError = true;
+ lastError = message;
+}
+
+function appendNote(message) {
+ reportOutputFormats.push(FORMAT_NOTE);
+ reportOutputMessages.push(message);
+}
+
+function appendOk(message) {
+ reportOutputFormats.push(FORMAT_OK);
+ reportOutputMessages.push(message);
+}
+
+function appendThrowable(message) {
+ reportOutputFormats.push(FORMAT_THROWABLE);
+ reportOutputMessages.push(message);
+}
+
+function appendBr() {
+ reportOutputFormats.push(FORMAT_NEWLINE);
+ reportOutputMessages.push("");
+}
+
+var cssStyle =
+    "<style type='text/css'>\n" +
+    "body       { box-sizing: border-box; -moz-box-sizing: border-box; padding: 2px; margin: 0; color: #000000; background-color:#ffffff; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; }\n" +
+    "div.main   { box-sizing: border-box; -moz-box-sizing: border-box; color: #000000; white-space: nowrap; }\n" +
+    "span.head  { color: #000099; font-weight: bold; }\n" +
+    "span.note  { color: #666666; }\n" +
+    "span.ok    { color: #009900; }\n" +
+    "span.warn  { color: #990000; padding-left: 40px; }\n" +
+    "span.err   { color: #990000; font-weight: bold; padding-left: 40px; }\n" +  
+    "span.throw { color: #990000; font-weight: bold; }\n" +
+    "span.link1 { color: #666666; }\n" +
+    "span.link2 { color: #666666; padding-left: 40px; }\n" +    
+    "span.link2 { color: #990000; }\n" +    
+    "</style>\n";
+
+var pageStartSimple =
+    "<html>\n<head>\n" +
+    "<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=UTF-8'>\n" +
+    "<link rel='stylesheet' type='text/css' href='/pricat/includes/pricat.css'>\n" +
+    cssStyle +
+    "</head>\n" +
+    "<body style='background-color:Menu;'>\n" +  
+    "<div style='vertical-align:middle; height: 100%;'>\n"+
+    "<table border='0' style='vertical-align:middle; height: 100%;'>\n" +
+    "<tr><td width='40' align='center' valign='middle'><img name='report_img' src='/pricat/images/wait.gif' width='32' height='32' alt=''></td>\n" +
+    "<td valign='middle'>";
+    
+var pageEndSimple =
+ "</td></tr>\n" +
+ "</table></div>\n" +
+ "</body>\n</html>";    
+
+var pageStartExtended =
+    "<html>\n<head>\n" +
+    "<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=UTF-8'>\n"+
+ cssStyle +
+    "</head>\n" +
+    "<body style='overflow: auto;'>\n" +  
+    "<div class='main'>\n";
+    
+var pageEndExtended =
+ "</div>\n" +
+ "</body>\n" +
+ "</html>\n";                                
+
+function start() {
+
+ isRunning = true;
+
+ initButtons();
+}
+
+function stop() {
+ isRunning = false;
+
+ if (document.main.threadhasnext) {
+ document.main.threadhasnext.value = "false";
+ }
+ enableButtons("buttonrowcontinue");
+ enableButtons("buttonrowok");
+
+ updateReport();
+}
+
+// flush the arrays with the report formats and messages
+function flushArray() {
+    reportOutputFormats = new Array();
+ reportOutputMessages = new Array();
+}
+
+// updates the report, builds the HTML string from the JavaScript input
+function update() {
+
+ var size = 512000;
+
+ // resize the HTML string
+    if (htmlText.length > size) {
+        htmlText = htmlText.substring(htmlText.length - size, htmlText.length);
+        var pos = htmlText.indexOf("\n");
+        if (pos > 0) {
+            // cut output at the first linebreak to have a "nice" start
+            htmlText = htmlText.substring(pos, htmlText.length);      
+        }
+    }    
+
+ // append the HTML of the extended report format to the HTML string
+    htmlText += getContentExtended();
+
+ // write the HTML output to the iframe
+ updateReport();
+}
+
+// writes the HTML output to the iframe
+// this function gets also invoked when the report output format is toggled
+function updateReport() {
+
+   pageBody = pageStartExtended + htmlText + pageEndExtended;
+   document.getElementById("report").style.border = "${borderStyle}";
+    report.document.open();    
+    report.document.write(pageBody);
+    report.document.close();
+    
+    setTimeout('doScroll();', 1);
+}
+
+// builds the HTML string from the JavaScript input
+function getContentExtended() {
+ var htmlStr = "";
+ var i = 0;
+ for (i=0;i<reportOutputFormats.length && i<reportOutputMessages.length;i++) {
+ switch (reportOutputFormats[i]) {
+ case FORMAT_WARNING :
+ htmlStr += "<span class='warn'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_ERROR :
+ htmlStr += "<span class='err'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_HEADLINE :
+ htmlStr += "<span class='head'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_NOTE :
+ htmlStr += "<span class='note'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_OK :
+ htmlStr += "<span class='ok'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_NEWLINE :
+ htmlStr += "\n";
+ break;
+ case FORMAT_THROWABLE :
+ htmlStr += "<span class='throw'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_DEFAULT :
+ default :
+ htmlStr += "<span>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ }
+ }
+
+ return htmlStr;
+}
+
+function doScroll() {
+ var pos = 1000000;
+    report.window.scrollTo(0, pos);
+}
+
+function isContinueChecked() {
+ if (document.main.continuereport && document.main.continuereport.checked == true) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function displayButtonRowContinue() {
+ displayButtonRow("buttonrowcontinue", true);
+ displayButtonRow("checkcontinue", true);
+ displayButtonRow("buttonrowok", false);
+}
+
+function displayButtonRowOk() {
+ displayButtonRow("buttonrowcontinue", false);
+ toggleButton("continuereport", true);
+ displayButtonRow("buttonrowok", true);
+}
+
+function displayButtonRow(rowId, show) {
+ if (show) {
+ document.getElementById(rowId).className = "show";
+ } else {
+ document.getElementById(rowId).className = "hide";
+ }
+}
+
+function enableButtons(rowId) {
+ if (rowId == "buttonrowcontinue") {
+ toggleButton("contok", false);
+ toggleButton("contcancel", false);
+ } else {
+ toggleButton("okclose", false);
+ }
+}
+
+function disableButtons(rowId) {
+ if (rowId == "buttonrowcontinue") {
+ toggleButton("contok", true);
+ toggleButton("contcancel", true);
+ } else {
+ toggleButton("okclose", true);
+ toggleButton("okcancel", true);
+ }
+}
+
+function toggleButton(buttonId, disableButton) {
+ if (document.getElementById(buttonId))  {
+ document.getElementById(buttonId).disabled = disableButton;
+ }
+}
+
+function initButtons() {
+ if (document.main.threadhasnext && document.main.threadhasnext.value == "true"
+ && document.main.reportcontinuekey && document.main.reportcontinuekey.value != "") {
+ displayButtonRowContinue();
+ } else {
+ displayButtonRowOk();
+ }
+ disableButtons("buttonrowcontinue");
+ disableButtons("buttonrowok");
+ buttonsInitialized = true;
+}
+
+function submitActionRefresh(para1, para2, para3) {
+<#if report.getParamRefreshWorkplace()?has_content && report.getParamRefreshWorkplace() == "true">
+    <#-- workplace must be refresehd (reloaded) -->
+    top.location.href = "${StringUtil.wrapString(report.getDialogRealUri(request))}";
+<#else>
+    <#-- no workplace refresh required -->
+    return submitAction(para1, para2, para3);
+</#if>
+}
+
+function downloadPricat() {
+    toggleButton("download", true);
+    var theform = document.forms["main"];
+    theform.action = "/pricatdemo/control/pricatUpload";
+    theform.action.value = "downloadPricat";
+    theform.submit();
+    return false;
+}
+
+function downloadPricat(sequenceNum) {
+    toggleButton("download", true);
+    var theform = document.forms["main"];
+    theform.action = "/pricatdemo/control/pricatUpload";
+    theform.action.value = "downloadPricat";
+    theform.sequenceNum.value = sequenceNum;
+    theform.submit();
+    return false;
+}
+//-->
+</script>
+
+    ${StringUtil.wrapString(report.bodyStart("", "onLoad=\"start();\""))}
+    ${StringUtil.wrapString(report.dialogStart())}
+
+<form name="main" action="${StringUtil.wrapString(report.getDialogRealUri(request))}" method="post" class="nomargin" onsubmit="return submitActionRefresh('ok', null, 'main');">
+
+    ${StringUtil.wrapString(report.dialogContentStart(report.getParamTitle(request)))}
+    ${StringUtil.wrapString(report.paramsAsHidden(request))}
+    <input type="hidden" name="action" value>
+    <input type="hidden" name="sequenceNum" value="">
+    ${StringUtil.wrapString(report.reportIntroductionText())}
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="400">
+<tr>
+ <td><iframe name="report" id="report" src="about:blank" frameborder="0" style="width:99.8%; height:400px; padding: 0; margin: 0; border: ${borderStyle};"></iframe></td>
+</tr>
+</table>
+
+    ${StringUtil.wrapString(report.reportConclusionText())}
+    ${StringUtil.wrapString(report.dialogContentEnd())}
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+  <tr><td width="100%" id="buttonrowcontinue" class="hide">
+    ${StringUtil.wrapString(report.dialogButtonsContinue("id=\"contok\" onclick=\"updateWin.continueReport();\"", "id=\"contcancel\""))}
+  </td></tr>
+  <tr><td width="100%" id="buttonrowok" class="hide">
+    ${StringUtil.wrapString(report.dialogButtonsOkCancelDownload(request, "id=\"okclose\"", "id=\"okcancel\"", "id=\"download\""))}
+  </td></tr>
+  <tr><td>
+  <#assign resources = "">
+  <#if report.getResourceListAsParam(request)?has_content>
+    <#assign resources = report.getResourceListAsParam(request)>
+  </#if>
+    <iframe src="${StringUtil.wrapString(report.getDialogRealUri(request))}?action=reportupdate&thread=${report.getParamThread(request)}&threadhasnext=${report.getParamThreadHasNext(request)}<#if resourceParam?has_content>${"&" + resourceParam + "=" + resources}<#else>${""}</#if>" name="updateWin" style="width:20px; height:20px; margin: 0px;" marginwidth="0"
+            marginheight="0" frameborder="0" framespacing="0" scrolling="no" class='hide'></iframe>
+  </td></tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" align="center"><tr>
+<td class="hide" style="width: 100%; text-align: center;" id="checkcontinue"><input type="checkbox" name="continuereport" id="continuereport" value="true">&nbsp;${StringUtil.wrapString(report.getParamReportContinueKey())}</td>
+</tr></table>
+
+</form>
+
+    ${StringUtil.wrapString(report.dialogEnd())}
+    ${StringUtil.wrapString(report.bodyEnd())}
+    ${StringUtil.wrapString(report.htmlEnd())}
+
+</#switch>
+<#-- //////////////////// end of switch statement -->

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/report.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/report.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/report.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/report.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,510 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<#assign report = Static["org.apache.ofbiz.htmlreport.HtmlReport"].getInstance(request, response)>
+<#assign resourceParam = "resource"
+         borderStyle = "2px inset ThreeDHighlight"
+     borderSimpleStyle = "2px solid ThreeDFace">
+<#if report.isMultiOperation(request)?string("true", "false") == "true">
+ <#assign resourceParam = null>
+</#if>
+<#assign action = report.getParamAction(request)>
+<#-- start of switch statement -->
+<#switch action>
+ <#case "reportupdate">
+<#-- ACTION: get report update -->
+ <#assign htmlStart = report.htmlStart(false)>
+ ${StringUtil.wrapString(htmlStart)}
+
+<script language='JavaScript'>
+<!--
+
+function a(message) {
+ parent.append(message);
+}
+
+function aH(message) {
+ parent.appendHead(message);
+}
+
+function aW(message) {
+ parent.appendWarning(message);
+}
+
+function aE(message) {
+ parent.appendError(message);
+}
+
+function aN(message) {
+ parent.appendNote(message);
+}
+
+function aO(message) {
+ parent.appendOk(message);
+}
+
+function aT(message) {
+ parent.appendThrowable(message);
+}
+
+function aB() {
+ parent.appendBr();
+}
+
+var active = null;
+
+function init() {
+ if (active != null) {
+ clearTimeout(active);
+ }
+ <#assign alive = report.isAlive(request)?string("true", "false")>
+  var alive=${alive};
+    
+  parent.flushArray();
+
+${StringUtil.wrapString(report.getReportUpdate())}
+
+  parent.update();
+ if (alive) {
+     active = setTimeout("reload('reportupdate');", 2000);
+  } else {
+   var hasNext = "${report.getParamThreadHasNext(request)}";
+   if (hasNext == "true") {
+   if (!${report.hasError()?string("true", "false")} || parent.isContinueChecked()) {
+   // all actions ok or continue checked, continue automatically
+   continueReport();
+   } else {
+   // wait for user interaction
+   setTimeout('parent.stop();', 10);
+   }// end hasError
+   } else {
+    setTimeout('parent.stop();', 10);
+   }// end hasNext
+  }// end alive
+}
+
+function reload(actionParam) {
+    <#assign resName = report.getResourceList(request).get(0)>
+ var resName = "${resName}";
+ if (resName != "") {
+ resName = "&resource=" + encodeURIComponent(resName);
+ }
+ <#assign dialogUri = report.getDialogRealUri(request)
+         thread = report.getParamThread(request)
+         threadhasnext = report.getParamThreadHasNext(request)>
+ location.href="${StringUtil.wrapString(dialogUri)}?&action=" + actionParam + "&thread=${thread}&threadhasnext=${threadhasnext}" + resName;
+}
+
+
+
+function continueReport() {
+ if (!parent.buttonsInitialized) {
+ parent.initButtons();
+ }
+ parent.disableButtons("buttonrowok");
+ parent.displayButtonRowOk();
+ parent.hasError = false;
+ parent.lastError = "";
+ setTimeout("reload('reportend');", 2000);
+ if (parent.document.main.threadhasnext) {
+ parent.document.main.threadhasnext.value = "false";
+ }
+}
+
+// -->
+</script>
+
+    ${StringUtil.wrapString(report.bodyStart("empty", "style=\"background-color:ThreeDFace;\" onLoad=\"init();\""))}
+    ${StringUtil.wrapString(report.bodyEnd())}
+    ${StringUtil.wrapString(report.htmlEnd())}
+
+ <#break>
+ <#-- ACTION: report begin -->
+ <#case "reportbegin">
+ <#default>
+ ${report.setParamAction("reportend")}
+
+${StringUtil.wrapString(report.htmlStart())}
+
+<script type="text/javascript" language="JavaScript">
+<!--
+
+// saves the HTML of the extended report format,
+// built from the server-side generated JavaScripts
+var htmlText = "";
+
+// boolean flag whether this report is still running
+var isRunning = false;
+
+// boolean flag whether this report received the output of a warning/error message
+var hasError = false;
+
+// saves the last received headline in the report output
+var lastHeadline = "";
+
+// saves the last received warning/error message in the report output
+var lastError = "";
+
+// array to save the formats of the last received messages
+var reportOutputFormats = new Array();
+
+// array to save the last received messages
+var reportOutputMessages = new Array();
+
+// format flags for the HTML formatting of the messages
+var FORMAT_DEFAULT = 0;
+var FORMAT_WARNING = 1;
+var FORMAT_HEADLINE = 2;
+var FORMAT_NOTE = 3;
+var FORMAT_OK = 4;
+var FORMAT_NEWLINE = 5;
+var FORMAT_THROWABLE = 6;
+var FORMAT_ERROR = 7;
+
+// flag indicating that the button rows are initialized
+var buttonsInitialized = false;
+
+function append(message) {
+ reportOutputFormats.push(FORMAT_DEFAULT);
+ reportOutputMessages.push(message);
+}
+
+function appendHead(message) {
+ reportOutputFormats.push(FORMAT_HEADLINE);
+ reportOutputMessages.push(message);
+ lastHeadline = "" + message;
+}
+
+function appendWarning(message) {
+ reportOutputFormats.push(FORMAT_WARNING);
+ reportOutputMessages.push(message);
+}
+
+function appendError(message) {
+ reportOutputFormats.push(FORMAT_ERROR);
+ reportOutputMessages.push(message);
+ hasError = true;
+ lastError = message;
+}
+
+function appendNote(message) {
+ reportOutputFormats.push(FORMAT_NOTE);
+ reportOutputMessages.push(message);
+}
+
+function appendOk(message) {
+ reportOutputFormats.push(FORMAT_OK);
+ reportOutputMessages.push(message);
+}
+
+function appendThrowable(message) {
+ reportOutputFormats.push(FORMAT_THROWABLE);
+ reportOutputMessages.push(message);
+}
+
+function appendBr() {
+ reportOutputFormats.push(FORMAT_NEWLINE);
+ reportOutputMessages.push("");
+}
+
+var cssStyle =
+    "<style type='text/css'>\n" +
+    "body       { box-sizing: border-box; -moz-box-sizing: border-box; padding: 2px; margin: 0; color: #000000; background-color:#ffffff; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; }\n" +
+    "div.main   { box-sizing: border-box; -moz-box-sizing: border-box; color: #000000; white-space: nowrap; }\n" +
+    "span.head  { color: #000099; font-weight: bold; }\n" +
+    "span.note  { color: #666666; }\n" +
+    "span.ok    { color: #009900; }\n" +
+    "span.warn  { color: #990000; padding-left: 40px; }\n" +
+    "span.err   { color: #990000; font-weight: bold; padding-left: 40px; }\n" +  
+    "span.throw { color: #990000; font-weight: bold; }\n" +
+    "span.link1 { color: #666666; }\n" +
+    "span.link2 { color: #666666; padding-left: 40px; }\n" +    
+    "span.link2 { color: #990000; }\n" +    
+    "</style>\n";
+
+var pageStartSimple =
+    "<html>\n<head>\n" +
+    "<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=UTF-8'>\n" +
+    "<link rel='stylesheet' type='text/css' href='/pricat/includes/pricat.css'>\n" +
+    cssStyle +
+    "</head>\n" +
+    "<body style='background-color:Menu;'>\n" +  
+    "<div style='vertical-align:middle; height: 100%;'>\n"+
+    "<table border='0' style='vertical-align:middle; height: 100%;'>\n" +
+    "<tr><td width='40' align='center' valign='middle'><img name='report_img' src='/pricat/images/wait.gif' width='32' height='32' alt=''></td>\n" +
+    "<td valign='middle'>";
+    
+var pageEndSimple =
+ "</td></tr>\n" +
+ "</table></div>\n" +
+ "</body>\n</html>";    
+
+var pageStartExtended =
+    "<html>\n<head>\n" +
+    "<meta HTTP-EQUIV='Content-Type' CONTENT='text/html; charset=UTF-8'>\n"+
+ cssStyle +
+    "</head>\n" +
+    "<body style='overflow: auto;'>\n" +  
+    "<div class='main'>\n";
+    
+var pageEndExtended =
+ "</div>\n" +
+ "</body>\n" +
+ "</html>\n";                                
+
+function start() {
+
+ isRunning = true;
+
+ initButtons();
+}
+
+function stop() {
+ isRunning = false;
+
+ if (document.main.threadhasnext) {
+ document.main.threadhasnext.value = "false";
+ }
+ enableButtons("buttonrowcontinue");
+ enableButtons("buttonrowok");
+
+ updateReport();
+}
+
+// flush the arrays with the report formats and messages
+function flushArray() {
+    reportOutputFormats = new Array();
+ reportOutputMessages = new Array();
+}
+
+// updates the report, builds the HTML string from the JavaScript input
+function update() {
+
+ var size = 512000;
+
+ // resize the HTML string
+    if (htmlText.length > size) {
+        htmlText = htmlText.substring(htmlText.length - size, htmlText.length);
+        var pos = htmlText.indexOf("\n");
+        if (pos > 0) {
+            // cut output at the first linebreak to have a "nice" start
+            htmlText = htmlText.substring(pos, htmlText.length);      
+        }
+    }    
+
+ // append the HTML of the extended report format to the HTML string
+    htmlText += getContentExtended();
+
+ // write the HTML output to the iframe
+ updateReport();
+}
+
+// writes the HTML output to the iframe
+// this function gets also invoked when the report output format is toggled
+function updateReport() {
+
+   pageBody = pageStartExtended + htmlText + pageEndExtended;
+   document.getElementById("report").style.border = "${borderStyle}";
+    report.document.open();    
+    report.document.write(pageBody);
+    report.document.close();
+    
+    setTimeout('doScroll();', 1);
+}
+
+// builds the HTML string from the JavaScript input
+function getContentExtended() {
+ var htmlStr = "";
+ var i = 0;
+ for (i=0;i<reportOutputFormats.length && i<reportOutputMessages.length;i++) {
+ switch (reportOutputFormats[i]) {
+ case FORMAT_WARNING :
+ htmlStr += "<span class='warn'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_ERROR :
+ htmlStr += "<span class='err'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_HEADLINE :
+ htmlStr += "<span class='head'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_NOTE :
+ htmlStr += "<span class='note'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_OK :
+ htmlStr += "<span class='ok'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_NEWLINE :
+ htmlStr += "\n";
+ break;
+ case FORMAT_THROWABLE :
+ htmlStr += "<span class='throw'>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ break;
+ case FORMAT_DEFAULT :
+ default :
+ htmlStr += "<span>";
+ htmlStr += reportOutputMessages[i];
+ htmlStr += "</span>";
+ }
+ }
+
+ return htmlStr;
+}
+
+function doScroll() {
+ var pos = 1000000;
+    report.window.scrollTo(0, pos);
+}
+
+function isContinueChecked() {
+ if (document.main.continuereport && document.main.continuereport.checked == true) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+function displayButtonRowContinue() {
+ displayButtonRow("buttonrowcontinue", true);
+ displayButtonRow("checkcontinue", true);
+ displayButtonRow("buttonrowok", false);
+}
+
+function displayButtonRowOk() {
+ displayButtonRow("buttonrowcontinue", false);
+ toggleButton("continuereport", true);
+ displayButtonRow("buttonrowok", true);
+}
+
+function displayButtonRow(rowId, show) {
+ if (show) {
+ document.getElementById(rowId).className = "show";
+ } else {
+ document.getElementById(rowId).className = "hide";
+ }
+}
+
+function enableButtons(rowId) {
+ if (rowId == "buttonrowcontinue") {
+ toggleButton("contok", false);
+ toggleButton("contcancel", false);
+ } else {
+ toggleButton("okclose", false);
+ }
+}
+
+function disableButtons(rowId) {
+ if (rowId == "buttonrowcontinue") {
+ toggleButton("contok", true);
+ toggleButton("contcancel", true);
+ } else {
+ toggleButton("okclose", true);
+ toggleButton("okcancel", true);
+ }
+}
+
+function toggleButton(buttonId, disableButton) {
+ if (document.getElementById(buttonId))  {
+ document.getElementById(buttonId).disabled = disableButton;
+ }
+}
+
+function initButtons() {
+ if (document.main.threadhasnext && document.main.threadhasnext.value == "true"
+ && document.main.reportcontinuekey && document.main.reportcontinuekey.value != "") {
+ displayButtonRowContinue();
+ } else {
+ displayButtonRowOk();
+ }
+ disableButtons("buttonrowcontinue");
+ disableButtons("buttonrowok");
+ buttonsInitialized = true;
+}
+
+function submitActionRefresh(para1, para2, para3) {
+<#if report.getParamRefreshWorkplace()?has_content && report.getParamRefreshWorkplace() == "true">
+    <#-- workplace must be refresehd (reloaded) -->
+    top.location.href = "${StringUtil.wrapString(report.getDialogRealUri(request))}";
+<#else>
+    <#-- no workplace refresh required -->
+    return submitAction(para1, para2, para3);
+</#if>
+}
+
+//-->
+</script>
+
+    ${StringUtil.wrapString(report.bodyStart("", "onLoad=\"start();\""))}
+    ${StringUtil.wrapString(report.dialogStart())}
+
+<form name="main" action="${StringUtil.wrapString(report.getDialogRealUri(request))}" method="post" class="nomargin" onsubmit="return submitActionRefresh('ok', null, 'main');">
+
+    ${StringUtil.wrapString(report.dialogContentStart(report.getParamTitle(request)))}
+    ${StringUtil.wrapString(report.paramsAsHidden(request))}
+    <input type="hidden" name="action" value>
+    ${StringUtil.wrapString(report.reportIntroductionText())}
+
+<table border="0" cellpadding="0" cellspacing="0" width="100%" height="400">
+<tr>
+ <td><iframe name="report" id="report" src="about:blank" frameborder="0" style="width:99.8%; height:400px; padding: 0; margin: 0; border: ${borderStyle};"></iframe></td>
+</tr>
+</table>
+
+    ${StringUtil.wrapString(report.reportConclusionText())}
+    ${StringUtil.wrapString(report.dialogContentEnd())}
+
+<table width="100%" border="0" cellpadding="0" cellspacing="0">
+  <tr><td width="100%" id="buttonrowcontinue" class="hide">
+    ${StringUtil.wrapString(report.dialogButtonsContinue("id=\"contok\" onclick=\"updateWin.continueReport();\"", "id=\"contcancel\""))}
+  </td></tr>
+  <tr><td width="100%" id="buttonrowok" class="hide">
+    ${StringUtil.wrapString(report.dialogButtonsOkCancel(request, "id=\"okclose\"", "id=\"okcancel\""))}
+  </td></tr>
+  <tr><td>
+  <#assign resources = "">
+  <#if report.getResourceListAsParam(request)?has_content>
+    <#assign resources = report.getResourceListAsParam(request)>
+  </#if>
+    <iframe src="${StringUtil.wrapString(report.getDialogRealUri(request))}?action=reportupdate&thread=${report.getParamThread(request)}&threadhasnext=${report.getParamThreadHasNext(request)}<#if resourceParam?has_content>${"&" + resourceParam + "=" + resources}<#else>${""}</#if>" name="updateWin" style="width:20px; height:20px; margin: 0px;" marginwidth="0"
+            marginheight="0" frameborder="0" framespacing="0" scrolling="no" class='hide'></iframe>
+  </td></tr>
+</table>
+
+<table border="0" cellpadding="0" cellspacing="0" align="center"><tr>
+<td class="hide" style="width: 100%; text-align: center;" id="checkcontinue"><input type="checkbox" name="continuereport" id="continuereport" value="true">&nbsp;${StringUtil.wrapString(report.getParamReportContinueKey())}</td>
+</tr></table>
+
+</form>
+
+    ${StringUtil.wrapString(report.dialogEnd())}
+    ${StringUtil.wrapString(report.bodyEnd())}
+    ${StringUtil.wrapString(report.htmlEnd())}
+
+</#switch>
+<#-- //////////////////// end of switch statement -->

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportHistory.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportHistory.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportHistory.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportHistory.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,31 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<div id="wrapper">
+ <div id="page-wrapper" class="gray-bg">
+ <div class="row">
+ <div class="col-lg-12">
+ <div class="ibox float-e-margins">
+ <div class="ibox-content text-left p-md">
+ <#include "component://pricat/webapp/pricat/ftl/ExcelImportHistoryReport.ftl"/>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
\ No newline at end of file

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportLog.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportLog.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportLog.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricat/ftl/viewExcelImportLog.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,39 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<div id="wrapper">
+ <div id="page-wrapper" class="gray-bg">
+ <div class="row">
+ <div class="col-lg-12">
+ <div class="ibox float-e-margins">
+ <div id="htmlreport" class="ibox-content text-left p-md">
+
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+
+<script language='JavaScript'>
+<!--
+jQuery(document).ready( function() {
+ jQuery("#htmlreport").html("${StringUtil.wrapString(logFileContent!)}");
+});
+//-->
+</script>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricat/includes/pricat.css
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricat/includes/pricat.css?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricat/includes/pricat.css (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricat/includes/pricat.css Mon Nov 21 08:07:57 2016
@@ -0,0 +1,255 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.main input {
+ margin-right: 7px;
+}
+
+/* headline of dialog window */
+.dialoghead {
+ background-color: ActiveCaption;
+ margin-bottom: 8px;
+ padding: 2px;
+ color: CaptionText;
+ font-size: 12px;
+ font-weight: bold;
+ white-space: nowrap;
+}
+
+
+/* outer table of complete dialog window */
+table.dialog {
+    margin: 20px auto;
+ width: 85%;
+ border-left: 1px solid ThreeDLightShadow;
+ border-top: 1px solid ThreeDLightShadow;
+ border-right: 1px solid ThreedDarkShadow;
+ border-bottom: 1px solid ThreedDarkShadow;
+}
+
+/* inner table of complete dialog window */
+table.dialogbox {
+ width: 100%;
+ background-color: ThreeDFace;
+ background-color: ThreeDFace;
+ border-left: 1px solid ThreeDHighlight;
+ border-top: 1px solid ThreeDHighlight;
+ border-right: 1px solid ThreeDShadow;
+ border-bottom: 1px solid ThreeDShadow;
+ padding-top: 1px;
+
+}
+
+body.dialog {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ padding: 0;
+ margin: 0;
+
+}
+
+/* Button - Image button in image style */
+img.button {
+ height: 20px;
+ width: 20px;
+ border: 0px none;
+ vertical-align: middle;
+}
+
+/* Button - Link (href) style */
+a.button {
+ color: ButtonText;
+ text-decoration: none;
+ cursor: pointer;
+}
+
+/* Button - Normal style (inactive) */
+span.norm {
+ display: block;
+ border: 1px solid ThreeDFace;
+}
+
+/* Button - Hover style */
+span.over {
+ display: block;
+ border-top: 1px solid ThreeDHighlight;
+ border-left: 1px solid ThreeDHighlight;
+ border-bottom: 1px solid ThreeDShadow;
+ border-right: 1px solid ThreeDShadow;
+}
+
+/* Button - Push style */
+span.push {
+ display: block;
+ border-top: 1px solid ThreeDShadow;
+ border-left: 1px solid ThreeDShadow;
+ border-bottom: 1px solid ThreeDHighlight;
+ border-right: 1px solid ThreeDHighlight;
+}
+
+/* Button - Disabled style */
+span.disabled {
+ display: block;
+ border: 1px solid ThreeDFace;
+ color: GrayText;
+}
+
+/* Button - Separator */
+span.separator {
+ display: block;
+ height: 18px;
+ width: 0px;
+ border-top: 0px;
+ border-left: 1px solid ThreeDShadow;
+ border-bottom: 0px;
+ border-right: 1px solid ThreeDHighlight;
+}
+
+/* final button row of dialog window */
+.dialogbuttons {
+ padding: 3px 8px 5px;
+ text-align: center;
+
+}
+
+.dialogcontent {
+ border-left: 1px solid ThreeDHighlight;
+ border-top: 1px solid ThreeDHighlight;
+ border-right: 2px solid ThreeDShadow;
+ border-bottom: 2px solid ThreeDShadow;
+ margin: 8px;
+ padding: 15px;
+}
+
+/* Submit and other buttons */
+input.dialogbutton {
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ background-color: ButtonFace;
+ width: 100px;
+ height: 20px;
+ padding: 0 5px;
+ margin-left: 12px;
+ overflow: visible;
+}
+
+/* empty dummy style */
+.empty {}
+
+/* element without margin and padding */
+.nomargin {
+ padding: 0;
+ margin: 0;
+}
+
+/* hide a block */
+.hide {
+ display: none;
+ visibility: hidden;
+}
+
+/* show a block */
+.show {
+ display: inline;
+ visibility: visible;
+}
+
+.help {
+    color: InfoText;
+    position: absolute;
+    top: 0px;
+    left: 0px;
+    padding: 5px;
+    width: 200px;
+    border: 1px solid WindowFrame;
+    background-color: InfoBackground;
+    visibility: hidden;
+    font-size: 8pt;
+}
+
+span.head  { color: #000099; font-weight: bold; }
+span.note  { color: #666666; }
+span.ok    { color: #009900; }
+span.warn  { color: #990000; padding-left: 40px; }
+span.err   { color: #990000; font-weight: bold; padding-left: 40px; }  
+span.throw { color: #990000; font-weight: bold; }
+
+.text-left {
+  text-align: left;
+}
+
+.p-md {
+  padding: 25px;
+}
+
+.table-striped > tbody > tr:nth-of-type(odd) {
+  background-color: #f9f9f9;
+}
+
+.table > thead > tr > th {
+  border-bottom: 1px solid #DDDDDD;
+  vertical-align: bottom;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+  border-top: 1px solid #e7eaec;
+  line-height: 1.42857;
+  padding: 8px;
+  vertical-align: top;
+}
+
+.ms-table-primary thead{
+ background-color: #eeeeee;
+}
+.ms-table-primary tr.ms-table-header,
+tr.ms-table-header span{
+ font-weight: bold;
+}
+.ms-table-primary{
+ width: 100%;
+ border:0;
+ margin:0;
+ border-collapse:collapse;
+}
+.ms-table-primary td,th{
+ padding:0;
+ text-align: center;
+ vertical-align: middle !important;
+}
+.ms-table-primary .text-left{
+ padding:0;
+ text-align: left;
+ vertical-align: middle !important;
+}
+.ms-table-primary .text-right{
+ padding:0;
+ text-align: right;
+ vertical-align: middle !important;
+}
+
+.p-xs {
+  padding: 10px;
+}
+.p-sm {
+  padding: 15px;
+}

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricat/index.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricat/index.jsp?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricat/index.jsp (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricat/index.jsp Mon Nov 21 08:07:57 2016
@@ -0,0 +1,20 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
+
+<%response.sendRedirect("control/main");%>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/controller.xml?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/controller.xml (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/controller.xml Mon Nov 21 08:07:57 2016
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://ofbiz.apache.org/Site-Conf" xsi:schemaLocation="http://ofbiz.apache.org/Site-Conf http://ofbiz.apache.org/dtds/site-conf.xsd">
+    <!-- The controller elements that are common to all OFBiz components
+         can be found in the following xml file. A component can override the
+         elements found in the common-controller.xml file. -->
+    <include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
+    <include location="component://common/webcommon/WEB-INF/portal-controller.xml"/>
+    
+    <description>PriCat Demo</description>
+
+    <!-- define -->
+    <request-map uri="main">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="main"/>
+        <response name="error" type="view" value="login" />
+    </request-map>
+        
+    <request-map uri="countdownreport">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.apache.ofbiz.htmlreport.sample.SampleHtmlReport" invoke="checkButton" />
+        <response name="success" type="view" value="countdownreport"/>
+        <response name="ok" type="view" value="main"/>
+        <response name="cancel" type="view" value="main"/>
+    </request-map>
+
+    <request-map uri="countupreport">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.apache.ofbiz.htmlreport.sample.SampleHtmlReport" invoke="checkButton" />
+        <response name="success" type="view" value="countupreport"/>
+        <response name="ok" type="view" value="main"/>
+        <response name="cancel" type="view" value="main"/>
+    </request-map>
+    
+    <request-map uri="SamplePricat">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="SamplePricat"/>
+    </request-map>
+    
+    <request-map uri="downloadExcelTemplate">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.apache.ofbiz.pricat.sample.SamplePricatEvents" invoke="downloadExcelTemplate"/>
+        <response name="success" type="none" />
+        <response name="error" type="none" />
+    </request-map>
+
+    <request-map uri="pricatUpload">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.apache.ofbiz.pricat.PricatEvents" invoke="pricatUpload"/>
+        <response name="success" type="view" value="main"/>
+        <response name="error" type="view" value="main"/>
+        <response name="parse_pricat" type="request" value="parseSamplePricat"/>
+        <response name="download" type="none"/>
+    </request-map>
+
+    <request-map uri="parseSamplePricat">
+        <security https="true" auth="true"/>
+        <event type="java" path="org.apache.ofbiz.pricat.PricatParseExcelHtmlReport" invoke="checkButton" />
+        <response name="success" type="view" value="parseSamplePricat"/>
+        <response name="ok" type="request" value="SamplePricat"/>
+        <response name="cancel" type="request" value="main"/>
+    </request-map>
+
+    <view-map name="main" type="screen" page="component://pricat/widget/SampleScreens.xml#main"/>
+    <view-map name="countdownreport" type="screen" page="component://pricat/widget/SampleScreens.xml#countdownreport"/>
+    <view-map name="countupreport" type="screen" page="component://pricat/widget/SampleScreens.xml#countupreport"/>
+    <view-map name="SamplePricat" page="component://pricat/widget/SampleScreens.xml#SamplePricat" type="screen"/>
+    <view-map name="parseSamplePricat" page="component://pricat/widget/SampleScreens.xml#parseSamplePricat" type="screen"/>
+</site-conf>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/web.xml?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/web.xml (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/WEB-INF/web.xml Mon Nov 21 08:07:57 2016
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<web-app version="3.0">
+
+    <display-name>Apache OFBiz - PriCat Demo</display-name>
+    <description>PriCat Demo Application of the Apache OFBiz Project</description>
+
+    <context-param>
+        <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description>
+        <param-name>localDispatcherName</param-name><param-value>pricat</param-value>
+    </context-param>
+    <context-param>
+        <description>The Name of the Entity Delegator to use, defined in entityengine.xml</description>
+        <param-name>entityDelegatorName</param-name><param-value>default</param-value>
+    </context-param>
+    <context-param>
+        <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description>
+        <param-name>mainDecoratorLocation</param-name>
+        <param-value>component://pricat/widget/SampleScreens.xml</param-value>
+    </context-param>
+    <context-param>
+        <description>Remove unnecessary whitespace from HTML output.</description>
+        <param-name>compressHTML</param-name>
+        <param-value>false</param-value>
+    </context-param>
+
+    <filter>
+        <display-name>ControlFilter</display-name>
+        <filter-name>ControlFilter</filter-name>
+        <filter-class>org.apache.ofbiz.webapp.control.ControlFilter</filter-class>
+        <init-param>
+            <param-name>allowedPaths</param-name>
+            <param-value>/error:/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/js:/ws</param-value>
+        </init-param>
+        <init-param>
+            <param-name>redirectPath</param-name>
+            <param-value>/control/main</param-value>
+        </init-param>
+    </filter>
+    <filter>
+        <display-name>ContextFilter</display-name>
+        <filter-name>ContextFilter</filter-name>
+        <filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
+    </filter>
+    <filter-mapping>
+        <filter-name>ControlFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
+        <filter-name>ContextFilter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+
+    <listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
+    <listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+    <!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
+    <!-- <listener><listener-class>org.apache.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener> -->
+
+    <servlet>
+        <description>Main Control Servlet</description>
+        <display-name>ControlServlet</display-name>
+        <servlet-name>ControlServlet</servlet-name>
+        <servlet-class>org.apache.ofbiz.webapp.control.ControlServlet</servlet-class>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+    <servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
+
+    <session-config>
+        <session-timeout>60</session-timeout><!-- in minutes -->
+        <cookie-config>
+          <http-only>true</http-only>
+          <secure>true</secure>
+        </cookie-config>
+        <tracking-mode>COOKIE</tracking-mode>
+    </session-config>
+
+    <welcome-file-list>
+        <welcome-file>index.jsp</welcome-file>
+        <welcome-file>index.html</welcome-file>
+        <welcome-file>index.htm</welcome-file>
+    </welcome-file-list>
+</web-app>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/downloads/SamplePricatTemplate_V1.1.xlsx
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/downloads/SamplePricatTemplate_V1.1.xlsx?rev=1770621&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/downloads/SamplePricatTemplate_V1.1.xlsx
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/error/error.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/error/error.jsp?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/error/error.jsp (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/error/error.jsp Mon Nov 21 08:07:57 2016
@@ -0,0 +1,52 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
+<%@ page import="org.apache.ofbiz.base.util.*" %>
+<html>
+<head>
+<title>OFBiz Message</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+</head>
+
+<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
+
+<body bgcolor="#FFFFFF">
+<div align="center">
+  <br/>
+  <table width="100%" border="1" height="200">
+    <tr>
+      <td>
+        <table width="100%" border="0" height="200">
+          <tr bgcolor="#CC6666">
+            <td height="45">
+              <div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
+            </td>
+          </tr>
+          <tr>
+            <td>
+              <div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
+            </td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+  </table>
+</div>
+<div align="center"></div>
+</body>
+</html>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/SamplePricat.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/SamplePricat.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/SamplePricat.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/SamplePricat.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,52 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.ParseSamplePricat}</li>
+    </ul>
+    <br class="clear"/>
+  </div>
+  <div class="screenlet-body">
+  <form method="post" enctype="multipart/form-data" action="<@ofbizUrl>pricatUpload</@ofbizUrl>">
+ <input type="hidden" name="action" value="store_excel" />
+    <input type="file" size="60" name="filename"/><br />
+    ${uiLabelMap.ExcelTemplateType}:
+    <select name="excelTemplateType" id="excelTemplateType">
+      <option value="sample_pricat" checked>${uiLabelMap.SamplePricatType}</option>
+      <option value="ofbiz_pricat">${uiLabelMap.OFBizPricatType}</option>
+    </select>
+    <div class="button-bar"><input type="submit" value="${uiLabelMap.UploadPricat}"/></div>
+  </form>
+  </div>
+</div>
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.SamplePricatTemplate}</li>
+    </ul>
+    <br class="clear"/>
+  </div>
+  <div class="screenlet-body">
+    <label id="downloadTemplate">
+      <a href="<@ofbizUrl>downloadExcelTemplate?templateType=pricatExcelTemplate</@ofbizUrl>" target="_BLANK" class="buttontext">${uiLabelMap.DownloadPricatTemplate}</a>
+    </label>
+    <br class="clear"/>
+  </div>
+</div>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countdownreport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countdownreport.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countdownreport.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countdownreport.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,21 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+    <#assign report = Static["org.apache.ofbiz.htmlreport.sample.SampleHtmlReport"].getReport(request, response)>
+    ${report.prepareDisplayReport(request, response, "countdown", "/pricatdemo/control/countdownreport")}
+    <#include "component://pricat/webapp/pricat/ftl/report.ftl">

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countupreport.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countupreport.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countupreport.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/countupreport.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,21 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+    <#assign report = Static["org.apache.ofbiz.htmlreport.sample.SampleHtmlReport"].getReport(request, response)>
+    ${report.prepareDisplayReport(request, response, "countup", "/pricatdemo/control/countupreport")}
+    <#include "component://pricat/webapp/pricat/ftl/report.ftl">

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/main.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/main.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/main.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/main.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,33 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<div class="screenlet">
+  <div class="screenlet-title-bar">
+    <ul>
+      <li class="h3">${uiLabelMap.PriCatDemoMainPage}</li>
+    </ul>
+    <br class="clear"/>
+  </div>
+  <div class="screenlet-body">
+      <br />
+      <div>${uiLabelMap.PricatDemoMessage}</div>
+      <br />
+      <br />
+  </div>
+</div>

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/parsePricatExcel.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/parsePricatExcel.ftl?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/parsePricatExcel.ftl (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/ftl/parsePricatExcel.ftl Mon Nov 21 08:07:57 2016
@@ -0,0 +1,21 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+    <#assign report = Static["org.apache.ofbiz.pricat.PricatParseExcelHtmlReport"].getReport(request, response)>
+    ${report.prepareDisplayReport(request, response, "parse_excel", "/pricatdemo/control/parseSamplePricat")}
+    <#include "component://pricat/webapp/pricat/ftl/pricatreport.ftl">

Added: ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/index.jsp
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/index.jsp?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/index.jsp (added)
+++ ofbiz/trunk/specialpurpose/pricat/webapp/pricatdemo/index.jsp Mon Nov 21 08:07:57 2016
@@ -0,0 +1,20 @@
+<%--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+--%>
+
+<%response.sendRedirect("control/main");%>

Added: ofbiz/trunk/specialpurpose/pricat/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/widget/CommonScreens.xml?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/widget/CommonScreens.xml (added)
+++ ofbiz/trunk/specialpurpose/pricat/widget/CommonScreens.xml Mon Nov 21 08:07:57 2016
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+    <screen name="main-decorator">
+        <section>
+            <actions>
+                <set field="activeApp" value="pricat" global="true"/>
+                <property-map resource="PricatUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <set field="layoutSettings.companyName" from-field="uiLabelMap.PriCatCompanyName" global="true"/>
+                <set field="applicationMenuName" value="PriCatAppBar" global="true"/>
+                <set field="applicationMenuLocation" value="component://pricat/widget/PriCatMenus.xml" global="true"/>
+                <set field="applicationTitle" value="${uiLabelMap.PriCatApplication}" global="true"/>
+                <set field="layoutSettings.styleSheets[]" value="/pricat/includes/pricat.css" global="true"/>
+            </actions>
+            <widgets>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="viewExcelImportHistory">
+        <section>
+            <actions>
+                <property-map resource="PricatUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="titleProperty" value="ViewExcelImportHistory"/>
+
+ <script location="component://pricat/groovyScripts/pricat/FindMyExcelImport.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://pricat/webapp/pricat/ftl/viewExcelImportHistory.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="viewExcelImportLog">
+        <section>
+            <actions>
+                <property-map resource="PricatUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="titleProperty" value="ViewExcelImportLogContent"/>
+
+ <script location="component://pricat/groovyScripts/pricat/FindMyExcelImportLog.groovy"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://pricat/webapp/pricat/ftl/viewExcelImportLog.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>

Added: ofbiz/trunk/specialpurpose/pricat/widget/PriCatDemoMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/widget/PriCatDemoMenus.xml?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/widget/PriCatDemoMenus.xml (added)
+++ ofbiz/trunk/specialpurpose/pricat/widget/PriCatDemoMenus.xml Mon Nov 21 08:07:57 2016
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">
+    
+    <menu name="PriCatDemoAppBar" title="${uiLabelMap.PriCatDemoApplication}"  extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="countdownreport" title="${uiLabelMap.PriCatDemoCountDown}">
+            <link target="countdownreport"/>
+        </menu-item>
+        <menu-item name="countupreport" title="${uiLabelMap.PriCatDemoCountUp}">
+            <link target="countupreport"/>
+        </menu-item>
+        <menu-item name="SamplePricat" title="${uiLabelMap.PriCatDemoParseSamplePricat}">
+            <link target="SamplePricat"/>
+        </menu-item>
+        <menu-item name="main" title="${uiLabelMap.CommonMain}">
+            <link target="main"/>
+        </menu-item>
+    </menu>
+    
+</menus>
\ No newline at end of file

Added: ofbiz/trunk/specialpurpose/pricat/widget/PriCatMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/widget/PriCatMenus.xml?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/widget/PriCatMenus.xml (added)
+++ ofbiz/trunk/specialpurpose/pricat/widget/PriCatMenus.xml Mon Nov 21 08:07:57 2016
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns="http://ofbiz.apache.org/Widget-Menu" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Menu http://ofbiz.apache.org/dtds/widget-menu.xsd">
+    
+    <menu name="PriCatAppBar" title="${uiLabelMap.PriCatApplication}"  extends="CommonAppBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
+        <menu-item name="main" title="${uiLabelMap.ViewExcelImportHistory}">
+            <link target="main"/>
+        </menu-item>
+    </menu>
+    
+</menus>
\ No newline at end of file

Added: ofbiz/trunk/specialpurpose/pricat/widget/SampleScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/pricat/widget/SampleScreens.xml?rev=1770621&view=auto
==============================================================================
--- ofbiz/trunk/specialpurpose/pricat/widget/SampleScreens.xml (added)
+++ ofbiz/trunk/specialpurpose/pricat/widget/SampleScreens.xml Mon Nov 21 08:07:57 2016
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
+
+    <screen name="main-decorator">
+        <section>
+            <actions>
+                <set field="activeApp" value="pricatdemo" global="true"/>
+                <property-map resource="PricatUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+
+                <set field="layoutSettings.companyName" from-field="uiLabelMap.PriCatDemoCompanyName" global="true"/>
+                <set field="applicationMenuName" value="PriCatDemoAppBar" global="true"/>
+                <set field="applicationMenuLocation" value="component://pricat/widget/PriCatDemoMenus.xml" global="true"/>
+                <set field="applicationTitle" value="${uiLabelMap.PriCatDemoApplication}" global="true"/>
+            </actions>
+            <widgets>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="main">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="main"></set>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+ <section>
+    <widgets>
+    <platform-specific>
+    <html>
+                                        <html-template location="component://pricat/webapp/pricatdemo/ftl/main.ftl"/>
+    </html>
+    </platform-specific>
+                            </widgets>
+ </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="countdownreport">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="countdownreport"></set>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+ <section>
+    <widgets>
+    <platform-specific>
+    <html>
+                                        <html-template location="component://pricat/webapp/pricatdemo/ftl/countdownreport.ftl"/>
+    </html>
+    </platform-specific>
+                            </widgets>
+ </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="countupreport">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="countupreport"></set>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator">
+                    <decorator-section name="body">
+ <section>
+    <widgets>
+    <platform-specific>
+    <html>
+                                        <html-template location="component://pricat/webapp/pricatdemo/ftl/countupreport.ftl"/>
+    </html>
+    </platform-specific>
+                            </widgets>
+ </section>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="SamplePricat">
+        <section>
+            <actions>
+                <set field="tabButtonItem" value="SamplePricat"></set>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://pricat/webapp/pricatdemo/ftl/SamplePricat.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+    <screen name="parseSamplePricat">
+        <section>
+            <actions>
+                <property-map resource="PricatUiLabels" map-name="uiLabelMap" global="true"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://pricat/webapp/pricatdemo/ftl/parsePricatExcel.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+
+</screens>