0

所以我最近开始将我们的在线应用升级到 Myfaces 2.1。我现在遇到了一个问题,由于某种原因我无法解决。当使用 tomahawk 中的 t:inputCalendar 时,弹出窗口不会启动。各种在线搜索只产生了如何配置它(我已经完成了)。

我确定我只是缺少一些小东西,但欢迎任何输入:

这是 web.xml 配置:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    id="WebApp_ID" version="2.5">

    <display-name>spore</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>

    <context-param>
        <param-name>facelets.DEVELOPMENT</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
        <param-value>.jsp</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <context-param>
        <param-name>
            org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
        </param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>
            org.apache.myfaces.COMPRESS_STATE_IN_SESSION
        </param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>server</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name>
        <param-value>20</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.RESOURCE_VIRTUAL_PATH</param-name>
        <param-value>/faces/myFacesExtensionResource</param-value>
    </context-param>
    <context-param>
        <param-name>
            org.apache.myfaces.READONLY_AS_DISABLED_FOR_SELECTS
        </param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
        <param-value>org.apache.myfaces.renderkit.html.util.DefaultAddResource</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.PARTIAL_STATE_SAVING_METHOD</param-name>
        <param-value>false</param-value>
    </context-param>

    <filter>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <description>
                Set the size limit for uploaded files. Format: 10 - 10
                bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadMaxFileSize</param-name>
            <param-value>100m</param-value>
        </init-param>
        <init-param>
            <description>
                Set the threshold size - files below this limit are
                stored in memory, files above this limit are stored on
                disk.

                Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
            </description>
            <param-name>uploadThresholdSize</param-name>
            <param-value>20m</param-value>
        </init-param>
    </filter>

    <filter>
        <display-name>SessionFilter</display-name>
        <filter-name>SessionFilter</filter-name>
        <filter-class>za.co.spore.filter.SessionFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>SessionFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>*.jsf</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
    </filter-mapping>

    <!-- Listener, to allow Jetty serving MyFaces apps -->
    <listener>
        <listener-class>
            org.apache.myfaces.webapp.StartupServletContextListener
        </listener-class>
    </listener>

    <!-- Faces Servlet -->
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <!-- Faces Servlet Mapping -->
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

    <error-page>
        <error-code>500</error-code>
        <location>/error.html</location>
    </error-page>
    <error-page>
        <error-code>505</error-code>
        <location>/error.html</location>
    </error-page>
    <error-page>
        <error-code>404</error-code>
        <location>/missing.html</location>
    </error-page>
</web-app>

这是发生问题的页面来源:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="t"  uri="http://myfaces.apache.org/tomahawk" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        <meta name="description" content="Webwerf vir die spore stapklub. Informasie oor stap. Grappige stories. Informasie oor beplande roetes">
        <meta name="keywords" content="stap,staptoer,voetslaan,voet slaan,stapklub,stap klub,loop,roete,roetes,wandel,kamp,buitelug,buite lug">
        <meta name="verify-v1" content="T2vo9Q/TCQLgn6bsmaHrFoO39z1ehcG/0GQ7CarnexE=" /> 
        <link href="/css/spore.css" rel="stylesheet" type="text/css" media="all" />
    </head>
    <body>
        <jsp:include page="../header.html"/>
            <f:view>
                <h:form>                
                <td  width="15%" valign="top">
                    <div class="menu_header">Kieslys</div>
                                    <h:commandLink action="#{tourAdminBean.doStartFindTours}" value="Vind toer" styleClass="menu"></h:commandLink>
                                    <h:commandLink action="back" value="Terug" styleClass="menu"></h:commandLink>
                    <div class="menu_footer"></div>
                </td>
                <td  style="padding-left: 10px;">
                    <div>
                        <h:messages  style="color: red;font-weight: bold"/>
                        <div class="section_header">Skep 'n toer</div>
                        <div class="content">
                            <div class="content_text">
                                <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
                                    <tr>    
                                        <td width="53x">&#160;</td>
                                        <td>
                                            <table border="0" cellpadding="0" cellspacing="0"  class="menutable">   
                                                <tr><td>
                                                </td></tr>
                                            </table>
                                        </td>
                                        <td>
                                            <h:messages  style="color: red;font-weight: bold"/>
                                            <center>
                                                <table>
                                                    <tr>
                                                        <td class="headerth" align="left">Roete</td>
                                                        <td>
                                                            <h:selectOneMenu value="#{tourAdminBean.tour.route.name}">
                                                                <f:selectItems value="#{tourAdminBean.routes}"/>
                                                            </h:selectOneMenu>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Vertrek datum</td>
                                                        <td>
                                                            <t:inputCalendar id="from" popupButtonStyleClass="standard_bold"  value="#{tourAdminBean.tourDepartureDate}" renderAsPopup="true" popupTodayString="#{example_messages['popup_today_string']}" popupWeekString="#{example_messages['popup_week_string']}" helpText="MM/DD/YYYY"/>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Terug datum</td>
                                                        <td>                                                            
                                                            <t:inputCalendar id="to" popupButtonStyleClass="standard_bold"  value="#{tourAdminBean.tourReturnDate}" renderAsPopup="true" popupTodayString="#{example_messages['popup_today_string']}" popupWeekString="#{example_messages['popup_week_string']}" helpText="MM/DD/YYYY"/>
                                                        </td>           
                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Toerleier</td>
                                                        <td>
                                                            <h:selectOneMenu value="#{tourAdminBean.tour.tourleader.hiker_id}">
                                                                <f:selectItems value="#{tourAdminBean.hikers}"/>
                                                            </h:selectOneMenu>
                                                        </td>

                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Vertrek address</td><td><h:inputText value="#{tourAdminBean.tour.departurePoint}"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Groep groote</td><td><h:inputText value="#{tourAdminBean.tour.groupSize}"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Koste</td><td><h:inputText value="#{tourAdminBean.tour.cost}"/></td>
                                                    </tr>
                                                    <tr>
                                                        <td class="headerth" align="left">Notas</td><td><h:inputTextarea value="#{tourAdminBean.tour.notes}"/></td> 
                                                    </tr>
                                                </table>
                                                <h:commandButton value="Opdateer" action="#{tourAdminBean.doCreateTour}"/>
                                                <h:commandButton value="Terug" action="back"/>      
                                            </center>   
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </div>
                        <div class="section_footer"></div>
                    </div>
                </h:form>
            </f:view>
        <jsp:include page="../footer.html"/>                    
    </body>
</html>
4

0 回答 0