edit.xhtml


<html xmlns="http://www.w3.org/1999/xhtml";
    xmlns:f="http://java.sun.com/jsf/core";
    xmlns:ui="http://java.sun.com/jsf/facelets";
    xmlns:h="http://java.sun.com/jsf/html";
    xmlns:t="http://myfaces.apache.org/tomahawk";
    xmlns:s="http://myfaces.apache.org/sandbox";
    xmlns:a4j="https://ajax4jsf.dev.java.net/ajax";
    xmlns:rich="http://richfaces.ajax4jsf.org/rich";
    xmlns:i="http://www.meteo.be/Intranet-Jsf";>
<ui:composition template="layout.xhtml">
    <ui:param name="title" value="Edit Employee" />
    <ui:define name="content">
        <h:form acceptcharset="UTF-8" id="employeeForm"
            rendered="#{hrSession.employee != null}"
            enctype="multipart/form-data">
              .....
              <t:inputCalendar id="birthdate"
                           value="#{hrSession.employee.birthDate}"
popupTodayString=""
                           renderAsPopup="true"
renderPopupButtonAsImage="true"
                           popupDateFormat="dd MMMM yyyy">
                   <f:convertDateTime pattern="dd MMMM yyyy"
                           timeZone="Europe/Paris" />
              </t:inputCalendar> <h:message styleClass="warning"
for="birthdate"/>
              .........
        </h:form>
    </ui:define>
</ui:composition>

layout.xhtml:



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

<f:view xmlns="http://www.w3.org/1999/xhtml";
    xmlns:h="http://java.sun.com/jsf/html";
    xmlns:f="http://java.sun.com/jsf/core";
    xmlns:c="http://java.sun.com/jstl/core";
    xmlns:t="http://myfaces.apache.org/tomahawk";
    xmlns:ui="http://java.sun.com/jsf/facelets";
    locale="#{strutsSession.locale}">
    <t:document>
        <t:documentHead>
            <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
            <link rel="stylesheet" type="text/css"
               
href="#{facesContext.externalContext.requestContextPath}/css/workflow.css"
/>
            .....
        </t:documentHead>
        <t:documentBody>
            <div><ui:insert  name="content" /></div>
        </t:documentBody>
    </t:document>
</f:view>



web.xml:



    ....
    <context-param>
        <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
        <param-value>
            org.apache.myfaces.component.html.util.StreamingAddResource
        </param-value>
    </context-param>
    ....
    <!-- Set up the tomahawk extensions filter -->
    <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>maxFileSize</param-name>
            <param-value>50m</param-value>
        </init-param>
    </filter>
    <!-- extension mapping for adding <script/>, <link/>, and other
resource tags to JSF-pages  -->
    <filter-mapping>
        <filter-name>MyFacesExtensionsFilter</filter-name>
        <!-- servlet-name must match the name of your
javax.faces.webapp.FacesServlet entry -->
        <servlet-name>faces</servlet-name>
    </filter-mapping>
    ....


En l'instant précis du 18/12/07 13:58, Carlos Adolfo Ortiz Quiros
s'exprimait en ces termes:
> Well, then something must be missing, or something was not correctly setup. 
> Do you have sample code you can post here?
> Have you flushed all of your browser contents so it gets fresh resources?
> Perhaps I can prepare sample code if it also helps!
>
> -----Mensaje original-----
> De: david delbecq [mailto:[EMAIL PROTECTED] 
> Enviado el: Monday, December 17, 2007 5:43 PM
> Para: MyFaces Discussion
> Asunto: Re: Is this a BUG in Tomahawk or am I using mistakenly?
>
> Using streamin addressouces with calendar and popup and image without 
> troubles here.
> Ensure your t:document is inside a f:view. Note that we are using 
> facelets, maybe this change behaviour somehow, but it shouldn't
> Carlos Adolfo Ortiz Quiros a écrit :
>   
>> I tried that too.  It keeps bugging me.
>> It is simple if you make the test page. 
>> org.apache.myfaces.component.html.util.StreamingAddResource and a JSF/JSP 
>> page with only the inputCalendar with the properties I give here, and you 
>> should get the same error, shouldn't it?
>>
>> -----Mensaje original-----
>> De: david delbecq [mailto:[EMAIL PROTECTED] 
>> Enviado el: Monday, December 17, 2007 5:06 PM
>> Para: MyFaces Discussion
>> Asunto: Re: Is this a BUG in Tomahawk or am I using mistakenly?
>>
>> StreamingAddRessource requires you to use t:document, t:documentBody and 
>> t:documentHead tags to indicagte where document start, where body start 
>> and where head start.
>>
>> Carlos Adolfo Ortiz Quiros a écrit :
>>   
>>     
>>> Hi
>>>
>>>  
>>> I have this
>>>
>>> <context-param>
>>>     <param-name>org.apache.myfaces.ADD_RESOURCE_CLASS</param-name>
>>>     
>>> <param-value>org.apache.myfaces.component.html.util.StreamingAddResource</param-value>
>>>   </context-param>
>>>
>>>  
>>>
>>> I need to use this because I need special characters in my HTML 
>>> rendered code such as áéñ, etc and shown in an alert in the javascript 
>>> code included in a page (The people would require this if using 
>>> non-latin characters).  This works fine, but when I use it with the 
>>> <t:inputCalendar> component of the Tomahawk distribution, with the 
>>> [renderAsPopup="true"] and [renderPopupButtonAsImage="true"] 
>>> properties, it does not work as the resources are not found for some 
>>> reason.
>>>
>>>  
>>>
>>> This is a bug, please check it out, I am an user for the framework, 
>>> not a committer or developer of it.
>>>
>>>  
>>>
>>>  
>>>
>>> **CARLOS ADOLFO ORTIZ Q**
>>>
>>> Ingeniero de Desarrollo
>>>
>>> **TRÉBOL Software S.A.******
>>>
>>> Tel : (574)3110663 Fax : (574)3113474
>>>
>>> Dirección Cll 16 # 28-195
>>>
>>> Medellín - Colombia
>>>
>>> http://www.trebol.com.co <http://www.trebol.com.co/>
>>>
>>>  
>>>
>>> La información de este mensaje y sus anexos son propiedad exclusiva
>>> de Axede S.A. Es  únicamente para el uso del destinatario
>>> intencional  y  pueden  contener  información de carácter privado o
>>> confidencial. Le  informamos que cualquier revisión, retransmisión,
>>> divulgación,  copia  o  uso  indebido  del mismo está estrictamente
>>> prohibida  y será sancionada legalmente.
>>>
>>>
>>>
>>> Information contained in this message and every attachment is property of 
>>> Axede S.A. Only the destiny user is able to make use of the data here 
>>> contained, which is private and/or confidential. Any revision, 
>>> broadcasting, spreading, copy or illegal use of this information is 
>>> strictly prohibited and will be sanctioned by legal means.
>>>     
>>>       
>>
>> La información de este mensaje y sus anexos son propiedad exclusiva
>> de Axede S.A. Es  únicamente para el uso del destinatario
>> intencional  y  pueden  contener  información de carácter privado o
>> confidencial. Le  informamos que cualquier revisión, retransmisión,
>> divulgación,  copia  o  uso  indebido  del mismo está estrictamente
>> prohibida  y será sancionada legalmente.
>>
>>
>>
>> Information contained in this message and every attachment is property of 
>> Axede S.A. Only the destiny user is able to make use of the data here 
>> contained, which is private and/or confidential. Any revision, broadcasting, 
>> spreading, copy or illegal use of this information is strictly prohibited 
>> and will be sanctioned by legal means.
>>   
>>     
>
>
>
> La información de este mensaje y sus anexos son propiedad exclusiva
> de Axede S.A. Es  únicamente para el uso del destinatario
> intencional  y  pueden  contener  información de carácter privado o
> confidencial. Le  informamos que cualquier revisión, retransmisión,
> divulgación,  copia  o  uso  indebido  del mismo está estrictamente
> prohibida  y será sancionada legalmente.
>
>
>
> Information contained in this message and every attachment is property of 
> Axede S.A. Only the destiny user is able to make use of the data here 
> contained, which is private and/or confidential. Any revision, broadcasting, 
> spreading, copy or illegal use of this information is strictly prohibited and 
> will be sanctioned by legal means.
>   


-- 
http://www.devlog.be (a belgian developer's logs)


Reply via email to