JSF 1.1 和 MyFaces Tomahawk 1.1.9
我正在尝试使用 Myfaces Tomahawk 中的日历组件。我正在使用 Tomahawk 1.1.9 和 Websphere 6.1 运行 JSF 1.1。 看起来 JSF1.1 和 Tomahawk 1.1.9 不兼容,因为以下代码不起作用 -
<t:inputCalendar id="secondOne" monthYearRowClass="yearMonthHeader"
weekRowClass="weekHeader" popupButtonStyleClass="standard_bold"
currentDayCellClass="currentDayCell" value="#{dobBean.dateOfBirth}"
renderAsPopup="true" popupTodayString="Shamik"
popupDateFormat="MM/dd/yyyy" popupWeekString="Wk"
helpText="MM/DD/YYYY" forceId="true" />
当通过 IE 7 访问此 jsp 页面时,它会抛出一些 javascript 问题,例如 popupcalender 未定义。我发现在渲染的 HTML 页面中添加了 java 脚本,但不知道为什么会出现这个问题?
知道我应该将哪个版本的 Tomahawk 与 JSF 1.1 一起使用吗?
编辑:
我已经在 web.xml 文件中配置了扩展过滤器。像这样的东西 -
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
I am trying to use the calendar component from Myfaces Tomahawk. I am running JSF 1.1 with Tomahawk 1.1.9 and Websphere 6.1.
Looks like JSF1.1 and Tomahawk 1.1.9 are not compatible as the following code does not work -
<t:inputCalendar id="secondOne" monthYearRowClass="yearMonthHeader"
weekRowClass="weekHeader" popupButtonStyleClass="standard_bold"
currentDayCellClass="currentDayCell" value="#{dobBean.dateOfBirth}"
renderAsPopup="true" popupTodayString="Shamik"
popupDateFormat="MM/dd/yyyy" popupWeekString="Wk"
helpText="MM/DD/YYYY" forceId="true" />
When access this jsp page thru IE 7, it throws some javascript problem like popupcalender not defined. I found that java scripts are added in the rendered HTML page, but no idea why this problem ?
Any idea which version of Tomahawk should I use with JSF 1.1 ?
EDIT:
I already have Extension Filter configured in the web.xml file. Something like this -
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我今天找到了这个问题的解决方案。这与 websphere 6.1 有关。我发现以下 链接,人们遇到了像我这样的类似问题。
正如上面的链接中提到的,我按照此 链接。
I found the solution of this problem today. This is something to do with websphere 6.1. I found the following link where people faced similar problem like I am facting.
As mentioned in the above link, I added a custom propery com.ibm.ws.webcontainer.invokefilterscompatibility=true in the websphere containter by following this link.
Tomahawk 与 JSF 1.1 和 1.2 兼容(尚不兼容 JSF 2.0)。您描述的问题可以识别为没有
ExtensionsFilter
在web.xml
中正确配置。尽管 javadocs 声明自 Tomahawk 1.1.7 以来不再需要此操作,但我还是会尝试一下。只需按照 本文档。它负责在响应中注入必要的脚本/样式。Tomahawk is compatible with both JSF 1.1 and 1.2 (not with JSF 2.0 yet). The problem you're describing is recognizeable as not having the
ExtensionsFilter
properly configured inweb.xml
. Although the javadocs states that this is not needed anymore since Tomahawk 1.1.7, I would give it a try. Just define theExtensionFilter
inweb.xml
as per this document. It's namely responsible for injecting the necessary scripts/styles in the response.