在用seam+jsf组合开发时,有时遇到
警告: 'for' attribute cannot be null 错误,结果研究终于解决了,原因是我们经常用模板开发,例如:
<s:decorate id="nameField" template="/layout/edit.xhtml" >
<ui:define name="label">标题</ui:define>
<s:label id="imageCaption" value="#{systemImageHome.instance.caption}" />
</s:decorate>
layout/edit.xhtml这个里面是这样的(大多数)
<s:label styleClass="name #{invalid?'errors':''}">
<ui:insert name="label"/>
<s:span styleClass="required" rendered="#{required}">*</s:span>
</s:label>
<span class="value #{invalid?'errors':''}">
<s:validateAll>
<ui:insert/>
</s:validateAll>
</span>
<span class="error">
<h:graphicImage value="/img/error.gif" rendered="#{invalid}" styleClass="errors"/>
<s:message styleClass="errors"/>
</span>
不知道大家看到没有这个 <s:message>组件,他会寻找父容器中第一个可编辑的组件,但是在<s:decorate>这个里面,现在没有一个可编辑的组件,所以 <s:message>得for就为null,所以如果没有可编辑的组件时应把edit.xhtml改为display.xhtml,这样就没错误了。如果还不懂可以留言,谢谢!
分享到:
相关推荐
Sensor tag的完整属性表 Sensor Tag Application: Complete Attribute Table
python3 server.py 127.0.0.1 8888 ...AttributeError: module ‘os’ has no attribute ‘exit’ 部分代码入下: from socket import * import sys,os #实现登录 def do_login(s,user,name,addr): for i in user: i
此文档详细讲解了:ASP.NET MVC5 新特性:Attribute路由的使用,非常的详细,值得学习。
Attribute Aware Pooling for Pedestrian Attribute Recognition
前言 Android Studio是Google开发的一款面向Android开发者的IDE,支持Windows、Mac、Linux等操作系统...> Manifest merger failed : Attribute application@theme value=(@style/AppTheme.NoActionBar) from AndroidMan
Recurrent attention model for pedestrian attribute recognition
主要介绍了Tomcat ssl报错Connector attribute SSLCertificateFile must be defined when using SSL with APR解决方法,需要的朋友可以参考下
基于对象与属性维度的属性约简算法加速器,梁吉业,米俊绒,特征选择是模式识别和机器学习领域的热点问题,它可以有效的改善分类和预测的性能。粗糙集理论中的属性约简是一种特殊的特征选择
MultipleTheme 真正的支持无缝换肤/夜间模式的Android框架,配合theme和换肤控件框架可以做到无缝切换换肤(无需重启应用和当前页面)。 该应用框架可以实现无缝换肤/切换夜间模式的...Setup 3:use attribute in l
问题解决:AttributeError: module ‘paddle.fluid’ has no attribute ‘EndStepEvent’问题描述解决思路问题解决 问题描述 在使用paddle.fluid导入EndStepEvent过程中 global step if isinstance(event, fluid....
AttributeError: module 'tensorflow.compat.v1' has no attribute 'contrib'的问题您具体怎么解决问题具体解决的seq_loss.py文件
Pose guided deep model for pedestrian attribute recognition in surveillance scenarios
一个非常好看完美的js写的DataGrid,支持单元格编辑,拖拽,ajax分页,新增行,排序,样子非常好看
问题描述及解决: 原创文章 1获赞 1访问量 17 关注 私信 展开阅读全文 作者:Branson233
调试递归神经网络(RNN)的时候出现如下错误: AttributeError: module 'tensorflow.contrib.rnn' has no attribute 'core_rnn_cell' 顺便问一句,资源分怎么设置免费啊
设置XML子节点的文字和属性 设置XML子节点的文字和属性 设置XML子节点的文字和属性
Corsolas AOP Attributed Framework for .NET 2.0 是一种处理面向切面编程的创新方式,基于属性,无需外部语言,以简单而强大的方式做到最好...... by maxtuno。
Submodular Attribute Selection for Visual Recognition Jingjing Zheng, Student Member, IEEE, Zhuolin Jiang, IEEE Member, Rama Chellappa, IEEE Fellow, and P. Jonathon Phillips, IEEE Member
However, AODE does not consider the relations between super-parent attribute with other normal attributes. In this paper, we propose a method based on AODE which weighted the relationship between the...