问题描述
我有一个用WebLogic部署的JSF 2 Richfaces编写的liferay Portlet应用程序.
I have a liferay portlet application written in JSF 2 Richfaces deployed under weblogic.
页面呈现得很好,而且EL解析器似乎做得很好.
Pages are rendered fine, and it seems that EL resolver does it's job well.
但是,一旦我启动任何形式的提交,页面就会重新加载,而没有任何反应.
However as soon as I initiate any kind of submit the page simply reloads and nothing happens.
我在Internet上找到了几种解决方案,其中大多数都归结为该解决方案:
I've found several solutions on the Internet, most of them came down to this solution:
为什么Liferay Faces不处理JSF Portlet操作事件?
我还在Liferay的官方JSF richfaces展示应用程序中找到了这些liferay-porlet.xml
设置,所以我已经尝试过了.
I've also found these liferay-porlet.xml
settings in Liferay's official JSF richfaces showcase application so I've already tried them.
问题在于,一旦我添加:
The problem is that as soon as I add:
<requires-namespaced-parameters>false</requires-namespaced-parameters>
对于我的liferay-porlet.xml
,portlet变得不可见,因此我无法验证它是否解决了该问题.
To my liferay-porlet.xml
the portlets become invisible so I can't verify if it fixes the issue.
有人遇到过类似的问题吗?有没有人有什么建议?我也研究了这篇文章中提出的建议:
Has anyone came across a similar issue? Does anyone have any suggestions? I've also looked in to suggestions made in this post:
它们似乎都不适用于我的案子.我已经把我的申请简化了.似乎是Liferay问题.
None of them appear to apply to my case. I've stripped down my application to the bone. It seems like a Liferay issue.
使用的版本:
Liferay 7.0
RichFaces 4.5.17
com.liferay.faces.bridge.impl 4.1.1
com.liferay.faces.bridge.ext 5.0.2
com.liferay.faces.bridge.api 4.1.0
javax.faces 2.2.14
推荐答案
您有两个选择:
-
将以下内容添加到您的
WEB-INF/web.xml
文件中,以确保JSF正确处理命名空间参数:
Add the following to your
WEB-INF/web.xml
file to ensure that JSF handles namespaced parameters correctly:
<context-param>
<param-name>com.sun.faces.namespaceParameters</param-name>
<param-value>true</param-value>
</context-param>
某些组件库可能无法处理命名空间参数,但是我很确定PrimeFaces,IceFaces和RichFaces可以(可能也包括BootsFaces和ButterFaces).
Some component libraries may not be able to handle namespaced parameters, but I'm pretty sure that PrimeFaces, IceFaces, and RichFaces can (probably BootsFaces and ButterFaces too).
将以下内容添加到 WEB-INF/liferay-portlet.xml
的<portlet>
部分:
Add the following to the <portlet>
section of your WEB-INF/liferay-portlet.xml
:
<requires-namespaced-parameters>false</requires-namespaced-parameters>
似乎您尝试了#2,但您可能在错误的位置包含了配置.这可能会导致错误,进而导致您的portlet部署失败.检查DTD以确保您的配置顺序正确: https://docs.liferay.com/ce/portal/7.0-latest/definitions/liferay-portlet-app_7_0_0.dtd.html
It seems like you tried #2, but you may have included the config in the wrong place. That is likely causing an error which in turn causes your portlet to fail to deploy. Check the DTD to ensure that your config is in the right order: https://docs.liferay.com/ce/portal/7.0-latest/definitions/liferay-portlet-app_7_0_0.dtd.html
这篇关于Liferay 7 JSF操作未触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!