After some tests, I've found the problem in the redirect in my
navigation-rules. But, as I'm working with seam, facelets and myfaces,
the redirect is a must.
There is a way to make PanelNavigation2 work with redirect?? I've found
several times this questions without an answer.
German de la Cruz wrote:
Hi people!
I've a problem with the state of my PanelNavigator2. It works
perfectly, but the state isn't saved. I mean, If I select an menuitem,
it's not marked with the class defined for activeItemClass
As I have a menuGroup, if I select it, the menu is expanded. But after
select a child, it's closed again. Then, I think it is a problem with
my actions.
After making some research, I've found this mail in the facelets
mailing-list. Perhaps it helps. I think it's the same problem, but the
different versions of the libraries.
http://permalink.gmane.org/gmane.comp.java.facelets.user/713
I'm using facelets 1.1.11, and myfaces 1.1.2, tomahawk 1.1.2 and
jboss-seam 1.0.1
I'll put an extract of my page and my bean.
<div class="menu">
<t:panelNavigation2 id="nav1" layout="list" itemClass="item"
activeItemClass="activeItem" openItemClass="openItem"
separatorClass="separator" >
<t:navigationMenuItems id="navitems"
value="#{menuService.menu}" />
</t:panelNavigation2>
</div>
public class MenuServiceImpl implements MenuService {
public List<NavigationMenuItem> getMenu(){
List<NavigationMenuItem> menu = new
ArrayList<NavigationMenuItem>();
NavigationMenuItem param= getMenuItem("Parametros", "");
menu.add(param);
param.add(getMenuItem("Padron", "personCRUD"));
param.add(getMenuItem("Provincias", "stateCRUD"));
param.add(getMenuItem("Partido - Departamento",
"departmentCRUD"));
param.add(getMenuItem("Establecimiento", "placeCRUD"));
param.add(getMenuItem("Categorias", "categoryCRUD"));
param.add(getMenuItem("Transportes", "transportCRUD"));
param.add(getMenuItem("Especies", "specieCRUD"));
return menu;
}
private NavigationMenuItem getMenuItem(String label, String action){
NavigationMenuItem item=new NavigationMenuItem(label, action);
return item;
}
}