Navigate using p:selectOneMenu

后端 未结 3 862
小蘑菇
小蘑菇 2021-02-10 10:35

I\'m using a select one menu to do navigation to different parts of my site:

                      
    <         


        
3条回答
  •  隐瞒了意图╮
    2021-02-10 11:16

    just create function navigate as :

                          
        
        
        
        
        
    
    
    public void navigate() {
        FacesContext context = FacesContext.getCurrentInstance();
        NavigationHandler navigationHandler = context.getApplication()
                .getNavigationHandler();
        navigationHandler.handleNavigation(context, null, outcome
                + "?faces-redirect=true");
    }
    

提交回复
热议问题