Hello,
I found out how it works.
The syntax must be like this:

  <t:commandNavigation2 activeOnViewIds="/leer.jsp" ...>
  
activeOnViewIds="/leer.jsp;"   will not work.

I looked at the code of the class UINavigationMenuItem and I think I found
out why.

If there is one view-Id / token that matches, the if condition evaluates to
true.
If there is a subsequent view-id/token that won't match the else-clause
deactivates this menuItem again.

Am I right?
If so, only one activeViewId is possible per MenuItem.

Jan


The code from rg.apache.myfaces.custom.navmenu.UINavigationMenuItem:

   public void toggleActive(FacesContext context) {
         StringTokenizer tokenizer = new
StringTokenizer(this.getActiveOnViewIdsDirectly(), ";");
         while (tokenizer.hasMoreTokens()) {
             String token = tokenizer.nextToken();
             if (token.trim().equals(context.getViewRoot().getViewId())) {  
                 this.deactivateAll();
                 this.setActive(true);
                 openParents();
             }
             else {
                 this.setActive(false);
             }
         }
     }
-- 
View this message in context: 
http://www.nabble.com/CommandNavigation2%3A-usage-of-%22activeOnViewIds%22-attribute-tf2152984.html#a6077341
Sent from the MyFaces - Users forum at Nabble.com.

Reply via email to