este codigo no comprendo la linea: cvsubmenu=(MenuSubBeanData)vectorSubMenu.get(n);
Código:
public Vector obtieneSubMenu (String menuElegido , String submenuElegido,
ServletContext sc, HttpServletRequest request, HttpServletResponse response) throws Exception{
String menu="";
Vector vectorSubMenu=(Vector)request.getAttribute("submenu");
Vector vectorSubMenuMostrar=new Vector();
int n=0;
try { while (n < vectorSubMenu.size()) {
MenuSubBeanData cvsubmenu = new MenuSubBeanData();
cvsubmenu=(MenuSubBeanData)vectorSubMenu.get(n);
//accion=cvsubmenu.getAccion();
menu=cvsubmenu.getMenu();
if (menu.trim().equals(menuElegido))
{
if (cvsubmenu.getSubmenu().trim().equals(submenuElegido)){
cvsubmenu.setSubmenuelegido("current");
}
vectorSubMenuMostrar.add(cvsubmenu);
}
n++;
}
} catch (Exception exc) {
con.rollback();
throw exc;
}
return vectorSubMenuMostrar;
}