- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
不幸的是,没有将 Eclipse (KEPLER) JSF 2.0 项目更新到 JSF 2.2 的工作教程。应该进行此更新还是应该创建一个新项目(并导入所有文件)?
正确且干净地更新所使用的 JSF 版本的步骤是什么?
当我将 faces.xml header 更改为:
时,我刚刚收到错误(从 FactoryNotFound 到 StartupServletContextListener 问题)<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
version="2.0">
我另外将库更新为 Majorra 2.2.0 (JSF 2.2),将动态 Web 项目更新为 3.0,将 java 更新为 1.7(在首选项中),但服务器仅打印错误并且无法工作...
最佳答案
来自 JSF 2.2。引用实现手册
Faces 2.2 is backwards compatible with Faces 2.1 and 2.0. This means that a web-application that was developed to run with Faces 2.1 or 2.0 won’t require any modification when run with Faces 2.2
Due to an error in previous versions of the specification, exceptions were silently being swallowed that now will bubble up to the exception handler. Code that was relying on this incorrect behavior may need to be modified to account for fixing this problem.
还有:
Any additional attributes on
<composite:attribute/>
are exposed as attributes accessible from thegetValue()
andattributeNames()
methods onPropertyDescriptor
. The return type fromgetValue()
must be a ValueExpression with the exception of the getValue(“type”). The return type fromgetValue(“type”)
must be Class. If the value specified for the type attribute of<cc:attribute/>
cannot be converted to an actual Class, aTagAttributeException
must be thrown, including theTag
andTagAttribute
instances in the constructor.
结论:JSF2.1 之间的损坏很小。和2.2。
编辑:JSF2.2 中的一些新内容:
新命名空间: xmlns:f="http://xmlns.jcp.org/jsf/core"
可以替换xmlns:f="http://java.sun.com/jsf/core"
还有
xmlns:h="http://xmlns.jcp.org/jsf/html"
可以替换xmlns:h="http://java.sun.com/jsf/html"
根据您的评论:preRenderView
JSF2.0 中以下构造的事件类型:
<f:metadata>
<f:event type="preRenderView" listener="#{viewActionManagedBean.validateUser()}"/>
</f:metadata>
可以替换为以下全新的<f:viewAction/>
JSF2.2 中的标签:
<f:metadata>
<f:viewAction action="#{viewActionManagedBean.validateUser()}"/>
</f:metadata>
此标记还支持在请求生命周期的特定阶段执行托管 Bean 方法 phase
属性。有效选项是
该标签还支持 if
定义运行操作的 bool 条件的属性。以下面为例:
<f:metadata>
<f:viewAction action="#{viewActionManagedBean.validateUser()}" if="#{viewActionManagedBean.verifyCondition}" phase="APPLY_REQUEST_VALUES"/>
</f:metadata>
请注意,此标记仅在新命名空间 xmlns:f="http://xmlns.jcp.org/jsf/core"
中可用。
您可以获取下面的规范副本。查看/前言/2.1 之间的更改。和2.2。/向后兼容以前的版本
关于jsf - 将 JSF 2.0 项目更新到 2.2 的手册,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19772995/
关闭。这个问题是opinion-based .它目前不接受答案。 想改善这个问题吗?更新问题,以便可以通过 editing this post 用事实和引文回答问题. 3年前关闭。 Improve t
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 6年前关闭。 Improve thi
我可以从哪里下载 cakephp 1.3 的手册.......? 最佳答案 强烈建议不要下载手册,因为它与开发的方式相同,并且可以改进和更改。但是,我承认需要离线副本,您可以在此处找到有关在哪里查看以
我想使用 GKSession 连接两台设备,其中一台作为服务器,另一台作为客户端。使用此配置我无法使用 GKPeerPickerController。 我在连接两个设备时遇到问题: 仅使用蓝牙:不可能
我花了相当多的时间寻找教程并在 Web 服务目录上实现签名和加密。现在我需要扩展该功能以允许每个用户拥有自己的签名和加密 key 。 出于这个原因,我开始四处寻找一些关于如何使用 WSS4J 拦截器的
使用ggplot2我通常使用geom_text和position=jitter之类的东西来注释我的图。 但是 - 对于一个漂亮的情节,我经常发现手动注释是值得的。如下所示: data2 <- stru
谁能推荐一本好的 ANSI SQL 引用手册吗? 我不一定是指教程,而是当您需要基本或更深入的解释或示例时可以查找的适当引用文档。 目前我正在使用W3Schools SQL Tutorial和 SQL
我正在尝试为我的 CS 1 类(class)编写代码。 代码的要点是编写一个代码,您可以在其中从一百美元的钞票中进行任何金额的找零,我需要归还适当的钞票和硬币。 我必须手动编写 JFrame 如果有人
我正在阅读 shellcoder 的手册。我正在跟踪,但由于某种原因无法让我的 shellcode 运行。我已经编译了该程序 gcc -mpreferred-stack-boundary=2 -m32
我的作业(不是家庭作业,只是“如果你能做到就试试”的事情)是使用位操作来加密和解密 .txt 文件。 这是程序。它成功打开文件进行读/写,但将所有 0 和空格放入 output.txt 文件而不是预期
我在谷歌上搜索了很多关于 C 的不必要结果。我希望能在本地获得最好的 C 手册。我发现引用资料很有用 here.我想自己做笔记并删除手册。 Can I manage it somehow like a
我在这个例子中 w.r.t. shellcoder's handbook(second edition),还有一些关于栈的问题 root@bt:~/pentest# gdb -q sc Readin
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 4 年前。
所以我有一份 PDF 手册,我们正在尝试为其创建可打印的 HTML 版本。我遇到了一些障碍,包括: 100% 缩放与缩小以适合(FF/IE 中的默认设置似乎不同) 只打印一页,后面没有空格页脚(或者甚
当我开始使用 PHP(大约 10 年前)时,最吸引我的是 .chm 格式的手册。我过去常常让“索引”选项卡保持打开状态,然后在其中输入我需要的任何内容,它会引导我进入一个漂亮、简洁但详尽的引用页面。
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 9 年前。 Improve this
我想更好地了解如何使用 LLDB 调试我的 iOS 代码。我经常看到我的同事使用提示进行调试,例如查看变量的值等等。我在哪里可以找到一些关于如何在命令行上使用 LLDB 调试器的文档? 提前致谢。 最
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引起辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the he
Springer 的 Consolidated Ada Reference Manual 2005 Edition (ISO/IEC 8652:2007(E), Ed. 3) 和 Annotated
我遇到过几个关于使用 mysql 连接器/C++ 的文档,其中所有文档都使用不同的函数来完成相同的事情。例如 `sql::mysql::MySQL_Driver *driver; sql::Conne
我是一名优秀的程序员,十分优秀!