You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2009/12/12 00:11:51 UTC

svn commit: r889851 [16/17] - in /ofbiz/branches/addbirt: ./ applications/accounting/config/ applications/accounting/data/ applications/accounting/data/helpdata/ applications/accounting/entitydef/ applications/accounting/script/org/ofbiz/accounting/fin...

Modified: ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java (original)
+++ ofbiz/branches/addbirt/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java Fri Dec 11 23:11:39 2009
@@ -67,9 +67,7 @@
 import com.thoughtworks.selenium.DefaultSelenium;
 import com.thoughtworks.selenium.SeleniumException;
 
-
 public class SeleniumXml {
-    //public static final String PROPS_NAME = "selenium.config";
     public static String PROPS_NAME = "selenium.config";
     Logger  logger = Logger.getLogger(SeleniumXml.class.getName());
 
@@ -83,7 +81,7 @@
     private String username;
     private String password;
     private String testCaseDirectory;
-    
+
     public static void main(String[] args) throws JDOMException, IOException, TestCaseException{
         if(args.length == 0) {
             System.out.println("Please include a path for the selenium XML test file.");
@@ -104,7 +102,7 @@
                 System.err.println(" Argument : "+ args[0] );
                 System.err.println(" Full absolute path of file : "+ testFile.getAbsolutePath()  );
                 System.err.println(" Full canonical path of file : "+ testFile.getCanonicalPath() );
-                
+
                 sel.testCaseDirectory =  sel.getFileDirectory(testFile.getAbsolutePath());
                 System.err.println(" testCaseDirectory: "+ sel.testCaseDirectory );
                  sel.runTest( testFile.getAbsolutePath() );
@@ -113,7 +111,7 @@
             }
         }
     }
-   
+
     /* call run test suite from webtool selenium */
     public static String runTestSuite(HttpServletRequest request, HttpServletResponse response){
         Map parameters = UtilHttp.getParameterMap(request);
@@ -135,17 +133,16 @@
              SeleniumXml sel = new SeleniumXml();
              File testFile = new File(para.trim());
              if (testFile.exists()) {
-                 System.err.println(" Argument : "+ para.trim() );
-                 System.err.println(" Full absolute path of file : "+ testFile.getAbsolutePath()  );
-                 System.err.println(" Full canonical path of file : "+ testFile.getCanonicalPath() );
-                 
-                 sel.testCaseDirectory =  sel.getFileDirectory(testFile.getAbsolutePath());
-                 System.err.println(" testCaseDirectory: "+ sel.testCaseDirectory );
-                  sel.runTest( testFile.getAbsolutePath() );
-             } else {
-                 System.err.println("Test File is not exist :"+para.trim());
-             }
-             //sel.runTest(para.trim());
+                System.err.println(" Argument : "+ para.trim() );
+                System.err.println(" Full absolute path of file : "+ testFile.getAbsolutePath()  );
+                System.err.println(" Full canonical path of file : "+ testFile.getCanonicalPath() );
+
+                sel.testCaseDirectory =  sel.getFileDirectory(testFile.getAbsolutePath());
+                System.err.println(" testCaseDirectory: "+ sel.testCaseDirectory );
+                sel.runTest( testFile.getAbsolutePath() );
+            } else {
+                System.err.println("Test File is not exist :"+para.trim());
+            }
         }catch(JDOMException jdome){
              System.out.println(jdome.getMessage());
          }catch(IOException ioe){
@@ -154,7 +151,7 @@
              return "success";
          }
     }
-    
+
     private String getFileDirectory(String filePath){
         String directory = null;
         if (filePath.indexOf(File.separatorChar) != -1   ) {
@@ -163,7 +160,7 @@
         }
         return directory;
     }
-    
+
     public SeleniumXml() throws IOException {
         this.map = FastMap.newInstance();
         if (props == null) {
@@ -176,8 +173,6 @@
     private static void initConfig() throws IOException {
         try {
             String configFile = System.getProperty(PROPS_NAME);
-            //System.out.println("Looking for " + PROPS_NAME);
-            //System.out.println("Found following config file: " + configFile);
             if (configFile == null) {
                 String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + PROPS_NAME + " is not set, cannot resolve location.";
                 throw new MalformedURLException(errMsg);
@@ -192,23 +187,22 @@
             throw e;
         }
     }
-    
+
     private static void initConfig(URL url) throws IOException {
         try {
             if (url == null) {
                 String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + url.toString() + " is not set, cannot resolve location.";
                 throw new MalformedURLException(errMsg);
             }
-           // BasicConfigurator.configure();
             props = UtilProperties.getProperties(url);
         } catch (IOException e) {
             e.printStackTrace();
             throw e;
         }
     }
-    
+
     /**
-     * Constructor to preset with an existing Map of parameters.  Intended to be used 
+     * Constructor to preset with an existing Map of parameters.  Intended to be used
      * for nested Selenium tests.
      * @param map
      */
@@ -232,18 +226,16 @@
 
     public void runCommands() throws TestCaseException {
         Element root = this.doc.getRootElement();
-        //List<Element> nodes = UtilGenerics.cast(root.getChildren());
         List<Element> nodes = root.getChildren();
         runCommands(nodes);
     }
-    
+
     public void runCommands(List<Element> nodes) throws TestCaseException{
-        
         for(Element elem: nodes) {
             String thisName = elem.getName();
             if("type" == elem.getName()) {
                 typeCmd(elem);
-                
+
             } else if("setParam" == thisName) {
                 setParam(elem);
             } else if("clickAt" == thisName) {
@@ -278,6 +270,8 @@
                 testcase(elem);
             } else if("assertContains" == thisName) {
                 assertContains(elem);
+            } else if("assertNotContains" == thisName) {
+                assertNotContains(elem);
             } else if("getHtmlSource" == thisName) {
                 getHtmlSource(elem);
             } else if("getBodyText" == thisName) {
@@ -296,11 +290,11 @@
                 appendCmd(elem);
             } else if("loadParameter" == thisName) {
                 loadParameter(elem);
-            }else if("partialRunDependency" == thisName) {
+            } else if("partialRunDependency" == thisName) {
                 partialRunDependency(elem);
-            }else if("if" == thisName) {
+            } else if("if" == thisName) {
                 ifCmd(elem);
-            }else if("open" == thisName) {
+            } else if("open" == thisName) {
                 openCmd(elem);
             } else if("click" == thisName) {
                 clickCmd(elem);
@@ -324,26 +318,22 @@
                 openWindow(elem);
             } else if("selectWindow" == thisName) {
                 selectWindow(elem);
+            }  else if("assertConfirmation" == thisName) {
+                assertConfirmation(elem);
             } else if("runScript" == thisName) {
                 runScript(elem);
-             } else {
-                //logger.error("Unknown SeleniumXml command found:"+elem.getName());
-                //Use reflection with parameters using the naming convention param1, param2, and any return results stored 
-                //in map using "out"
+            } else {
                 logger.info("Undefined command calling by reflection for command: " + thisName);
                 callByReflection(elem);
             }
         }
-        
     }
-    
+
     private void callByReflection(Element elem) {
-        
         String methodName = elem.getName();
-        //Support two parameters for all selenium RC calls
-        String param1 = elem.getAttributeValue("param1");  
-        String param2 = elem.getAttributeValue("param2");  
-    
+        String param1 = elem.getAttributeValue("param1");
+        String param2 = elem.getAttributeValue("param2");
+
         Class[] paramTypes = null;
         Object[] args = null;
         if( (param1 != null)  && (param2 != null) ) {
@@ -358,147 +348,138 @@
         }
 
         //Capture the output name for "get" methods
-        String out = elem.getAttributeValue("out");  
-        
+        String out = elem.getAttributeValue("out");
+
         Method m;
         try {
             m = (Method) this.sel.getClass().getDeclaredMethod(methodName, paramTypes);
             Object results = m.invoke(this.sel, args);
-            
+
             //Add output parameter to common map
             if( (out != null) && (results != null)) {
                 addParam(out, results);
             }
         } catch (Exception e) {
-            // TODO Auto-generated catch block
             logger.error("Exception occurred when Unknown SeleniumXml command found:"+elem.getName());
             e.printStackTrace();
         }
     }
-    
+
     public void waitForValue(Element elem) {
-        
         String locator = replaceParam(elem.getAttributeValue("locator"));
         String timeout = elem.getAttributeValue("timeout");
         String outParam = elem.getAttributeValue("out");
-        
+
         int maxTime = Integer.parseInt(timeout);
         int maxSeconds = maxTime/1000;
         logger.debug("waitForValue: locator=" + locator + " timeout=" + timeout);
-        //this.sel.waitForCondition(script, timeout);
         String foundValue = null;
         for(int second=0;; second++) {
             if(second >= maxSeconds) {
                 throw new SeleniumException("waitForValue exceeded timeout: " + maxTime);
             }
-            try{ 
+            try{
                 //getValue throws an exception if it can't find locator
                 // - sleep for 1 sec and try again
                 // - otherwise break as we found the value
-                foundValue = sel.getValue(locator); 
+                foundValue = sel.getValue(locator);
                 if(outParam != null) {
                     this.addParam(outParam, foundValue);
                 }
-                break; //
-            } catch(Exception e) { 
+                break;
+            } catch(Exception e) {
                 //wait for 1 second and then resume
                 try {
                     Thread.sleep(1000);
                 } catch (InterruptedException threadE) {
-                    // TODO Auto-generated catch block
                     threadE.printStackTrace();
                 }
             }
         }
-    }    
-    
+    }
+
     public void setParam(Element elem) {
-        
         String name = replaceParam(elem.getAttributeValue("name"));
         String value = replaceParam(elem.getAttributeValue("value"));
-        
+
         if( (name != null) && (value != null)) {
             this.addParam(name, value);
         }
     }
+
     public void getValueCmd(Element elem) {
-        
         String locator = replaceParam(elem.getAttributeValue("locator"));
         String outParam = elem.getAttributeValue("out");
-        
+
         logger.debug("getValueCmd: locator=" + locator);
-        String foundValue = sel.getValue(locator); 
+        String foundValue = sel.getValue(locator);
         if(outParam != null) {
             this.addParam(outParam, foundValue);
         }
-    }    
-    
+    }
+
     public void waitForCondition(Element elem) {
-        
         String script = elem.getAttributeValue("script");
         String timeout = elem.getAttributeValue("timeout");
-        
+
         logger.debug("waitForCondition: script=" + script + " timeout=" + timeout);
         this.sel.waitForCondition(script, timeout);
     }
-    
+
     public void openWindow(Element elem) {
-        
         String url = elem.getAttributeValue("url");
         String windowId = replaceParam(elem.getAttributeValue("windowId"));
-        
+
         logger.debug("openWindow: url=" + url + " windowId=" + windowId);
         this.sel.openWindow(url, windowId);
         return;
     }
-    
+
     public void selectWindow(Element elem) {
-        
         String windowId = replaceParam(elem.getAttributeValue("windowId"));
-        
+
         logger.debug("selectWindow:  windowId=" + windowId);
         this.sel.selectWindow(windowId);
         return;
     }
-    
+
     public void runScript(Element elem) {
-        
         String script = replaceParam(elem.getAttributeValue("script"));
-        
+
         logger.debug("runScript:  script=" + script);
         this.sel.runScript(script);
         return;
     }
-    
+
     public void loadData(Element elem) throws TestCaseException {
-            
+
             String file = elem.getAttributeValue("file");
             String iterations = elem.getAttributeValue("iterations");
             List<Element> children = UtilGenerics.cast(elem.getChildren());
-            
+
             DataLoader loader = new DataLoader(file, iterations, this, children);
             loader.runTest();
     }
 
     public void groovyRunner(Element elem) {
-        
+
         String urlName = elem.getAttributeValue("srcUrl");
         GroovyRunner runner = new GroovyRunner(urlName, this);
         runner.runTest();
     }
 
     public void jythonRunner(Element elem) {
-        
+
         String urlName = elem.getAttributeValue("srcUrl");
         JythonRunner runner = new JythonRunner(urlName, this);
         runner.runTest();
     }
 
     public void dataLoop(Element elem) throws TestCaseException {
-        
+
         String dataListName = elem.getAttributeValue("dataListName");
         List<Element> children = UtilGenerics.cast(elem.getChildren());
-        
+
         DataLoop looper = new DataLoop(dataListName, this, children);
         looper.runTest();
     }
@@ -517,16 +498,16 @@
         RemoteRequest loader = new RemoteRequest( this, children, loginAs, requestUrl, host, responseHandlerMode);
         loader.runTest();
     }
-    
+
     public void ifCmd(Element elem) throws TestCaseException {
         String isRun = replaceParam(elem.getAttributeValue("condition"));
         if (isRun != null && !isRun.equals("") && Boolean.valueOf(isRun)) {
             List <Element> children = elem.getChildren();
-            this.runCommands(children);                
+            this.runCommands(children);
         }else{
             Element child = elem.getChild("else");
             List <Element> children = child.getChildren();
-            this.runCommands(children);                
+            this.runCommands(children);
         }
     }
 
@@ -534,18 +515,18 @@
         String isRun = replaceParam(elem.getAttributeValue("isRun"));
         if (isRun != null && Boolean.valueOf(isRun)) {
             List <Element> children = elem.getChildren();
-            this.runCommands(children);                
+            this.runCommands(children);
         }
     }
-    
+
     public String getParamValue(String key) {
         return (String) this.map.get(key);
     }
-    
+
     public Object getParamValue(Object key) {
         return this.map.get(key);
     }
-    
+
     public void addParam(String name, String value) {
         logger.info("addParam: name=" + name + " value="+value);
         this.map.put(name, value);
@@ -557,57 +538,51 @@
     }
 
     private void assertContains(Element elem) throws TestCaseException {
-        String src = replaceParam(elem.getAttributeValue("src"));  
-        String test = replaceParam(elem.getAttributeValue("test"));  
+        String src = replaceParam(elem.getAttributeValue("src"));
+        String test = replaceParam(elem.getAttributeValue("test"));
         int indxSearch = src.indexOf(test);
         if(indxSearch == -1) {
             logger.info("assertContains didn't find " + test + " in the src");
             throw new TestCaseException("assertContains didn't find: " + test);
-            
         } else {
             logger.info("assertContains found " + test + " in the src");
         }
         //TODO: implement JUnit TestCase - Assert.assertTrue(indxSearch != -1);
-    }   
-    
-/*    private void selectPopup(Element elem) {
-        String locator = elem.getAttributeValue("locator");  
-//        String winId = elem.getAttributeValue("windowId");  
-        String timeout = elem.getAttributeValue("timeout");  
-        
-        //this.sel.waitForPopUp(winId, timeout);
-        this.sel.click(locator); 
-        
-        String[] winNames = this.sel.getAllWindowNames();
-        this.sel.selectWindow("name=" + winNames[1]);
     }
-    
-    private void getAllWindowIds(Element elem) {
-        String[] winIds = this.sel.getAllWindowIds();
-        for (String winId: winIds) {
-            logger.info("WindowId: " + winId);
+
+    private void assertNotContains(Element elem) throws TestCaseException {
+        String src = replaceParam(elem.getAttributeValue("src"));
+        String test = replaceParam(elem.getAttributeValue("test"));
+        int indxSearch = src.indexOf(test);
+        if(indxSearch != -1) {
+            logger.info("assertNotContains found " + test + " in the src");
+            throw new TestCaseException("assertContains didn't find: " + test);
+        } else {
+            logger.info("assertNotContains didn't find " + test + " in the src");
         }
-        String[] winNames = this.sel.getAllWindowNames();
-        for (String winName: winNames) {
-            logger.info("WindowName: " + winName);
+    }
+
+    private void assertTitle(Element elem) throws TestCaseException {
+        String src = replaceParam(this.sel.getTitle());
+        String test = replaceParam(elem.getAttributeValue("value"));
+        int indxSearch = src.indexOf(test);
+        if(indxSearch == -1) {
+            logger.info("assertTitle value " + test + " doesn't match exact "+src);
+            throw new TestCaseException("assertTitle value " + test + " doesn't match exact "+src);
+        } else {
+            logger.info("assertTitle matched title");
         }
-        
-        //this.sel.selectWindow("name=" + winNames[1]);
-        //System.out.println("Did we select WindowName: " + winNames[1]);
     }
-*/    
+
     private void selectPopup(Element elem) {
-        String locator = elem.getAttributeValue("locator");  
-//        String winId = elem.getAttributeValue("windowId");  
-        String timeout = elem.getAttributeValue("timeout");  
-        
-        //this.sel.waitForPopUp(winId, timeout);
-        this.sel.click(locator); 
-        
+        String locator = elem.getAttributeValue("locator");
+        String timeout = elem.getAttributeValue("timeout");
+
+        this.sel.click(locator);
         String[] winNames = this.sel.getAllWindowNames();
         this.sel.selectWindow("name=" + winNames[1]);
     }
-    
+
     private void getAllWindowIds(Element elem) {
         String[] winIds = this.sel.getAllWindowIds();
         for(int i=0; i<winIds.length; i++) {
@@ -617,59 +592,57 @@
         for(int i=0; i<winIds.length; i++) {
             logger.info("WindowName: " + winNames[i]);
         }
-        
-        //this.sel.selectWindow("name=" + winNames[1]);
-        //System.out.println("Did we select WindowName: " + winNames[1]);
     }
-    
+
     /**
      * Gets the hidden value of a list box
      * @param elem
      */
     private void getSelectedValue(Element elem) {
-        String locator = elem.getAttributeValue("locator");  
-        String out = elem.getAttributeValue("out");  
-        String text = this.sel.getSelectedValue(locator);  
+        String locator = elem.getAttributeValue("locator");
+        String out = elem.getAttributeValue("out");
+        String text = this.sel.getSelectedValue(locator);
         logger.info("getSelectedValue: locator=" + locator + " text="+text);
         addParam(out, text);
     }
-    
+
     /**
      * Gets the visible (displayed) value of a list box
      * @param elem
      */
     private void getSelectedLabel(Element elem) {
-        String locator = elem.getAttributeValue("locator");  
-        String out = elem.getAttributeValue("out");  
-        String text = this.sel.getSelectedLabel(locator);  
+        String locator = elem.getAttributeValue("locator");
+        String out = elem.getAttributeValue("out");
+        String text = this.sel.getSelectedLabel(locator);
         logger.info("getSelectedValue: locator=" + locator + " text="+text);
         addParam(out, text);
     }
+
     private void getSelectedId(Element elem) {
-        String locator = elem.getAttributeValue("locator");  
-        String out = elem.getAttributeValue("out");  
-        String text = this.sel.getSelectedId(locator);  
+        String locator = elem.getAttributeValue("locator");
+        String out = elem.getAttributeValue("out");
+        String text = this.sel.getSelectedId(locator);
         addParam(out, text);
     }
+
     private void getHtmlSource(Element elem) {
-        String paramName = elem.getAttributeValue("out");  
-        String text = this.sel.getHtmlSource();  
+        String paramName = elem.getAttributeValue("out");
+        String text = this.sel.getHtmlSource();
         logger.info("getHtmlsource: paramName=" + paramName + " text=" + text);
         addParam(paramName, text);
     }
-    
+
     private void getBodyText(Element elem) {
-        String paramName = elem.getAttributeValue("out");  
-        String text = this.sel.getBodyText();  
-//        logger.info("getBodyText: paramName=" + paramName + " text=" + text);
+        String paramName = elem.getAttributeValue("out");
+        String text = this.sel.getBodyText();
         addParam(paramName, text);
     }
+
     private void testcase(Element elem) {
         System.err.println("New testcase: " + elem.getAttributeValue("file"));
         String testFile = elem.getAttributeValue("file");
         String isRun = replaceParam(elem.getAttributeValue("isRun"));
-        
-        
+
         String absolutePath = getAbsolutePath(testFile);
         String parentTestCase = new String(this.testCaseDirectory);
         SeleniumXml newTest = new SeleniumXml(this);
@@ -680,14 +653,13 @@
             }else{
                 System.err.println(" testFile :"+testFile+ "  isRun:"+isRun);
             }
-            
         } catch (Exception e) {
             e.printStackTrace();
             Assert.fail("Testcase error for file: " + absolutePath);
         }
         newTest.testCaseDirectory  = parentTestCase;
     }
-    
+
     private String getFileDirectoryForRelativePath(String filePath){
         String directory = null;
         if (filePath.indexOf("/") != -1   ) {
@@ -698,13 +670,21 @@
             directory = filePath.substring(0, (lastIndexOf+1));
         }
         return directory;
-    }    
+    }
+
     private void clickAt(Element elem) {
         logger.debug("clickAt: " + replaceParam(elem.getAttributeValue("locator")));
         String locator = replaceParam(elem.getAttributeValue("locator"));
         String coordString = elem.getAttributeValue("coordString");
         this.sel.clickAt(locator, coordString);
     }
+
+    private void assertConfirmation(Element elem) {
+        logger.debug("assertConfirmation: " + replaceParam(elem.getAttributeValue("value")));
+        this.sel.waitForCondition("selenium.isConfirmationPresent();", "1000");
+        this.sel.getConfirmation();
+    }
+
     /**
      * @param elem takes a Selenium String locator.  See Javadocs for more information.  Here are some
      * example locators:
@@ -716,90 +696,89 @@
     private void clickCmd(Element elem) {
         logger.info("clickCmd: " +  replaceParam(elem.getAttributeValue("locator")));
         try {
-            this.sel.click(replaceParam(elem.getAttributeValue("locator")));  
+            this.sel.click(replaceParam(elem.getAttributeValue("locator")));
         } catch (SeleniumException e) {
-        
             logger.info("caught SeleniumException Name:"+elem.getName()+"  , Value: "+elem.getAttributeValue("locator"));
-            
             e.printStackTrace();
         }
     }
+
     private void doubleClick(Element elem) {
         logger.info("clickCmd: " +  replaceParam(elem.getAttributeValue("locator")));
-        this.sel.doubleClick((replaceParam(elem.getAttributeValue("locator"))));  
+        this.sel.doubleClick((replaceParam(elem.getAttributeValue("locator"))));
     }
-    
+
     private void checkCmd(Element elem) {
         logger.info("checkCmd: " +  replaceParam(elem.getAttributeValue("locator")));
-        this.sel.check(replaceParam(elem.getAttributeValue("locator")));  
+        this.sel.check(replaceParam(elem.getAttributeValue("locator")));
     }
+
     private void uncheckCmd(Element elem) {
         logger.info("uncheckCmd: " +  replaceParam(elem.getAttributeValue("locator")));
-        this.sel.uncheck(replaceParam(elem.getAttributeValue("locator")));  
+        this.sel.uncheck(replaceParam(elem.getAttributeValue("locator")));
     }
+
     private void typeCmd(Element elem) {
         String name = elem.getAttributeValue("name");
-        String value = replaceParam(elem.getAttributeValue("value"));  
+        String value = replaceParam(elem.getAttributeValue("value"));
         logger.info("typeCmd: id=" + name + " value=" + value);
-        this.sel.type(name, value);  
+        this.sel.type(name, value);
     }
+
     /*
      * setSpeed delays the time for the next selenium command to execute
      */
     private void setSpeed(Element elem) {
         logger.info("setSpeed: " + elem.getAttributeValue("value"));
-        this.sel.setSpeed(elem.getAttributeValue("value"));  
+        this.sel.setSpeed(elem.getAttributeValue("value"));
     }
+
     /*
-     * waitForPageToLoadCmd is the max timeout selenium will wait for a page to load.  
-     * Commands are executed immediately after the page loads therefore if the pages are 
-     * fast the test will go through the pages very quickly.  Use setSpeed if you want to 
+     * waitForPageToLoadCmd is the max timeout selenium will wait for a page to load.
+     * Commands are executed immediately after the page loads therefore if the pages are
+     * fast the test will go through the pages very quickly.  Use setSpeed if you want to
      * see the pages executed slower.
      */
     private void waitForPageToLoadCmd(Element elem) {
         logger.info("waitForPageToLoadCmd: " + elem.getAttributeValue("value"));
-        this.sel.waitForPageToLoad(elem.getAttributeValue("value"));  
+        this.sel.waitForPageToLoad(elem.getAttributeValue("value"));
     }
+
     private void openCmd(Element elem) {
-        String cmd = replaceParam(elem.getAttributeValue("value"));  
+        String cmd = replaceParam(elem.getAttributeValue("value"));
         logger.info("openCmd: " + cmd);
-        this.sel.open(cmd);  
-        //this.sel.windowMaximize();
+        this.sel.open(cmd);
     }
+
     private void uniqueIdCmd(Element elem) {
-        String paramName = elem.getAttributeValue("out");  
+        String paramName = elem.getAttributeValue("out");
         String paramValue = RandomStringUtils.randomAlphanumeric(MAX_STR_LENGTH).toUpperCase();
         logger.info("uniqueIdCmd: parameter=" + paramName + " value=" + paramValue);
         addParam(paramName, paramValue);
     }
-    
+
     /*
-     * captureText command captures the current HTML page and runs a regex to 
-     * get the specified string.  
+     * captureText command captures the current HTML page and runs a regex to
+     * get the specified string.
      *
      * For example:  if the following string existed in a web page
-     * 
      *   "xx <tag a=b> yy </tag> zz"
-     * 
-     *  
      * And you wanted to capture the value in the of the XML (yy).  You would do the following;
      * Use regxp: "<(\\S+?).*?>(.*?)</\\1>";  //The \\1 reuses group 1
-     * 
-     * <captureText regex="<(\\S+?).*?>(.*?)</\\1>" group="2" results="xmlValue" /> 
-     * 
+     *
+     * <captureText regex="<(\\S+?).*?>(.*?)</\\1>" group="2" results="xmlValue" />
+     *
      * The command will find the <tag>.. and group 2 contains the 'yy' value.
-     * 
+     *
      * Note: if 'group' is null it will default to the entire regex group.
      */
     private void captureTextInPageCmd(Element elem) {
-        
-        String regex = elem.getAttributeValue("regex");  
-        String group = elem.getAttributeValue("group");  
-        String results = elem.getAttributeValue("results");  
+        String regex = elem.getAttributeValue("regex");
+        String group = elem.getAttributeValue("group");
+        String results = elem.getAttributeValue("results");
         Pattern pattern = Pattern.compile(regex);
-    
-        String targetString = this.sel.getHtmlSource();  
-        
+        String targetString = this.sel.getHtmlSource();
+
         // Create the 'target' string we wish to interrogate.
         // Get a Matcher based on the target string.
         Matcher matcher = pattern.matcher(targetString);
@@ -818,7 +797,7 @@
             addParam(results, resultsValue);
         } else {
             logger.info("Didn't find results with regex: " + regex);
-            
+
             //TODO: temporary to capture the missed string
             /*try {
                   FileWriter out = new FileWriter("c:/dev/erep/output/failure.txt");
@@ -831,16 +810,16 @@
             } */
         }
     }
-    
+
     private void randomAlphaStringCmd(Element elem) {
         int nSize = 0;
         int nPrefixSize = 0;
-        String paramName = elem.getAttributeValue("out");  
-        String size = elem.getAttributeValue("size");  
+        String paramName = elem.getAttributeValue("out");
+        String size = elem.getAttributeValue("size");
         if(size != null) {
             nSize = Integer.parseInt(size);
         }
-        String prefix = elem.getAttributeValue("prefix");  
+        String prefix = elem.getAttributeValue("prefix");
         if(prefix != null) {
             nPrefixSize = prefix.length();
         }
@@ -855,34 +834,40 @@
         logger.info("randomStringAlphaCmd: paramName=" + paramName + " paramValue=" + paramValue);
         addParam(paramName, paramValue);
     }
+
     private void randomStringCmd(Element elem) {
-        String paramName = elem.getAttributeValue("out");  
-        String size = elem.getAttributeValue("size");  
-        String prefix = elem.getAttributeValue("prefix");  
+        String paramName = elem.getAttributeValue("out");
+        String size = elem.getAttributeValue("size");
+        String prefix = elem.getAttributeValue("prefix");
         String paramValue = TestUtils.createRandomString(prefix, Integer.parseInt(size));
         logger.info("randomStringCmd: paramName=" + paramName + " paramValue=" + paramValue);
         addParam(paramName, paramValue);
     }
+
     private void getSelectedIdsCmd(Element elem) {
         logger.info("getSelectdIdsCmd: " + elem.getAttributeValue("value"));
-        this.sel.getSelectedIds(elem.getAttributeValue("value"));  
+        this.sel.getSelectedIds(elem.getAttributeValue("value"));
     }
+
     private void selectCmd(Element elem) {
         String selectLocator = elem.getAttributeValue("locator");
         String optionLocator = elem.getAttributeValue("option");
         logger.info("selectCmd: selectLocator=" + selectLocator + " optionLocator=" + optionLocator);
-        this.sel.select(selectLocator, optionLocator);  
+        this.sel.select(selectLocator, optionLocator);
     }
+
     private void printCmd(Element elem) {
         String value = replaceParam(elem.getAttributeValue("value"));
         logger.info("Print: " + value);
     }
+
     private void copyCmd(Element elem) {
-        String toStr = replaceParam(elem.getAttributeValue("to")); 
-        String fromStr = replaceParam(elem.getAttributeValue("from"));  
+        String toStr = replaceParam(elem.getAttributeValue("to"));
+        String fromStr = replaceParam(elem.getAttributeValue("from"));
         logger.info("copyCmd: to=" + toStr + " from=" + fromStr);
         addParam(toStr, fromStr);
     }
+
     private void appendCmd(Element elem) {
         logger.info("appendCmd: src1=" + elem.getAttributeValue("src1") + " src2=" + elem.getAttributeValue("src2"));
         String newStr = replaceParam(elem.getAttributeValue("src1")) + replaceParam(elem.getAttributeValue("src2"));
@@ -891,10 +876,10 @@
 
     private void loadParameter(Element elem) {
         logger.info("loadParameter: fileName=" + elem.getAttributeValue("file") );
-        
         String parameterFile = elem.getAttributeValue("file");
         String absolutePath = getAbsolutePath(parameterFile);
         BasicConfigurator.configure();
+
         try {
             InputStream in = new FileInputStream(absolutePath);
             Properties parameter = new Properties();
@@ -902,25 +887,24 @@
             in.close();
 
             Set<Entry<Object, Object>> entrySet = parameter.entrySet();
-            
+
             for(Map.Entry entry : entrySet) {
                 String key = (String)entry.getKey();
                 String value = (String)entry.getValue();
                 System.out.println(key + " = " + value);
                 addParam(key, value);
-            }            
+            }
         } catch (Exception e) {
             logger.error("Can not load parameter . ");
         }
-        
+
         String newStr = replaceParam(elem.getAttributeValue("src1")) + replaceParam(elem.getAttributeValue("src2"));
         addParam(elem.getAttributeValue("out"), newStr);
     }
 
     public String replaceParam(String value) {
-        
         if (value == null) { return value; }
-        
+
         StringBuilder buf = new StringBuilder();
         int end = 0;
         int start = 0;
@@ -932,13 +916,13 @@
             end = remainingStr.indexOf("}");
             String paramName = remainingStr.substring(start + 2, end);
             replacedVal = getParamValue(paramName);
-            if (replacedVal == null) { 
+            if (replacedVal == null) {
                 replacedVal = "";
             }
             buf.append(replacedVal);
             remainingStr = remainingStr.substring(end + 1);
             end = 0;
-        } 
+        }
         buf.append(remainingStr.substring(end));
         return buf.toString();
     }
@@ -948,35 +932,32 @@
         if( (value.indexOf("${") != -1) &&
             (value.indexOf("}", 1) != -1) ) {
             return true;
-        } 
+        }
         return false;
     }
-    
+
     //TODO read properties file to setup selenium
     private void setupSelenium() {
-        
         //return if Selenium has already been setup
         //e.g. nested selenium test cases.
         if(this.sel != null) return;
-        
+
         String serverHost = null;
         String serverPort = null;
         String browser = null;
         String startUrl = null;
-        
+
         //First initialize with property values
         if(props != null ) { //Get setup params from property value
-            
+
             serverHost = props.getProperty("serverHost", "localhost");
             serverPort = props.getProperty("proxyPort", "4444");
             browser = props.getProperty("browser", "*iexplore");
             startUrl = props.getProperty("startUrl", "http://localhost:8080");
         }
-        
         //Second over ride properties if defined in the "setup" element
         Element elem = this.doc.getRootElement().getChild("setup");
-        if (elem != null) { 
-        
+        if (elem != null) {
             //Override properties if specified
             if( elem.getAttributeValue("serverHost") != null ) {
                 serverHost = elem.getAttributeValue("serverHost");
@@ -998,6 +979,7 @@
         this.sel = new DefaultSelenium(serverHost, Integer.parseInt(serverPort), browser, startUrl);
         this.sel.start();
     }
+
     private String getAbsolutePath(String fileName){
         logger.info("getAbsolutePath: fileName=" + fileName);
         String fileAbsolutePath = fileName;
@@ -1009,31 +991,32 @@
         logger.info("getAbsolutePath: returning fileName=" + fileName);
         return fileAbsolutePath;
     }
+
     private void readFile(String fileName) throws JDOMException, IOException {
         String absolutePath = getAbsolutePath(fileName);
         File xmlFile = new File(absolutePath);
-        
+
         SAXBuilder builder = new SAXBuilder();
         this.doc = builder.build(xmlFile);
     }
-    
+
     public String getUserName() {
         return this.username;
     }
-    
+
     public void setUserName(String val) {
         this.username = val;
     }
-    
+
     public void setPassword(String val) {
         this.password = val;
     }
-    
+
     public String getPassword() {
         return this.password;
     }
-    
+
     public Map <String, Object> getMap() {
         return this.map;
     }
-}
\ No newline at end of file
+}

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_ajax.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_ajax.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_ajax.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_ajax.xml Fri Dec 11 23:11:39 2009
@@ -1,35 +1,35 @@
-<testcase>
-  <open value="/example/control/updateExampleFeature" />
-  <click locator="link=Logout" />
-  <waitForPageToLoad value="10000" />
-  <type name="PASSWORD" value="ofbiz" />
-  <click locator="//input[@value='Login']" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Ajax Examples" />
-  <waitForPageToLoad value="10000" />
-  <type name="exampleName" value="AJAX example name" />
-  <type name="description" value="AJAX description" />
-  <type name="longDescription" value="This is a long description" />
-  <type name="comments" value="this is a comment" />
-  <type name="exampleSize" value="10" />
-  <click locator="//img[@alt='View Calendar']" />
-  <click locator="//tr[5]/td[2]/div" />
-  <click locator="link=OK" />
-  <click locator="//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img" />
-  <click locator="link=Now" />
-  <click locator="link=OK" />
-  <select locator="anotherText" option="label=Explicit Option" />
-  <click locator="submitButton" />
-  <click locator="link=10000" />
-  <waitForPageToLoad value="10000" />
-  <type name="longDescription" value="This is a long description - this is a big update" />
-  <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Ajax Examples" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=10000" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Printer Friendly" />
-  <waitForPageToLoad value="10000" />
-  <brett_cmd param1="1" param2="1" />
+<testcase>
+  <open value="/example/control/updateExampleFeature" />
+  <click locator="link=Logout" />
+  <waitForPageToLoad value="10000" />
+  <type name="PASSWORD" value="ofbiz" />
+  <click locator="//input[@value='Login']" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Ajax Examples" />
+  <waitForPageToLoad value="10000" />
+  <type name="exampleName" value="AJAX example name" />
+  <type name="description" value="AJAX description" />
+  <type name="longDescription" value="This is a long description" />
+  <type name="comments" value="this is a comment" />
+  <type name="exampleSize" value="10" />
+  <click locator="//img[@alt='View Calendar']" />
+  <click locator="//tr[5]/td[2]/div" />
+  <click locator="link=OK" />
+  <click locator="//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img" />
+  <click locator="link=Now" />
+  <click locator="link=OK" />
+  <select locator="anotherText" option="label=Explicit Option" />
+  <click locator="submitButton" />
+  <click locator="link=10000" />
+  <waitForPageToLoad value="10000" />
+  <type name="longDescription" value="This is a long description - this is a big update" />
+  <click locator="submitButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Ajax Examples" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=10000" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Printer Friendly" />
+  <waitForPageToLoad value="10000" />
+  <brett_cmd param1="1" param2="1" />
 </testcase>

Propchange: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_ajax.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_login.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_login.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_login.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_login.xml Fri Dec 11 23:11:39 2009
@@ -1,5 +1,6 @@
 <?xml version="1.0"?>
 <testcase>
+    <open value="/example/control/setSessionLocale?newLocale=en" />
     <open value="/example/control/logout" />
     <waitForPageToLoad value="10000" />
     <type name="USERNAME" value="admin" />

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_new.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_new.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_new.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_new.xml Fri Dec 11 23:11:39 2009
@@ -20,11 +20,9 @@
   <waitForPageToLoad value="10000" />
   <click locator="link=Items" />
   <waitForPageToLoad value="10000" />
-  <type name="description" value="Item 1" />
+  <type name="AddExampleItem_description" value="Item 1" />
   <type name="amount" value="100" />
   <select locator="amountUomId" option="label=Weight: Stone (st)" />
   <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
-  <!-- click locator="link=New Example" />
-  <waitForPageToLoad value="10000" / --> 
+  <assertConfirmation value="Do you confirm ?" />
 </testcase>
\ No newline at end of file

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_search.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_search.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_search.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/example_search.xml Fri Dec 11 23:11:39 2009
@@ -1,11 +1,8 @@
 <testcase>
-  <click locator="link=Example" />
+  <open value="/example/control/FindExample" />
   <waitForPageToLoad value="10000" />
   <click locator="searchButton" />
   <waitForPageToLoad value="10000" />
-  <!-- click locator="link=Last" />
-  <waitForPageToLoad value="10000" / -->
   <getHtmlSource out="searchResults"/>
-  <!--  assertContains src="${searchResults}" test="${exampleName}" / -->
   <assertContains src="${searchResults}" test="Brett" />
 </testcase>
\ No newline at end of file

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.xml Fri Dec 11 23:11:39 2009
@@ -1,35 +1,35 @@
-<testcase>
-  <open value="/example/control/updateExampleFeature" />
-  <click locator="link=Logout" />
-  <waitForPageToLoad value="10000" />
-  <type name="PASSWORD" value="ofbiz" />
-  <click locator="//input[@value='Login']" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Ajax Examples" />
-  <waitForPageToLoad value="10000" />
-  <type name="exampleName" value="AJAX example name" />
-  <type name="description" value="AJAX description" />
-  <type name="longDescription" value="This is a long description" />
-  <type name="comments" value="this is a comment" />
-  <type name="exampleSize" value="10" />
-  <click locator="//img[@alt='View Calendar']" />
-  <click locator="//tr[5]/td[2]/div" />
-  <click locator="link=OK" />
-  <click locator="//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img" />
-  <click locator="link=Now" />
-  <click locator="link=OK" />
-  <select locator="anotherText" option="label=Explicit Option" />
-  <click locator="submitButton" />
-  <click locator="link=10000" />
-  <waitForPageToLoad value="10000" />
-  <type name="longDescription" value="This is a long description - this is a big update" />
-  <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Ajax Examples" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=10000" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Printer Friendly" />
-  <waitForPageToLoad value="10000" />
-  <brett_cmd param1="1" param2="1" />
+<testcase>
+  <open value="/example/control/updateExampleFeature" />
+  <click locator="link=Logout" />
+  <waitForPageToLoad value="10000" />
+  <type name="PASSWORD" value="ofbiz" />
+  <click locator="//input[@value='Login']" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Ajax Examples" />
+  <waitForPageToLoad value="10000" />
+  <type name="exampleName" value="AJAX example name" />
+  <type name="description" value="AJAX description" />
+  <type name="longDescription" value="This is a long description" />
+  <type name="comments" value="this is a comment" />
+  <type name="exampleSize" value="10" />
+  <click locator="//img[@alt='View Calendar']" />
+  <click locator="//tr[5]/td[2]/div" />
+  <click locator="link=OK" />
+  <click locator="//div[@id='_G266__body']/table/tbody/tr[9]/td[2]/a/img" />
+  <click locator="link=Now" />
+  <click locator="link=OK" />
+  <select locator="anotherText" option="label=Explicit Option" />
+  <click locator="submitButton" />
+  <click locator="link=10000" />
+  <waitForPageToLoad value="10000" />
+  <type name="longDescription" value="This is a long description - this is a big update" />
+  <click locator="submitButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Ajax Examples" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=10000" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Printer Friendly" />
+  <waitForPageToLoad value="10000" />
+  <brett_cmd param1="1" param2="1" />
 </testcase>

Propchange: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/AjaxExample.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.xml Fri Dec 11 23:11:39 2009
@@ -1,35 +1,35 @@
-<testcase>
-  <open value="/example/control/FindExample?portalPageId=Example" />
-  <click locator="link=Logout" />
-  <waitForPageToLoad value="10000" />
-  <type name="PASSWORD" value="ofbiz" />
-  <click locator="//input[@value='Login']" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=New Example" />
-  <waitForPageToLoad value="10000" />
-  <select locator="statusId" option="label=Defined" />
-  <type name="exampleName" value="New Example 1" />
-  <type name="description" value="This is a description" />
-  <type name="longDescription" value="Long description goes here" />
-  <type name="comments" value="comments go here" />
-  <type name="exampleSize" value="10" />
-  <click locator="//img[@alt='View Calendar']" />
-  <click locator="//tr[2]/td[5]/div" />
-  <click locator="//tr[2]/td[5]/div" />
-  <click locator="//div[@id='_G152__body']/table/tbody/tr[9]/td[2]/a/img" />
-  <click locator="//tr[3]/td[2]/div" />
-  <click locator="//tr[3]/td[2]/div" />
-  <click locator="link=OK" />
-  <select locator="anotherText" option="label=Good" />
-  <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Items" />
-  <waitForPageToLoad value="10000" />
-  <type name="description" value="Item 1" />
-  <type name="amount" value="100" />
-  <select locator="amountUomId" option="label=Weight: Stone (st)" />
-  <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=New Example" />
-  <waitForPageToLoad value="10000" />
+<testcase>
+  <open value="/example/control/FindExample?portalPageId=Example" />
+  <click locator="link=Logout" />
+  <waitForPageToLoad value="10000" />
+  <type name="PASSWORD" value="ofbiz" />
+  <click locator="//input[@value='Login']" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=New Example" />
+  <waitForPageToLoad value="10000" />
+  <select locator="statusId" option="label=Defined" />
+  <type name="exampleName" value="New Example 1" />
+  <type name="description" value="This is a description" />
+  <type name="longDescription" value="Long description goes here" />
+  <type name="comments" value="comments go here" />
+  <type name="exampleSize" value="10" />
+  <click locator="//img[@alt='View Calendar']" />
+  <click locator="//tr[2]/td[5]/div" />
+  <click locator="//tr[2]/td[5]/div" />
+  <click locator="//div[@id='_G152__body']/table/tbody/tr[9]/td[2]/a/img" />
+  <click locator="//tr[3]/td[2]/div" />
+  <click locator="//tr[3]/td[2]/div" />
+  <click locator="link=OK" />
+  <select locator="anotherText" option="label=Good" />
+  <click locator="submitButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Items" />
+  <waitForPageToLoad value="10000" />
+  <type name="description" value="Item 1" />
+  <type name="amount" value="100" />
+  <select locator="amountUomId" option="label=Weight: Stone (st)" />
+  <click locator="submitButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=New Example" />
+  <waitForPageToLoad value="10000" />
 </testcase>

Propchange: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewExample.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.xml (original)
+++ ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.xml Fri Dec 11 23:11:39 2009
@@ -1,31 +1,31 @@
-<testcase>
-  <open value="/example/control/EditExample" />
-  <click locator="link=Logout" />
-  <waitForPageToLoad value="10000" />
-  <type name="PASSWORD" value="ofbiz" />
-  <click locator="//input[@value='Login']" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Feature" />
-  <waitForPageToLoad value="10000" />
-  <click locator="searchButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=New Example Feature" />
-  <waitForPageToLoad value="10000" />
-  <type name="description" value="New Feature 1000" />
-  <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Examples" />
-  <waitForPageToLoad value="10000" />
-  <click locator="//a[contains(@href, '/example/control/EditExampleFeature?exampleFeatureId=10000')]" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=Feature" />
-  <waitForPageToLoad value="10000" />
-  <type name="description" value="New Feature" />
-  <click locator="searchButton" />
-  <waitForPageToLoad value="10000" />
-  <click locator="link=10000" />
-  <waitForPageToLoad value="10000" />
-  <type name="description" value="New Feature 1000 - updated" />
-  <click locator="submitButton" />
-  <waitForPageToLoad value="10000" />
+<testcase>
+  <open value="/example/control/EditExample" />
+  <click locator="link=Logout" />
+  <waitForPageToLoad value="10000" />
+  <type name="PASSWORD" value="ofbiz" />
+  <click locator="//input[@value='Login']" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Feature" />
+  <waitForPageToLoad value="10000" />
+  <click locator="searchButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=New Example Feature" />
+  <waitForPageToLoad value="10000" />
+  <type name="description" value="New Feature 1000" />
+  <click locator="submitButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Examples" />
+  <waitForPageToLoad value="10000" />
+  <click locator="//a[contains(@href, '/example/control/EditExampleFeature?exampleFeatureId=10000')]" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=Feature" />
+  <waitForPageToLoad value="10000" />
+  <type name="description" value="New Feature" />
+  <click locator="searchButton" />
+  <waitForPageToLoad value="10000" />
+  <click locator="link=10000" />
+  <waitForPageToLoad value="10000" />
+  <type name="description" value="New Feature 1000 - updated" />
+  <click locator="submitButton" />
+  <waitForPageToLoad value="10000" />
 </testcase>

Propchange: ofbiz/branches/addbirt/framework/testtools/testdef/seleniumxml/example/recorded/NewFeature.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: ofbiz/branches/addbirt/framework/webtools/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/webtools/widget/CommonScreens.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/webtools/widget/CommonScreens.xml (original)
+++ ofbiz/branches/addbirt/framework/webtools/widget/CommonScreens.xml Fri Dec 11 23:11:39 2009
@@ -99,6 +99,16 @@
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="ENTITY_MAINT"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="EntityTabBar" location="component://webtools/widget/Menus.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
                     <decorator-section name="body">
                         <section>
                             <!-- do check for WEBTOOLS, _VIEW permission -->
@@ -106,7 +116,6 @@
                                 <if-has-permission permission="ENTITY_MAINT"/>
                             </condition>
                             <widgets>
-                                <include-menu name="EntityTabBar" location="component://webtools/widget/Menus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>
@@ -126,6 +135,16 @@
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="WEBTOOLS" action="_VIEW"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="serviceTabBar" location="component://webtools/widget/Menus.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
                     <decorator-section name="body">
                         <section>
                             <!-- do check for WEBTOOLS, _VIEW permission -->
@@ -133,7 +152,6 @@
                                 <if-has-permission permission="WEBTOOLS" action="_VIEW"/>
                             </condition>
                             <widgets>
-                                <include-menu name="serviceTabBar" location="component://webtools/widget/Menus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>
@@ -153,6 +171,16 @@
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="ENTITY_MAINT"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="importExportTabBar" location="component://webtools/widget/Menus.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
                     <decorator-section name="body">
                         <section>
                             <!-- do check for WEBTOOLS, _VIEW permission -->
@@ -160,7 +188,6 @@
                                 <if-has-permission permission="ENTITY_MAINT"/>
                             </condition>
                             <widgets>
-                                <include-menu name="importExportTabBar" location="component://webtools/widget/Menus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>
@@ -180,6 +207,16 @@
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="ENTITY_MAINT"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="artifactTabBar" location="component://webtools/widget/Menus.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
                     <decorator-section name="body">
                         <section>
                             <!-- do check for WEBTOOLS, _VIEW permission -->
@@ -187,7 +224,6 @@
                                 <if-has-permission permission="ENTITY_MAINT"/>
                             </condition>
                             <widgets>
-                                <include-menu name="artifactTabBar" location="component://webtools/widget/Menus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>
@@ -207,6 +243,16 @@
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="pre-body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="ENTITY_MAINT"/>
+                            </condition>
+                            <widgets>
+                                <include-menu name="configurationTabBar" location="component://webtools/widget/Menus.xml"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
                     <decorator-section name="body">
                         <section>
                             <!-- do check for WEBTOOLS, _VIEW permission -->
@@ -214,7 +260,6 @@
                                 <if-has-permission permission="ENTITY_MAINT"/>
                             </condition>
                             <widgets>
-                                <include-menu name="configurationTabBar" location="component://webtools/widget/Menus.xml"/>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>

Modified: ofbiz/branches/addbirt/framework/webtools/widget/LogScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/webtools/widget/LogScreens.xml?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/webtools/widget/LogScreens.xml (original)
+++ ofbiz/branches/addbirt/framework/webtools/widget/LogScreens.xml Fri Dec 11 23:11:39 2009
@@ -27,13 +27,22 @@
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
-                    <decorator-section name="body">
+                    <decorator-section name="pre-body">
                         <section>
                             <condition>
                                 <if-has-permission permission="WEBTOOLS" action="_VIEW"/>
                             </condition>
                             <widgets>
                                 <include-menu location="component://webtools/widget/Menus.xml" name="LoggingTabBar"/>
+                            </widgets>
+                        </section>
+                    </decorator-section>
+                    <decorator-section name="body">
+                        <section>
+                            <condition>
+                                <if-has-permission permission="WEBTOOLS" action="_VIEW"/>
+                            </condition>
+                            <widgets>
                                 <decorator-section-include name="body"/>
                             </widgets>
                             <fail-widgets>

Modified: ofbiz/branches/addbirt/framework/widget/dtd/widget-screen.xsd
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/dtd/widget-screen.xsd?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/dtd/widget-screen.xsd (original)
+++ ofbiz/branches/addbirt/framework/widget/dtd/widget-screen.xsd Fri Dec 11 23:11:39 2009
@@ -930,6 +930,15 @@
                 </xs:restriction>
             </xs:simpleType>
         </xs:attribute>
+        <xs:attribute name="save-collapsed" default="true">
+            <xs:annotation><xs:documentation>When set to true, screenlet collapse status is saved as user preference. Defaults to true.</xs:documentation></xs:annotation>
+            <xs:simpleType>
+                <xs:restriction base="xs:token">
+                    <xs:enumeration value="true"/>
+                    <xs:enumeration value="false"/>
+                </xs:restriction>
+            </xs:simpleType>
+        </xs:attribute>
         <xs:attribute name="padded" default="true">
             <xs:annotation><xs:documentation>When set to true, screenlet content will be padded. Defaults to true.</xs:documentation></xs:annotation>
             <xs:simpleType>

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/MacroFormRenderer.java Fri Dec 11 23:11:39 2009
@@ -1957,8 +1957,8 @@
 
         // get the parameterized pagination index and size fields
         int paginatorNumber = modelForm.getPaginatorNumber(context);
-        String viewIndexParam = modelForm.getPaginateIndexField(context);
-        String viewSizeParam = modelForm.getPaginateSizeField(context);
+        String viewIndexParam = modelForm.getMultiPaginateIndexField(context);
+        String viewSizeParam = modelForm.getMultiPaginateSizeField(context);
 
         int viewIndex = modelForm.getViewIndex(context);
         int viewSize = modelForm.getViewSize(context);

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/ModelForm.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/ModelForm.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/ModelForm.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/form/ModelForm.java Fri Dec 11 23:11:39 2009
@@ -784,8 +784,10 @@
      *   use the same form definitions for many types of form UIs
      */
     public void renderFormString(Appendable writer, Map<String, Object> context, FormStringRenderer formStringRenderer) throws IOException {
-        //  increment the paginator
-        this.incrementPaginatorNumber(context);
+        //  increment the paginator, only for list and multi forms
+        if ("list".equals(this.type) || "multi".equals(this.type)) {
+            this.incrementPaginatorNumber(context);
+        }
         // Populate the viewSize and viewIndex so they are available for use during form actions
         context.put("viewIndex", this.getViewIndex(context));
         context.put("viewSize", this.getViewSize(context));
@@ -2178,28 +2180,42 @@
         if (UtilValidate.isEmpty(field)) {
             field = DEFAULT_PAG_INDEX_FIELD;
         }
+        return field;
+    }
+    
+    public String getMultiPaginateIndexField(Map<String, Object> context) {
+        String field = this.paginateIndexField.expandString(context);
+        if (UtilValidate.isEmpty(field)) {
+            field = DEFAULT_PAG_INDEX_FIELD;
+        }
         //  append the paginator number
         field = field + "_" + getPaginatorNumber(context);
         return field;
     }
 
     public int getPaginateIndex(Map<String, Object> context) {
-        String field = this.getPaginateIndexField(context);
+        String field = this.getMultiPaginateIndexField(context);
 
         int viewIndex = 0;
         try {
             Object value = context.get(field);
 
             if (value == null) {
-            // try parameters.VIEW_INDEX as that is an old OFBiz convention
-            Map<String, Object> parameters = UtilGenerics.cast(context.get("parameters"));
-            if (parameters != null) {
-                value = parameters.get("VIEW_INDEX" + "_" + getPaginatorNumber(context));
+                // try parameters.VIEW_INDEX as that is an old OFBiz convention
+                Map<String, Object> parameters = UtilGenerics.cast(context.get("parameters"));
+                if (parameters != null) {
+                    value = parameters.get("VIEW_INDEX" + "_" + getPaginatorNumber(context));
 
-                if (value == null) {
-                    value = parameters.get(field);
+                    if (value == null) {
+                        value = parameters.get(field);
+                    }
                 }
             }
+            
+            // try paginate index field without paginator number
+            if (value == null) {
+                field = this.getPaginateIndexField(context);
+                value = context.get(field);
             }
 
             if (value instanceof Integer) {
@@ -2219,13 +2235,21 @@
         if (UtilValidate.isEmpty(field)) {
             field = DEFAULT_PAG_SIZE_FIELD;
         }
+        return field;
+    }
+    
+    public String getMultiPaginateSizeField(Map<String, Object> context) {
+        String field = this.paginateSizeField.expandString(context);
+        if (UtilValidate.isEmpty(field)) {
+            field = DEFAULT_PAG_SIZE_FIELD;
+        }
         //  append the paginator number
         field = field + "_" + getPaginatorNumber(context);
         return field;
     }
 
     public int getPaginateSize(Map<String, Object> context) {
-        String field = this.getPaginateSizeField(context);
+        String field = this.getMultiPaginateSizeField(context);
 
         int viewSize = this.defaultViewSize;
         try {
@@ -2242,6 +2266,12 @@
                     }
                 }
             }
+            
+            // try the page size field without paginator number
+            if (value == null) {
+                field = this.getPaginateSizeField(context);
+                value = context.get(field);
+            }
 
             if (value instanceof Integer) {
                 viewSize = ((Integer) value).intValue();

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlFormRenderer.java Fri Dec 11 23:11:39 2009
@@ -2287,8 +2287,8 @@
 
         // get the parameterized pagination index and size fields
         int paginatorNumber = modelForm.getPaginatorNumber(context);
-        String viewIndexParam = modelForm.getPaginateIndexField(context);
-        String viewSizeParam = modelForm.getPaginateSizeField(context);
+        String viewIndexParam = modelForm.getMultiPaginateIndexField(context);
+        String viewSizeParam = modelForm.getMultiPaginateSizeField(context);
 
         int viewIndex = modelForm.getViewIndex(context);
         int viewSize = modelForm.getViewSize(context);

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/html/HtmlScreenRenderer.java Fri Dec 11 23:11:39 2009
@@ -262,8 +262,8 @@
 
         // get the parametrized pagination index and size fields
         int paginatorNumber = modelForm.getPaginatorNumber(context);
-        String viewIndexParam = modelForm.getPaginateIndexField(context);
-        String viewSizeParam = modelForm.getPaginateSizeField(context);
+        String viewIndexParam = modelForm.getMultiPaginateIndexField(context);
+        String viewSizeParam = modelForm.getMultiPaginateSizeField(context);
 
         int viewIndex = modelForm.getViewIndex(context);
         int viewSize = modelForm.getViewSize(context);

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/MacroScreenRenderer.java Fri Dec 11 23:11:39 2009
@@ -662,6 +662,8 @@
         sr.append(title);
         sr.append("\" collapsible=");
         sr.append(Boolean.toString(collapsible));
+        sr.append(" saveCollapsed=");
+        sr.append(Boolean.toString(screenlet.saveCollapsed()));
         sr.append(" collapsibleAreaId=\"");
         sr.append(collapsibleAreaId);
         sr.append("\" expandToolTip=\"");
@@ -721,8 +723,8 @@
 
         // get the parametrized pagination index and size fields
         int paginatorNumber = modelForm.getPaginatorNumber(context);
-        String viewIndexParam = modelForm.getPaginateIndexField(context);
-        String viewSizeParam = modelForm.getPaginateSizeField(context);
+        String viewIndexParam = modelForm.getMultiPaginateIndexField(context);
+        String viewSizeParam = modelForm.getMultiPaginateSizeField(context);
 
         int viewIndex = modelForm.getViewIndex(context);
         int viewSize = modelForm.getViewSize(context);

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/screen/ModelScreenWidget.java Fri Dec 11 23:11:39 2009
@@ -333,6 +333,7 @@
         protected Form navigationForm = null;
         protected boolean collapsible = false;
         protected boolean initiallyCollapsed = false;
+        protected boolean saveCollapsed = true;
         protected boolean padded = true;
         protected List<ModelScreenWidget> subWidgets;
 
@@ -344,6 +345,9 @@
             if (this.initiallyCollapsed) {
                 this.collapsible = true;
             }
+            // By default, for a collapsible screenlet, the collapsed/expanded status must be saved
+            this.saveCollapsed = !("false".equals(screenletElement.getAttribute("save-collapsed")));
+            
             this.padded = !"false".equals(screenletElement.getAttribute("padded"));
             if (this.collapsible && UtilValidate.isEmpty(this.name) && idExdr.isEmpty()) {
                 throw new IllegalArgumentException("Collapsible screenlets must have a name or id [" + this.modelScreen.getName() + "]");
@@ -387,7 +391,7 @@
 
         @Override
         public void renderWidgetString(Appendable writer, Map<String, Object> context, ScreenStringRenderer screenStringRenderer) throws GeneralException, IOException {
-            boolean collapsed = initiallyCollapsed;
+            boolean collapsed = getInitiallyCollapsed(context);
             if (this.collapsible) {
                 String preferenceKey = getPreferenceKey(context) + "_collapsed";
                 Map<String, Object> requestParameters = UtilGenerics.checkMap(context.get("requestParameters"));
@@ -414,11 +418,21 @@
         public boolean collapsible() {
             return this.collapsible;
         }
-
-        public boolean initiallyCollapsed() {
+        
+        //initially-collapsed status, which may be overriden by user preference
+        public boolean getInitiallyCollapsed(Map<String, Object> context) {
+            String screenletId = this.getId(context) + "_collapsed";
+            Map<String, ? extends Object> userPreferences = UtilGenerics.checkMap(context.get("userPreferences"));
+            if (userPreferences != null && userPreferences.containsKey(screenletId)) {
+                return Boolean.valueOf((String)userPreferences.get(screenletId)).booleanValue() ; 
+            }
+            
             return this.initiallyCollapsed;
         }
 
+        public boolean saveCollapsed() {
+            return this.saveCollapsed;
+        }
         public boolean padded() {
             return this.padded;
         }

Modified: ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java (original)
+++ ofbiz/branches/addbirt/framework/widget/src/org/ofbiz/widget/tree/MacroTreeRenderer.java Fri Dec 11 23:11:39 2009
@@ -253,7 +253,7 @@
 
         StringWriter sr = new StringWriter();
         sr.append("<@renderLabel ");
-        sr.append("\" id=\"");
+        sr.append("id=\"");
         sr.append(id);
         sr.append("\" style=\"");
         sr.append(style);

Modified: ofbiz/branches/addbirt/framework/widget/templates/csvScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/csvScreenMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/csvScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/csvScreenMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -48,7 +48,7 @@
 <#macro renderImage src id style wid hgt border alt urlString></#macro>
 
 <#macro renderContentFrame fullUrl width height border></#macro>
-<#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
+<#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
 <#macro renderScreenletSubWidget></#macro>
 <#macro renderScreenletEnd></#macro>
 

Modified: ofbiz/branches/addbirt/framework/widget/templates/foFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/foFormMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/foFormMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/foFormMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -29,6 +29,9 @@
         "head1":"font-size=\"12\" font-weight=\"bold\"",
         "head2":"font-weight=\"bold\"",
         "head3":"font-weight=\"bold\" font-style=\"italic\"",
+        "h1":"font-size=\"12\" font-weight=\"bold\"",
+        "h2":"font-weight=\"bold\"",
+        "h3":"font-weight=\"bold\" font-style=\"italic\"",
         "error":"color=\"red\""}/>
     <#assign foStyle = foStyles[style]?default("")/>
     ${foStyle?default("")}

Modified: ofbiz/branches/addbirt/framework/widget/templates/foScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/foScreenMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/foScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/foScreenMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -27,6 +27,9 @@
         "head1":"font-size=\"12\" font-weight=\"bold\"",
         "head2":"font-weight=\"bold\"",
         "head3":"font-weight=\"bold\" font-style=\"italic\"",
+        "h1":"font-size=\"12\" font-weight=\"bold\"",
+        "h2":"font-weight=\"bold\"",
+        "h3":"font-weight=\"bold\" font-style=\"italic\"",
         "error":"color=\"red\""}/>
     <#assign foStyle = foStyles[style]?default("")/>
     ${foStyle?default("")}
@@ -59,7 +62,7 @@
 <#macro renderImage></#macro>
 
 <#macro renderContentFrame></#macro>
-<#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
+<#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
 <#macro renderScreenletSubWidget></#macro>
 <#macro renderScreenletEnd></#macro>
 

Modified: ofbiz/branches/addbirt/framework/widget/templates/htmlFormMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/htmlFormMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/htmlFormMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/htmlFormMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -409,7 +409,7 @@
 
 <#macro renderLookupField className alert name value size maxlength id autocomplete descriptionFieldName formName lookupFieldFormName targetParameterIter imgSrc ajaxUrl ajaxEnabled>
 <div class="field-lookup"><ul>
-<li><input type="text" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#rt/><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/></li></li>
+<li><input type="text" <@renderClass className alert /><#if name?has_content> name="${name}"</#if><#if value?has_content> value="${value}"</#if><#if size?has_content> size="${size}"</#if><#if maxlength?has_content> maxlength="${maxlength}"</#if><#if id?has_content> id="${id}"</#if><#rt/><#if autocomplete?has_content> autocomplete="off"</#if>/><#rt/></li>
 <li><#if descriptionFieldName?has_content>
  <a href="javascript:call_fieldlookup3(document.${formName?html}.${name?html},'${descriptionFieldName}',<#rt/>
  <#else>
@@ -420,7 +420,7 @@
   ,document.${formName}.${item}.value<#rt>
  </#list>
 </#if>
-);"></li><#rt>
+);"></a></li><#rt>
 </ul></div>
 <#if ajaxEnabled?has_content && ajaxEnabled>
     <script language="JavaScript" type="text/javascript">ajaxAutoCompleter('${ajaxUrl}');</script><#t/>

Modified: ofbiz/branches/addbirt/framework/widget/templates/htmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/htmlScreenMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/htmlScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/htmlScreenMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -129,16 +129,16 @@
 </#macro>
 
 <#macro renderContentFrame fullUrl width height border><iframe src="${fullUrl}" width="${width}" height="${height}" <#if border?has_content>border="${border}"</#if> /></#macro>
-<#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled>
+<#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled>
 <div class="screenlet"<#if id?has_content> id="${id}"</#if>><#rt/>
 <#if showMore>
 <div class="screenlet-title-bar"><ul><#if title?has_content><li class="h3">${title}</li></#if>
 <#if collapsible>
 <li class="<#rt/>
 <#if collapsed>
-collapsed"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
+collapsed"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
 <#else>
-expanded"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
+expanded"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
 </#if>
 >&nbsp</a></li>
 </#if>

Modified: ofbiz/branches/addbirt/framework/widget/templates/textScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/textScreenMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/textScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/textScreenMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -48,7 +48,7 @@
 <#macro renderImage src id style wid hgt border alt urlString></#macro>
 
 <#macro renderContentFrame fullUrl width height border></#macro>
-<#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
+<#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled></#macro>
 <#macro renderScreenletSubWidget></#macro>
 <#macro renderScreenletEnd></#macro>
 

Modified: ofbiz/branches/addbirt/framework/widget/templates/xmlScreenMacroLibrary.ftl
URL: http://svn.apache.org/viewvc/ofbiz/branches/addbirt/framework/widget/templates/xmlScreenMacroLibrary.ftl?rev=889851&r1=889850&r2=889851&view=diff
==============================================================================
--- ofbiz/branches/addbirt/framework/widget/templates/xmlScreenMacroLibrary.ftl (original)
+++ ofbiz/branches/addbirt/framework/widget/templates/xmlScreenMacroLibrary.ftl Fri Dec 11 23:11:39 2009
@@ -52,7 +52,7 @@
 </#macro>
 
 <#macro renderContentFrame fullUrl width height border></#macro>
-<#macro renderScreenletBegin id title collapsible collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled>
+<#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled>
 </#macro>
 <#macro renderScreenletSubWidget></#macro>
 <#macro renderScreenletEnd></#macro>