简体   繁体   中英

JSF 1.1 and MyFaces Tomahawk 1.1.9

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>   

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 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 in web.xml . Although the javadocs states that this is not needed anymore since Tomahawk 1.1.7, I would give it a try. Just define the ExtensionFilter in web.xml as per this document . 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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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