Please help:
I have a problem with setting a target (menuComponent.setTarget("<your_frame_target_name>").
I'm displaying the menu tree in the left frame, and when one of the items is selected, the details of the item needs be displayed in the right frame.
This works fine ONLY if the item selected is a leaf node, which means the item does not have any sub menu.
Here is my code:
HttpSession session = request.getSession();
MenuRepository repository = new MenuRepository();
MenuRepository defaultRepository = (MenuRepository)session.getServletContext().getAttribute(MenuRepository.MENU_REPOSITORY_KEY);
repository.setDisplayers(defaultRepository.getDisplayers());
ArrayList wsList = workspaceList;
for (int i=0; i < wsList.size(); i++) {
MenuComponent mc = new MenuComponent();
WorkspaceTO to = (WorkspaceTO) wsList.get(i);
String workspaceName = to.getName();
mc.setName(workspaceName);
String parentWorkspace = to.getParentWorkspace();
if (parentWorkspace!=null) { //All workspaces have parent workspace in this case.
MenuComponent parentMenu = repository.getMenu(parentWorkspace);
if (parentMenu == null) {
parentMenu = new MenuComponent();
parentMenu.setName(parentWorkspace);
//parentMenu.setTarget("frmBody");
repository.addMenu(parentMenu);
}
mc.setParent(parentMenu);
}
if (workspaceName.equals("LIVE")) {
mc.setTitle("Workspace List:");
mc.setAction(null);
}else {
mc.setTitle(workspaceName);
mc.setAction("/alternativeAnalysis/viewWorkspace.do?workspaceName="+workspaceName);
}
/**********************************************************************************/
mc.setTarget("frmBody"); // this is a right-hand side frame name.
/**********************************************************************************/
repository.addMenu(mc);
}
mc.setTarget("frmBody") only works for the leaf node (menu w/o sub men in the tree menu structure).
When I looked at the source code
Have any idea?? Please help me with this problem.
Thank you.
Michelle
BEGIN:VCARD VERSION:2.1 N:Park;Michelle FN:Park, Michelle (Contr) ORG:IT-TASC;102098/088 TEL;WORK;VOICE:(703) 961-8052 ADR;WORK:;Chantilly-V68 (IT) LABEL;WORK:Chantilly-V68 (IT) EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20060106T131730Z END:VCARD
