actionListener 中的参数
我使用 JSF 1.2。如何将一些参数传递给在 a4j:support for h:inputText 中指定的事件上调用的 actionListener?
<h:inputText id="dateToText" value="#{flowScope.fileSearchCriteria.toDateStr}">
<a4j:support event="onchange" reRender="datePanel1"
actionListener="#fileSearchCriteria.changeTextToDate}" />
<a4j:actionparam name="strxxx"
assignTo="#{flowScope.fileSearchCriteria.strxxx}" value="#{resourceBundle.searchIn}"/>
</h:inputText>
I use JSF 1.2.How can I pass some parameters to actionListener which is called on the event specified in a4j:support for h:inputText?
<h:inputText id="dateToText" value="#{flowScope.fileSearchCriteria.toDateStr}">
<a4j:support event="onchange" reRender="datePanel1"
actionListener="#fileSearchCriteria.changeTextToDate}" />
<a4j:actionparam name="strxxx"
assignTo="#{flowScope.fileSearchCriteria.strxxx}" value="#{resourceBundle.searchIn}"/>
</h:inputText>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你所拥有的是正确的,但我会切换到action,而不是actionListner。我认为不能保证 a4j:actionparam 将在 actionListener 之前调用。但动作总是最后调用。
What you have is correct, but instead of actionListner, I would switch to action. I don't think there is guarantee that a4j:actionparam will be invoked before actionListener. But action will always be invoked last.