<rich:modalPanel> にアクションを渡す
質問
アクションを渡す方法がいくつかあります <rich:modalPanel>
. 。「はい」と「いいえ」ボタンを含む単純なポップアップを作成し、このポップアップを別のページで再利用したいのです。そのため、「はい」ボタンが押されたときに別のアクションが呼び出される必要があります。何らかの値を渡す方法があります <rich:modalPanel>
と <a4j:actionparam>
:
<a4j:commandButton value="See details…" id="det"
reRender="popup_dataIdField, …">
<rich:componentControl for="popup"
operation="show" event="onclick" />
<a4j:actionparam name="message" assignTo="#{popupBean.message}"
value="#{myBean.message}" />
</a4j:commandButton>
しかし、何らかの方法でアクションを実行できるでしょうか?
解決 2
私は自分自身で答えを見つける:)。多分それは誰かのために参考になります。
私はFaceletsのを使用して、これをやりました。私は私のページへのポップアップが含まれていたとき、私はそれにparametrを渡します:
<ui:include src="./WEB-INF/popup/popup.xhtml">
<ui:param name="yesAction" value="${thisPageBean}" />
</ui:include>
どこthisPageBean
は - どのようなポップアップ呼び出さからBeanです。
その後、私のポップアップに私が書いた:
<a4j:commandButton id="yesButton" value="#{msgs.yesButton}"
action="#{yesAction.someAtion}"
</a4j:commandButton>
そして、これで私はthisPageBean.someAtion
を呼び出します。すべての魔法はそれが${thisPageBean}
が、私たちに必要なのです、$
あるなし#
ます。
所属していません StackOverflow