- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个在 Jboss 6 上使用 Primefaces 3.5 和 Omnifaces 1.5 的应用程序,使用 myfaces 2.1.5
关于尝试使用 o:converter
我收到以下错误。
org.omnifaces.taghandler.Converter
viewId=/xhtml/propelModules/initiatePropel.xhtml
location=C:\jboss-6.1.0.Final\server\default\deploy\PropelEAR.ear\PropelWeb.war\xhtml\propelModules\initiatePropel.xhtml
phaseId=RENDER_RESPONSE(6)
Caused by:
java.io.NotSerializableException - org.omnifaces.taghandler.Converter
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
<p:selectManyCheckbox value="#{initiatePropelManagedBean.currentWon.selectedEmployeeList}"
layout="pageDirection">
<o:converter converterId="omnifaces.ListIndexConverter"
list="#{initiatePropelManagedBean.currentWon.employeeList}" />
<f:selectItems value="#{initiatePropelManagedBean.currentWon.employeeList}"
var="emp" itemLabel="#{emp}" itemValue="#{emp}" />
<p:ajax process="@this" update="employeeCount"></p:ajax>
</p:selectManyCheckbox>
最佳答案
我可以重现你的问题。这是 MyFaces 2.1.5 中的一个错误。我找不到相关的错误报告和修复版本,但我至少可以说这个结构对我来说对当前最新的 MyFaces 2.1.12 来说很好用。因此,升级 MyFaces 也应该对您有用。
无关 对于具体问题,这里的转换策略有些奇怪。只需使用 omnifaces.SelectItemsConverter
或 omnifaces.SelectItemsIndexConverter
(如果您在 equals()
实体上没有好的 Employee
)应该就足够了。
<p:selectManyCheckbox ... converter="omnifaces.SelectItemsIndexConverter">
<f:selectItems value="#{initiatePropelManagedBean.currentWon.employeeList}" />
</p:selectManyCheckbox>
SelectItems(Index)Converter
不严格要求
List<SelectItem>
作为模型,它只需要一个
<f:selectItem(s)>
在 View 中。
List(Index)Converter
适用于不使用
<f:selectItem(s)>
的组件,例如
<p:autoComplete>
,
<p:picklist>
等
关于jsf-2 - java.io.NotSerializableException - org.omnifaces.taghandler.Converter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18713264/
使用@ApplicationScoped @Named @Eager,我的@EJB注入(inject)的@Stateless bean未正确实例化并评估为空。 我有一个@ApplicationScop
我将 Omnifaces 1.0 与 Richfaces 4.0 结合使用。通常,我抑制了 Richfaces 包含的一些 css/js,因为它既不必要又笨重。为此,我为渲染器类型 javax.fac
我刚刚扩展了 OminFaces 的 FullAjaxExceptionHandler 类,以添加我的项目所需的简单功能。 我所要做的就是简单地使用记录器记录所有异常,并在日志和请求中添加唯一的错误标
我将 OmniFaces 2.2 与 PrimeFaces 5.3 和 BootsFaces 0.8.1 一起使用。因为推荐使用 CombinedResourceHandler对于 BootsFace
我正在将 JSF 与omnifaces 和cdi 一起使用。在 xhtml 页面中,我使用了一些类似于(下面的 jsf 页面有更多详细信息) 的 js window.onbeforeunload =
我有一个问题,当我将我的对象保存到数据库时它工作正常,但是当我想从数据库中检索它时不起作用,我正在使用 Omnifaces 的 selectItemsConverter 我有我的对象“Modelo”,
我正在根据条件注释设置图像宽度,如下所示。 .image-width { width: 210px; }
我正在尝试使用 validateOrder 组件来验证两个 java.util.Date 对象。它类似于展示示例 on this link (PrimeFaces example) 。一切都很完美,但
为了缩小我们的问题,我们正在从 Jboss 6 EAP (JSF 2.1) 升级到 Jboss 7 EAP (JSF 2.2)。我们的工作应用程序现在存在 OmniFaces ViewScoped b
我已将我的应用程序配置为使用 OmniFaces's Extensionless URLs功能,但现在我在我的 web.xml 中启用了安全性,无扩展请求不会被 捕获. web.xml
我尝试使用 OmniFaces @Param注释以注入(inject)请求参数。 我也使用它的validatorClasses属性来验证参数。最终,这个使用过的验证器需要一个特殊的属性才能运行,我想通
我最近将 OmniFaces 库引入到我的项目中以利用其 Ajax 实用程序,但自从完成此操作后,我的 PrimeFaces 可编辑数据表现在忽略了验证错误。 我目前有一个带有自定义验证器和过滤器的
据我了解,ViewScoped bean 只有在发生以下情况之一时才会被销毁: 1) JSF 向另一个页面发送一个 POST 请求,类似 2)开启bean个数超过最大阈值设置(默认15个) 3) 用
我在大型 Web 应用程序中同时使用 OmniFaces 1.10 和 Apache MyFaces 2.2.6。当应用程序在生产环境中运行时,我在 Web 服务器 (Tomcat) 日志中收到以下形
是否可以使用 jsf 消息包覆盖默认的 omnifaces 验证消息? 我的消息包: javax.faces.converter.DateTimeConverter.DATE={2}: ''{0}''
我有以下 Facelet 标签库: #{id} taglib.xml 如下所示: idTest resources/myProjec
我正在尝试在我的应用程序中创建一个 selectManyCheckbox 功能,但现在我遇到了“转换器问题”。为了解决这个问题,我正在尝试使用已经有对象转换器的 Omnifaces。 我的解决方案基于
我正在尝试将 SelectItemsConverter 与 PrimeFaces Picklist 结合使用。 XHTML: Vorjahr
我正在使用 OmniFaces's 2.6.1 inputFile上传文件并希望通过使用 accept 属性应用媒体类型过滤,例如 accept="image/png"。这适用于具有 .png 扩展名
我想使用 OmniFaces 1.7 在我的 Jave EE 7 应用程序中。我的应用程序是一个包含 JAR 和 skinny WAR 的 EAR .我的一些 JAR 依赖于 OmniFaces,因此
我是一名优秀的程序员,十分优秀!