简体   繁体   English

JSF 1.1和MyFaces战斧1.1.9

[英]JSF 1.1 and MyFaces Tomahawk 1.1.9

I am trying to use the calendar component from Myfaces Tomahawk. 我正在尝试使用Myfaces Tomahawk的日历组件。 I am running JSF 1.1 with Tomahawk 1.1.9 and Websphere 6.1. 我正在使用Tomahawk 1.1.9和Websphere 6.1运行JSF 1.1。 Looks like JSF1.1 and Tomahawk 1.1.9 are not compatible as the following code does not work - 看起来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" />

When access this jsp page thru IE 7, it throws some javascript problem like popupcalender not defined. 当通过IE 7访问此jsp页面时,它会引发一些JavaScript问题,例如未定义popupcalender。 I found that java scripts are added in the rendered HTML page, but no idea why this problem ? 我发现在呈现的HTML页面中添加了Java脚本,但不知道为什么会出现此问题?

Any idea which version of Tomahawk should I use with JSF 1.1 ? 知道我应该在JSF 1.1中使用哪个版本的Tomahawk?

EDIT: 编辑:

I already have Extension Filter configured in the web.xml file. 我已经在web.xml文件中配置了扩展筛选器。 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>   

I found the solution of this problem today. 我今天找到了解决这个问题的方法。 This is something to do with websphere 6.1. 这与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 . 如上面的链接所述,我通过遵循以下链接在Websphere容器中添加了自定义属性com.ibm.ws.webcontainer.invokefilterscompatibility = true。

Tomahawk is compatible with both JSF 1.1 and 1.2 (not with JSF 2.0 yet). Tomahawk与JSF 1.1和1.2兼容(尚不与JSF 2.0兼容)。 The problem you're describing is recognizeable as not having the ExtensionsFilter properly configured in web.xml . 您正在描述的问题可以识别为没有在web.xml正确配置ExtensionsFilter Although the javadocs states that this is not needed anymore since Tomahawk 1.1.7, I would give it a try. 尽管javadocs声明自“战斧” 1.1.7起不再需要此功能,但我还是尝试一下。 Just define the ExtensionFilter in web.xml as per this document . 只需按照本文档web.xml定义ExtensionFilter It's namely responsible for injecting the necessary scripts/styles in the response. 即负责在响应中注入必要的脚本/样式。

<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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM