Package com.bea.canvas

Examples of com.bea.canvas.Context


*
*/
public class TestCanvas {
 
  public void test1(String templatePath) {
    Context ctx = new Context();
    ctx.put("firstName", "Cedric");
    Company p = new Company();
    p.setName("BEA Systems");
    p.setLocation("San Jose");
    ctx.put("company", p);
    List l = new ArrayList();
    l.add("Cedric");
    l.add("Alois");   
    ctx.put("family", l);

    List l2 = new ArrayList();
    Company p2 = new Company();
    p2.setName("FFT");
    p2.setLocation("Paris");
    l2.add(p);
    l2.add(p2);
    ctx.put("companies", l2);
   
    Map m = new HashMap();
    m.put("Cedric", "San Francisco");
    m.put("Alois", "Paris");
    ctx.put("workplaces", m);

   
    String expected = "My name is Cedric Beust.\n" +
      "Cedric lives in San Francisco\n" +
      "Cameron lives in Boston\n" +
View Full Code Here

TOP

Related Classes of com.bea.canvas.Context

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.