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

前端 未结 1 789
忘掉有多难
忘掉有多难 2020-12-10 17:01

I went through different sources like:

  • Error saying I need to use f:metadata even though I do

  • http://docs.oracle.com/javaee/7/javaserverface

相关标签:
1条回答
  • 2020-12-10 17:16

    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.

    0 讨论(0)
提交回复
热议问题