具有var属性的jsf datatable问题 [英] jsf datatable problem with var attribute
本文介绍了具有var属性的jsf datatable问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在开发带有数据表的小型jsf应用程序时,我遇到了此错误的以下问题
While developing a small jsf application with datatable I am having following problem with this error
The method setVar(String) in the type DataTableTag is not applicable for the arguments (JspValueExpression)
在我的jsp页面中,我有以下代码片段
in my jsp page i have following code fragment
<h:dataTable id="dt1" value="#{dbdata.empno}" var="item" bgcolor="#F1F1F1" border="10" cellpadding="5" cellspacing="3" rows="4" width="50%" dir="LTR" frame="hsides" rules="all" summary="This is a JSF code to create dataTable." >
在我的java文件中,我有以下2个代码片段-
in my java file i have following 2 code fragments--
while (rst.next())
{
empno.add(i++,new perInfo(rst.getString(1)));
}
public class perInfo {
String uname;
public perInfo(String firstName) {
this.uname = uname;
}
public String getUname() {
return uname;
}
}
数据库中的数据很好.
我发现"var"属性给了问题
I have found that "var" attribute is giving problem
请您指教
推荐答案
看起来像您遇到了此错误:
Looks like you ran into this bug:
错误41912-JSF数据表在tomcat 6.0.9上不起作用
关于此页面上的评论,可能的解决方法是更改服务器和/或jsf版本的组合.
Regarding the comments on this page a possible workaround would be changing the combination of server and/or jsf version.
这篇关于具有var属性的jsf datatable问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文