为什么每当 a4j:commandLink 中存在渲染属性时,不会调用操作属性?
我在 a4j:commandLink 上遇到问题,我有条件地使用渲染来渲染我的链接 属性但不幸的是操作方法没有调用?
我做了一些发现,发现仅使用请求范围 bean 进行条件渲染时,action 属性存在问题。 解决方案是使 bean 会话具有作用域。 我将我的 bean 纳入了会话范围,但仍然不走运。
<a4j:commandLink rendered="#{someBean.enable}" action="#{someBean.doThis}" />
这是我的豆子:
@Name("someBean")
@Scope(ScopeType.Session)
public class SomeBean{
private boolean enable;
public void doThis(){
//not called here
}
//getters setters
}
我错过了什么吗?
我正在使用 jsf2、richfaces 和 seam。
提前致谢。
I have a problem on a4j:commandLink, i conditionally rendering my link using rendered
attribute but unfortunately the action method is not invoke?
I made some findings and found out that there are problems in action attribute when conditionally rendering using just request scope bean.
The solution is to make the bean sessions scope.
I made my bean into session scope but still out of luck.
<a4j:commandLink rendered="#{someBean.enable}" action="#{someBean.doThis}" />
Here is my bean:
@Name("someBean")
@Scope(ScopeType.Session)
public class SomeBean{
private boolean enable;
public void doThis(){
//not called here
}
//getters setters
}
Am i missing something?
I am using jsf2, richfaces and seam.
Thanks in advanced.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有提到您正在使用的 richfaces 或接缝的版本,但似乎是 richfaces 的版本 3.3
如果是这样,请使用 ajaxSingle="true" 属性。
You haven't mentioned the version of richfaces or seam you're using but seems it is version 3.3 for richfaces
if so, use ajaxSingle="true" attribute.