svn commit: r487891 - in /incubator/ofbiz/trunk/framework: base/config/pos-containers.xml guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java

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

svn commit: r487891 - in /incubator/ofbiz/trunk/framework: base/config/pos-containers.xml guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java

jleroux@apache.org
Author: jleroux
Date: Sat Dec 16 13:26:10 2006
New Revision: 487891

URL: http://svn.apache.org/viewvc?view=rev&rev=487891
Log:
To resolve "Harcoded string to POS startupFile in GUIAPP component" (https://issues.apache.org/jira/browse/OFBIZ-471)

Modified:
    incubator/ofbiz/trunk/framework/base/config/pos-containers.xml
    incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java

Modified: incubator/ofbiz/trunk/framework/base/config/pos-containers.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/config/pos-containers.xml?view=diff&rev=487891&r1=487890&r2=487891
==============================================================================
--- incubator/ofbiz/trunk/framework/base/config/pos-containers.xml (original)
+++ incubator/ofbiz/trunk/framework/base/config/pos-containers.xml Sat Dec 16 13:26:10 2006
@@ -41,6 +41,7 @@
 
     <!-- load the POS GUI -->
     <container name="pos-container" class="org.ofbiz.pos.container.PosContainer">
+        <property name="startup-directory" value="/specialpurpose/pos/config/"/>
         <property name="startup-file" value="xpos.properties"/>
         <property name="dispatcher-name" value="POSDispatcher"/>
         <property name="delegator-name" value="default"/>

Modified: incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java?view=diff&rev=487891&r1=487890&r2=487891
==============================================================================
--- incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java (original)
+++ incubator/ofbiz/trunk/framework/guiapp/src/org/ofbiz/guiapp/xui/XuiContainer.java Sat Dec 16 13:26:10 2006
@@ -39,6 +39,7 @@
 
     protected XuiScreen initialScreen = null;
 
+    protected String startupDir = null;
     protected String startupFile = null;
     protected String configFile = null;
 
@@ -93,10 +94,11 @@
 
         // load the XUI and render the initial screen
         if (this.startupFile == null) {
-            this.startupFile = ContainerConfig.getPropertyValue(cc, "startup-file", "xui.properties");
+            this.startupDir = ContainerConfig.getPropertyValue(cc, "startup-directory", "/specialpurpose/pos/config/");
+            this.startupFile = ContainerConfig.getPropertyValue(cc, "startup-file", "xpos.properties");
         }
         this.initialScreen = new XuiScreen();
-        this.initialScreen.setup(this.startupFile);                
+        this.initialScreen.setup(this.startupDir, this.startupFile);                
 
         return true;
     }
@@ -129,8 +131,8 @@
 
     class XuiScreen extends XApplet {
 
-        public void setup(String startupFile) {
-            String xuiProps = System.getProperty("ofbiz.home") + "/specialpurpose/pos/config/" + startupFile;
+        public void setup(String startupDir, String startupFile) {
+            String xuiProps = System.getProperty("ofbiz.home") + startupDir + startupFile;
             String suffix = Locale.getDefault().getLanguage();
             if ("en".equals(suffix)) {
                 suffix = "";