Hello,

I've installed Eclipse galileo with myfaces core 1.2.8 and tomahawk12-1.1.9
.

I am able to get working the tomahawk tags that don't have javascript, but
not those who have them.

For example, if in a <t:inputDate> tag set "popupCalendar=false" the page is
working, if I set it to "true" it simply stops rendering the page, becoming
incomplete. No way to have an error message to debug.

Is it a bug in tomahawk or am I missing something?

Those are my files:

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>telemarketing</
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>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
  <context-param>
    <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
    <param-value>resources.application</param-value>
  </context-param>
  <context-param>
    <description>State saving method: 'client' or 'server' (=default). See
JSF Specification 2.5.2</description>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>
  <context-param>
    <description>
    This parameter tells MyFaces if javascript code should be allowed in
    the rendered HTML output.
    If javascript is allowed, command_link anchors will have javascript code
    that submits the corresponding form.
    If javascript is not allowed, the state saving info and nested
parameters
    will be added as url parameters.
    Default is 'true'</description>
    <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
    <param-value>true</param-value>
  </context-param>
  <context-param>
    <description>
    If true, rendered HTML code will be formatted, so that it is
'human-readable'
    i.e. additional line separators and whitespace will be written, that do
not
    influence the HTML code.
    Default is 'true'</description>
    <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>
    <description>
    If true, a javascript function will be rendered that is able to restore
the
    former vertical scroll on every request. Convenient feature if you have
pages
    with long lists and you do not want the browser page to always jump to
the top
    if you trigger a link or button action that stays on the same page.
    Default is 'false'
</description>
    <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
    <param-value>true</param-value>
  </context-param>
  <servlet>
    <servlet-name>faces</servlet-name>
    <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>faces</servlet-name>
    <url-pattern>*.faces</url-pattern>
  </servlet-mapping>
  <listener>

<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
  </listener>
  <context-param>
    <param-name>org.apache.myfaces.ERROR_HANDLER</param-name>
    <param-value>netwave.utils.ErrorHandler</param-value>
  </context-param>
  <filter>
      <filter-name>MyFacesExtensionsFilter</filter-name>

<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
          <param-name>uploadMaxFileSize</param-name>
          <param-value>20m</param-value>
      </init-param>
  </filter>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <servlet-name>Faces Servlet</servlet-name>
  </filter-mapping>
  <filter-mapping>
      <filter-name>MyFacesExtensionsFilter</filter-name>
      <url-pattern>/faces/*</url-pattern>
  </filter-mapping>
  <filter>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <filter-class>netwave.utils.CustomCharacterEncodingFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>CustomCharacterEncodingFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <error-page>

<exception-type>javax.faces.application.ViewExpiredException</exception-type>
    <location>/session_expired.jsp</location>
  </error-page>
</web-app>

login.jsp:

<%@ taglib prefix="f"  uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h"  uri="http://java.sun.com/jsf/html"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Login aziende</title>
</head>
<body>
<center><h1>Elenco aziende</h1></center>
<f:view>
<h:form id="login">
    <p>Entra</p>
    <p>Username: <h:inputText
value="#{BB_Aziende.userid}"></h:inputText></p>
    <p>Password: <h:inputSecret
value="#{BB_Aziende.password}"></h:inputSecret></p>
    <h:commandButton value="Login"
action="#{BB_Aziende.Login}"></h:commandButton>
</h:form>
</f:view>
</body>
</html>

query.jsp:

<%@ 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"%>

<f:view>
<f:loadBundle basename="netwave.GeneralMessages" var="GM"/>
<t:document>
<t:documentHead>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Benvenuto</title>
<style type="text/css">
    <!--
    .highlight { background-color: #A8D1E8; color=blue;}
    -->
</style>
</t:documentHead>
<t:documentBody>
<h:form id="queryaziende">
    <p>Benvenuto <h:outputLabel
value="#{BB_Aziende.utente.nome}"></h:outputLabel>&nbsp;<h:outputLabel
value="#{BB_Aziende.utente.cognome}"></h:outputLabel></p>
    <p>Provincia: <h:selectOneMenu value="#{BB_Aziende.azienda.provincia}">
        <f:selectItems value="#{BB_Aziende.province}"/>
    </h:selectOneMenu>
    Stato: <h:selectOneMenu value="#{BB_Aziende.azienda.noninteressato}">
        <f:selectItems value="#{BB_Aziende.stati}"/>
    </h:selectOneMenu></p>
    <t:inputDate id="datainiz" value="#{BB_Aziende.datainiz}"
popupCalendar="true" required="true">
        <f:validator validatorId="checkvaliddate"/>
    </t:inputDate>
    <t:commandButton value="Query"
action="#{BB_Aziende.Queryaziende}"></t:commandButton>
</h:form>
</t:documentBody>
</t:document>
</f:view>

Thank you in advance, best regards

Fabio Ferrari

P. S. Non รจ possibile che qualsiasi cosa scrivo venga rigettata per spam. Ma
lo fate apposta?

Reply via email to