The metadata component needs to be nested within a f:metadata tag. Suggestion: enclose the necessary components within <f:metadata>

白昼怎懂夜的黑 提交于 2019-11-28 11:22:11

As to the false UI warning, this is caused by Mojarra issue 2868 and already fixed since 2.2.1.

As to the <f:viewAction> still not working on 2.2.1, another Mojarra bug with the since Java EE 7 introduced xmlns.jcp.org XML namespace domain is causing this trouble. In specifically Mojarra versions 2.2.0 and 2.2.1 the new XML namespace domain is not properly registered for all new JSF 2.2 specific tags which didn't exist in JSF 2.0/2.1, such as <f:viewAction>. In effects, the xmlns.jcp.org will give you in Mojarra 2.2.0/2.2.1 only the JSF 2.1 compatible tags back. This totally explains why the new JSF 2.2 <f:viewAction> didn't work for you.

You have 2 options:

  1. Use the "old" java.sun.com XML namespace domain instead. The new JSF 2.2 specific tags are properly registered there.

  2. Upgrade to at least Mojarra 2.2.2. This peculiar bug is fixed since that version. Mojarra is currently already at 2.2.4.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!