参数未传递到rich:popupPanel和t:dataList下的h:commandLink的后备bean [英] params not getting passed to backing bean for h:commandLink under rich:popupPanel and t:dataList

查看:114
本文介绍了参数未传递到rich:popupPanel和t:dataList下的h:commandLink的后备bean的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有rich:popupPanel,它在t:dataTable的一列下包含t:dataList.此dataList具有h:commandLink,其内部具有f:param.它对于Richfaces 3.3正常运行,但是在迁移到Richfaces 4之后,它停止了工作.提到我在那边使用rich:modalPanel代替rich:popupPanel的事实.我经历了很多链接:

I have rich:popupPanel which contains t:dataList under one column of t:dataTable. This dataList has h:commandLink which has f:param inside it. It was working fine for richfaces 3.3 but after migration to richfaces 4, it stopped working. To mention the fact that I was using rich:modalPanel in place of rich:popupPanel over there. I went through quite a few links:

https://community.jboss.org/thread/202583

commandButton/commandLink/ajax action/listener方法未调用或输入值未更新

但没有帮助:(.我是否缺少某些东西?目前,bean是基于会话的,并且我正在使用getter来获取数据模型,因为我无法将其放入构造函数中.

but of no help :(. Am I missing something? Currently, bean is session-scoped and I am using getter to fetch the data model as its not possible for me to put it in constructor.

如果有人对此有想法,请告诉我.

Please let me know, if someone has idea about it.

PS:呈现的HTML等效形式如下所示.它具有请求参数varPath,但在后备bean中,我们将其设为null.

PS: Rendered HTML equivalent looks like this. It has request parameter varPath but in backing bean we get it as null.

<a onclick="return myfaces.oam.submitForm('actionForm','actionForm:j_id0',null,    [['varPath','/Link']]);" href="#" tabindex="-1" accesskey="">/Link</a>

推荐答案

正确使用a4j:commandLink而不是h:commandLink传递参数即可解决此问题.不需要仅用于参数的自定义过滤器.

Using a4j:commandLink instead of h:commandLink pass parameters correctly which resolved this issue. No need for custom filters just for parameters.

这篇关于参数未传递到rich:popupPanel和t:dataList下的h:commandLink的后备bean的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆