Spring アクション状態から呼び出されるスニペットを次に示します。
public Event doSomething(){
/* do something */
// (1) How to create a instance of this and set custom attributes?
AttributeMap customAttributeMap;
Event done = new Event(this, "done", customAttributeMap);
}
about メソッドを呼び出す flow.xml のスニペットを次に示します。
<action-state id="someStateId">
<evaluate expression="flowAction.doSomething" />
<transition on="done">
<!-- (2) How do I access my custom attribute set in Event -->
<evaluate expression="currentEvent.attributes.pageName" result="requestScope.pageName" />
</transition>
</action-state>
だから、私の質問は次のとおりです。
- カスタム属性を設定してイベントを作成する方法は?
- Spring Flow xml ファイルでこのイベントのカスタム属性にアクセスするにはどうすればよいですか?