Package org.apache.struts.taglib

Examples of org.apache.struts.taglib.SimpleBeanForTesting


                HashMap map = new HashMap();
                map.put("param1","value1");
                map.put("param2","value2");
                map.put("param3","value3");
                map.put("param4","value4");
                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
                pageContext.setAttribute("paramPropertyMap", sbft, PageContext.REQUEST_SCOPE);
       runMyTest("testLinkHrefNamePropertyRequestScope", "");
    }
View Full Code Here


        return new TestSuite(TestFileTag1.class);
    }

    private void runMyTest(String whichTest, String locale) throws Exception {
        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
        request.setAttribute("runTest", whichTest);
        pageContext.forward("/test/org/apache/struts/taglib/html/TestFileTag1.jsp");
    }
View Full Code Here

        return new TestSuite(TestImgTag4.class);
    }

    private void runMyTest(String whichTest, String locale) throws Exception {
        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
        request.setAttribute("runTest", whichTest);
        pageContext.forward("/test/org/apache/struts/taglib/html/TestImgTag4.jsp");
    }
View Full Code Here

        return new TestSuite(TestImgTag5a.class);
    }

    private void runMyTest(String whichTest, String locale) throws Exception {
        pageContext.setAttribute(Globals.LOCALE_KEY, new Locale(locale, locale), PageContext.SESSION_SCOPE);
        pageContext.setAttribute(Constants.BEAN_KEY, new SimpleBeanForTesting("Test Value"), PageContext.REQUEST_SCOPE);
        request.setAttribute("runTest", whichTest);
        pageContext.forward("/test/org/apache/struts/taglib/html/TestImgTag5a.jsp");
    }
View Full Code Here

                HashMap map = new HashMap();
                map.put("param1","value1");
                map.put("param2","value2");
                map.put("param3","value3");
                map.put("param4","value4");
                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
                pageContext.setAttribute("paramPropertyMapNoScope", sbft, PageContext.REQUEST_SCOPE);
       runMyTest("testImgSrcNamePropertyNoScope", "");
    }
View Full Code Here

                HashMap map = new HashMap();
                map.put("param1","value1");
                map.put("param2","value2");
                map.put("param3","value3");
                map.put("param4","value4");
                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
                pageContext.setAttribute("paramPropertyMapApplicationScope", sbft, PageContext.APPLICATION_SCOPE);
       runMyTest("testImgSrcNamePropertyApplicationScope", "");
    }
View Full Code Here

                HashMap map = new HashMap();
                map.put("param1","value1");
                map.put("param2","value2");
                map.put("param3","value3");
                map.put("param4","value4");
                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
                pageContext.setAttribute("paramPropertyMapSessionScope", sbft, PageContext.SESSION_SCOPE);
       runMyTest("testImgSrcNamePropertySessionScope", "");
    }
View Full Code Here

                HashMap map = new HashMap();
                map.put("param1","value1");
                map.put("param2","value2");
                map.put("param3","value3");
                map.put("param4","value4");
                SimpleBeanForTesting sbft = new SimpleBeanForTesting(map);
                pageContext.setAttribute("paramPropertyMapRequestScope", sbft, PageContext.REQUEST_SCOPE);
       runMyTest("testImgSrcNamePropertyRequestScope", "");
    }
View Full Code Here

   
    public void testOptionsCollectionArrayItemValueInCollectionProperty() throws Exception {
      pageContext.setAttribute("arrayOfLVB", createArrayOfLVB(), PageContext.REQUEST_SCOPE);
      pageContext.setAttribute(Constants.BEAN_KEY,
          new SimpleBeanForTesting("key1"), PageContext.REQUEST_SCOPE);
      runTest("testOptionsCollectionArrayItemValueInCollectionProperty", "");
    }
View Full Code Here

    }
   
    public void testOptionsCollectionArrayItemValueNotInCollectionProperty() throws Exception {
      pageContext.setAttribute("arrayOfLVB", createArrayOfLVB(), PageContext.REQUEST_SCOPE);
      pageContext.setAttribute(Constants.BEAN_KEY,
          new SimpleBeanForTesting("key15"), PageContext.REQUEST_SCOPE);
      runTest("testOptionsCollectionArrayItemValueNotInCollectionProperty", "");
    }
View Full Code Here

TOP

Related Classes of org.apache.struts.taglib.SimpleBeanForTesting

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.