0

ナビゲーション ルールを使用して Web ページから別のページに移動し、facesmessage を取得したい:

No navigation case match for viewId /content/diagram.xhtml,  action null and outcome edit_weekedit

私の Faces Config は次のようになります。

<navigation-rule>
        <from-view-id>/content/diagram.xhtml</from-view-id>
        <navigation-case>
            <from-outcome>edit-weekedit</from-outcome>
            <to-view-id>/edit/editnotice.xhtml</to-view-id>
        </navigation-case>
</navigation-rule>

ナビゲートする私の方法は次のとおりです。

public void changeListener(AjaxBehaviorEvent event) {
        SelectOneMenu source = (SelectOneMenu) event.getSource();
        if (source.getValue().equals("number_of_node")) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            String outcome = "edit_weekedit"; // Do your thing?
            facesContext.getApplication().getNavigationHandler().handleNavigation(facesContext,null, outcome);
        }
    }

Apache myfaces 2.0 を使用しています。

ここで何が問題なのですか?

宜しくお願いします

4

1 に答える 1

1

changeListener結果にはアンダースコアedit_weekeditが付いていますが、構成にはハイフンが付いています。したがって、エラーです。両方を同じにして再実行してください。edit-weekedit

于 2012-04-16T07:18:45.523 に答える