编写JSF的tabpanel出错:duplicate Id for a component all
来源:互联网 发布:js 文本编辑器 编辑:程序博客网 时间:2024/06/15 02:47
原代码如下:
<rich:tabPanel switchType="client" > <rich:tab label="维保到期预警" > <ui:include src="WarningMaintenanceExpire.xhtml"/> </rich:tab> <rich:tab label="IP临时分配到期预警" > <ui:include src="WarningIPDistributed.xhtml"/> </rich:tab> </rich:tabPanel>
(1)参考http://www.richfacescn.com/topic_detail.html?id=193:一开始以为是<tabPanel>、<tab>标签的问题,分别加上id值,还是报错,问题没能解决。
(2)参考http://zhglhy.iteye.com/blog/1388963:
可能原因:1.由于在faces-config.xml中配置类为session,当刷新或后退时页面重新生成重复组件
2.由于多个页面dataTable里配置变量都一样导致,当刷新或后退时页面重新生成重复组件
解决方法:在dataTable里的所有标签都加上非重复id
最后认真分辨每个<tab>对应的xhtml,查看了多个标签的id值,发现了有问题的代码如下:
<h:form id="all"> <rich:dataTable id="warningMaintenanceExpire" style="width: 98%"……(其中,xmlns:h="http://java.sun.com/jsf/html")
解决方法:重新定义两个xhtml的<h:form>的id值,问题搞定了。
- 编写JSF的tabpanel出错:duplicate Id for a component all
- "A duplicate insert block exists for class......"的解决办法
- "A duplicate insert block exists for class......"的解决办法
- How To List All The Named Events Set For A Database [ID 436036.1]
- Writing a simple Composite Component with JSF 2.0
- Creating a Duplicate Database on a New Host. [ID 388431.1]
- A USB HID Component for C#
- Session id hasn't been set for stateful component错误
- 打包出错Duplicate id @+id/image, already defined earlier in this layout Issue
- Class Wizard 出错: A duplicate insert block exists
- Class Wizard 出错: A duplicate insert block exists
- Class Wizard 出错: A duplicate insert block exists
- 解决yum update出错"package is a duplicate with"
- Enumerating All Modules For a Process
- set a font for all child windows
- A Single Breadcrumb for All SharePoint Pages
- share a bibtex for all paper tex
- Enumerating All Modules For a Process
- 拍照图片滤镜sample
- 关于django simplejson的用法
- 智能计算初学
- Oracle 10g及pro*c相关问题及解决方法
- Ext.Net 后台弹出Confirm确认框(2.1版的是这么写,其他的没试过,大同小异)
- 编写JSF的tabpanel出错:duplicate Id for a component all
- 各种内部排序
- GSL安装的安装及配置过程
- Linux网络协议栈QoS模块(TC)的设计与实现
- 有关 Direct3D技术的初步探索-------矩阵变换
- contentprovider的学习实例总结
- leetcode之Merge Two Sorted Lists
- 奇葩的各种算法
- MyEclipse创建EJB3.0