フローを次のように定義しました。
builder.id("", PublisherBean.PUBLISHER_FLOW_NAME);
builder.viewNode("list", "/pages/publishers.xhtml");
builder.viewNode("details", "/pages/publishers-details.xhtml");
builder.viewNode("deleted", "/pages/publishers-deleted.xhtml");
builder.viewNode("form", "/pages/publishers-form.xhtml");
builder.viewNode("exit", "/index.xhtml");
builder.methodCallNode("invoke-update")
.expression("#{publisherBean.update()}")
.defaultOutcome("details");
builder.methodCallNode("switch-fail")
.defaultOutcome("invoke-publishers")
.expression("#{publisherBean.switchFail()}");
builder.switchNode("proceed-action-request")
.defaultOutcome("switch-fail")
.switchCase()
.condition("#{publisherBean.actionType.ifEdit()}").fromOutcome("form");
builder.switchNode("go-for-it")
.defaultOutcome("switch-fail")
.switchCase()
.switchCase()
.condition("#{publisherBean.actionType.ifEdit()}").fromOutcome("invoke-update");
ご覧のとおり、2 つのスイッチ ノードがあります。最初はView Nod
e に向けられ、2 番目は a に向けられようとしていMethod Call Node
ます。
1 つ目は問題なく動作しますが、2 つ目は頭痛の種です。2番目のものは私にエラーを与えています
Unable to find matching navigation case with from-view-id '/pages/publishers-form.xhtml' for action '#{publisherBean.proceed()}' with outcome 'proceed-form'
.
進行機能はただ
public String proceed() {
LOG.log(Level.OFF, "Form proceed in action type {0}", actionType);
return "go-for-it";
}
ログに記録された情報publisherBean.actionType.ifEdit()
は true を返しますが、その事実は無視されます。結果をinvoke-update
toform
または他のView Node
ID に変更すると、「正常に動作します」。
私は何か間違ったことをしているのですか、それともMethod Call Node
aの結果として使用できSwitch Node
ませんか?