JSF 2.0 command button 为‘null Converter’设置值“......“时发生转换错误。

来源:互联网 发布:王士营养配餐软件 编辑:程序博客网 时间:2024/06/01 08:32

JSF 2.0 command button 为‘null Converter’设置值“……“时发生转换错误。

为 commandButton标签添加 immediate=”true”属性能够解决以上问题

添加前

<h:commandButton value="your value" action="#{bean.action}"/>

添加后

<h:commandButton value="your value"  immediate="true" action="#{bean.action}"/>

immediate属性介绍:

Flag indicating that, if this component is activated by the user, notifications should be delivered to interested listeners and actions immediately (that is, during Apply Request Values phase) rather than waiting until Invoke Application phase.

标志表明,如果这个组件被用户激活,那么应该立即(即,在“申请请求值”阶段期间)将通知递送到感兴趣的监听器和动作,而不是等到“调用应用程序”阶段。

阅读全文
0 0
原创粉丝点击