日期:2014-05-19  浏览次数:20598 次

JSF控件 selectInputDate的问题
情况是这样的,我现在用的Icefaces框架,在后缀为jspx的文件里面导入了
selectInputDate空间.然后加了相应的属性(属性都是正确的),然后,启动程序后报
错,去掉那个控件,程序运行正常,页面也能出来.错误信息如下:

2009-06-26 10:16:30 Failed to execute JSP lifecycle.
javax.servlet.jsp.JspException: java.util.MissingResourceException:
Can't find bundle for base name messages-override, locale en
at
com.icesoft.faces.component.selectinputdate.SelectInputDateTag.doEndTag(SelectInputDateTag.java:725)
at
com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:246)
at
com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229)
at
com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229)
at
com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229)
at
com.icesoft.faces.webapp.parser.Parser.executeJspLifecycle(Parser.java:229)
at com.icesoft.faces.webapp.parser.Parser.parse(Parser.java:162)


我页面的代码是这样的:
<f:view xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ice="http://www.icesoft.com/icefaces/component">

<ice:outputDeclaration doctypeRoot="HTML"
doctypePublic="-//W3C//DTD HTML 4.01 Transitional//EN"
doctypeSystem="http://www.w3.org/TR/html4/loose.dtd" />

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"></meta>
<title>Basic Calendar Tutorial</title>
<link href="./xmlhttp/css/xp/xp.css" rel="stylesheet" type="text/css" />
<link href="./css/selectInputDate.css" rel="stylesheet" type="text/css" />
</head>

<body>

<ice:form>
<!-- Popup Calendar -->


<ice:outputLabel id="popupSelectedDateTxt" value="Selected Date: " />
<ice:outputText value="#{dateSelect.date2}"
effect="#{dateSelect.valueChangeEffect2}">
<f:convertDateTime pattern="MM/dd/yyyy"
timeZone="#{dateSelect.timeZone}" />
</ice:outputText>
<!-- Calendar Component -->


<ice:messages />



<ice:selectInputDate id="popupDatePttrn2" renderMonthAsDropdown="true"
renderYearAsDropdown="true"
value="#{dateSelect.date2}" rendered="true"
valueChangeListener="#{dateSelect.effect2ChangeListener}"

renderAsPopup="true">
<f:convertDateTime pattern="MM/dd/yyyy HH:mm"
timeZone="#{dateSelect.timeZone}"/>
</ice:selectInputDate>
</ice:form>

</body>
</html>
</f:view>
请各位看到本贴并指导如何解决问题的好友帮忙指教下.谢谢了

------解决方案--------------------
到 RichFaces 官方网站上下载 RichFaces 的包,应该有 richfaces-impl.jar, richfaces-ui.jar 两个 jar 包,放到 WEB-INF/lib 目录中。

在命名空间中添加 xmlns:rich 就可以了:

XML code
<f:view xmlns:h="http://java.sun.com/jsf/html"
        xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
     xmlns:rich="http://richfaces.org/rich">