Programmatically get navigation case from faces-config.xml by outcome

前端 未结 1 2039
独厮守ぢ
独厮守ぢ 2020-12-11 22:48

Is there any way to get the of a navigation case in the backing bean?

Let\'s say I want to get the fr

相关标签:
1条回答
  • 2020-12-11 23:26

    You can get a NavigationCase, from a ConfigurableNavigationHandler. The NavigationCase represents a configured navigation case and you can get all the info you need from this object. Observe:

     ConfigurableNavigationHandler configNavHandler = (ConfigurableNavigationHandler)ctxt.getApplication().getNavigationHandler(); //assumes you already have an instance of FacesContext, named ctxt
     NavigationCase navCase = configNavHandler.getNavigationCase(ctxt,null,"success");
    
     String toViewId = navCase.getToViewId(ctx); // the <to-view-id>
    
    0 讨论(0)
提交回复
热议问题