// set up the left nav.
GlobalMasterLists gml = GlobalMasterLists.getGlobalMasterLists(dataSource);
ListPreference listPreference = user.getListPreference(listType);
Vector vecViewList = gml.getViewComboData(listPreference);
String URL = "/common/new_view.do?listType="+listType+"&moduleId="+moduleId;
NestedMenuItem primaryMenuItem = new NestedMenuItem("Views", URL, true);
ArrayList secondaryMenuItems = new ArrayList();
Iterator viewIterator = vecViewList.iterator();
while (viewIterator.hasNext()) {
DDNameValue view = (DDNameValue)viewIterator.next();
int viewId = view.getId();
String viewName = view.getName();
boolean selected = false;
if (selectedId.equals(String.valueOf(viewId))) {
selected = true;
}
secondaryMenuItems.add(new NestedMenuItem(viewName, "/common/edit_view.do?viewId="+viewId+"&listType="+listType, selected));
}
primaryMenuItem.setItems(secondaryMenuItems);
ArrayList primaryMenuItems = new ArrayList();
primaryMenuItems.add(primaryMenuItem);
LeftNavigation leftNav = new LeftNavigation("Custom Views", primaryMenuItems);
request.setAttribute("leftNav", leftNav);
FORWARD_final = FORWARD_displaynewview;