try
{
if (_menu == null)
{
List<PageImpl> al = _createPageList();
TreeModel treeModel = new ChildPropertyTreeModel(al, "children");
_menu = new MenuModelImpl(treeModel, "viewId", "/4.jspx");
}
return _menu;
}
catch(IntrospectionException e)
{
_LOG.severe(e);
return null;
}
}
else if ("navigationpath".equals(name))
{
try
{
if (_navigationpath == null)
{
List<PageImpl> al = _createPageList();
TreeModel treeModel = new ChildPropertyTreeModel(al, "children");
_navigationpath = new MenuModelImpl(treeModel, "viewId", "/7.jspx");
}
return _navigationpath;
}
catch(IntrospectionException e)
{
_LOG.severe(e);
return null;
}
}
else if ("simpleList".equals(name))
{
if (_simpleList == null)
{
_simpleList = new ArrayList<Map<String, Object>>();
_simpleList.add(_createHashMap("First", 1));
_simpleList.add(_createHashMap("Second", 2));
_simpleList.add(_createHashMap("Three", 3));
_simpleList.add(_createHashMap("Four", 4));
_simpleList.add(_createHashMap("Five", 5));
_simpleList.add(_createHashMap("Six", 6));
}
return _simpleList;
}
else if ("numberList".equals(name))
{
// A simple out-of-order list of numeric strings,
// for use in the selectManyListbox test
List<String> list = new ArrayList<String>(2);
list.add("8");
list.add("2");
return list;
}
else if("iteratorList".equals(name))
{
if (_iteratorList == null)
{
// -= Simon Lessard =-
// FIXME: _iteratorList will contains 5 null value since
// put return the value before the insertion at
// specified key.
// Ref: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html#put(K, V)
_iteratorList = new ArrayList<String>();
_iteratorList.add(new HashMap<String, String>().put("data","One"));
_iteratorList.add(new HashMap<String, String>().put("data","Two"));
_iteratorList.add(new HashMap<String, String>().put("data","Three"));
_iteratorList.add(new HashMap<String, String>().put("data","Four"));
_iteratorList.add(new HashMap<String, String>().put("data","Five"));
}
return _iteratorList;
}
else if("colorList".equals(name))
{
ArrayList<Color> colorList = new ArrayList<Color>();
colorList.add(new Color(255, 0, 0));
colorList.add(new Color(0, 0, 255));
colorList.add(new Color(255, 255, 0));
colorList.add(new Color(0, 255, 0));
return colorList;
}
else if("treeModel".equals(name))
{
if (_treeModel == null)
{
Person john = new Person("John Smith");
Person kim = new Person("Kim Smith");
Person tom = new Person("Tom Smith");
Person zoe = new Person("Zoe Smith");
Person ira = new Person("Ira Wickrememsinghe");
Person mallika = new Person("Mallika Wickremesinghe");
john.getKids().add(kim);
john.getKids().add(tom);
tom.getKids().add(zoe);
ira.getKids().add(mallika);
List<Person> people = new ArrayList<Person>();
people.add(john);
people.add(ira);
_treeModel = new ChildPropertyTreeModel(people, "kids");
}
return _treeModel;
}
else if("pathSet".equals(name))