Hi Andrew, wow, lots of questions :) Andrew Madu wrote: Hi Simone,Nearly. In the normal way, the class must be in classpath (so either a jar in WEB-INF/lib or in classes) and referenced with its fully qualified name, so for example <map:script src=""/> . This unfortunately means that you will have to recompile your flows and restart the server for each change you make. Another approach is the compiling classloader, that compiles from source code, and thus avoids all the rebuild/restart problems. I haven't used this myself, and can't give you much help on this subject. Unfortunately no. Every method you wish to call from the sitemap must be public, void, with no parameters, and called doSomethingToDo. You will then call it from the sitemap with <map:call function="somethingToDo"/> . The "function name space" is flat, so if you have two methods with the same name in two different classes (or in two different _javascript_s) it will be a problem. Nearly : String artistID = getParameters().get("artistID"); Yes, the same. Hey, pay attention. In Javaflow AND in flowscript, global variabiles are quite dangerous : they are global in the real sense, can span different user sessions, you should not use them if not for singleton classes, or other really global data like configuration. Also, they are not continuation-safe, so i always go for local variables : // This is a singleton class, so no danger in using it as global. private ShoppingCartManager cartManager = ShoppingCartManager.getInstance(); public void doSomethingToDo() { String user = getRequest().getSession().getAttribute("user"); ShoppingCart cart = cartManager.findCartForUser(user); VarMap bizdata = new VarMap(); bizdata.put("user", user); FormInstance fi = new FormInstance("cart.def.xml"); fi.createBinding("cart.bnd.xml"); fi.load(cart); fi.show("cart", bizdata); .... } I'm going by heart, so i apologize in advance for errors :) See previous example. sure : VarMap bizdata = new VarMap(); bizdata.put("artistID", artistID); sendPageAndWait("artistDetails2.xml",bizdata); You're welcome. Simone -- Simone Gianni |
- Re: Cast type in flowscript [ Javaflow] Simone Gianni
- Re: Cast type in flowscript [ Javaflow] Andrew Madu
- Re: Cast type in flowscript [ Javaflow] Jason Johnston
- Re: Cast type in flowscript [ Javaflow] Simone Gianni
- Re: Cast type in flowscript [ Javaflow] Andrew Madu
- Re: Cast type in flowscript [ Javaflow] Simone Gianni
- Re: Cast type in flowscript [ Javaflow] Andrew Madu
- Re: Cast type in flowscript [ Javaflow] Simone Gianni
- Re: Cast type in flowscript [ Javaflow] Andrew Madu