On Mon, Oct 6, 2008 at 1:28 PM, Marco Vieira <[EMAIL PROTECTED]>wrote:
> I've found out that Trinidad is the problem. I cloned the project but > removed Trinidad and the schedule worked like a charm. But I need Trinidad > on my project. I've read somewhere that the Trinidad Filter must come before > the Extensions Filter. I check my web.xml and I meet this requirement: > > <?xml version="1.0" encoding="UTF-8"?> > <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" > http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> > <!-- <listener> > > <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> > </listener> --> > > <context-param> > <param-name>javax.faces.STATE_SAVING_METHOD</param-name> > <param-value>client</param-value> > <!--param-value>server</param-value--> > </context-param> > > <context-param> > <param-name>javax.faces.DEFAULT_SUFFIX</param-name> > <param-value>.jspx</param-value> > </context-param> > > <context-param> > > <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name> > <param-value>false</param-value> > </context-param> > > <context-param> > > <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name> > <param-value>false</param-value> > </context-param> > > <context-param> > > <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name> > <param-value>session</param-value> > </context-param> > > <context-param> > <param-name>org.apache.myfaces.trinidad.resource.DEBUG</param-name> > <param-value>false</param-value> > </context-param> > <context-param> > > <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name> > <param-value>true</param-value> > </context-param> > > > > > > > > > <servlet> > <servlet-name>Faces Servlet</servlet-name> > > <servlet-class>org.apache.myfaces.webapp.MyFacesServlet</servlet-class> > <load-on-startup>1</load-on-startup> > </servlet> > <servlet> > <servlet-name>resources</servlet-name> > > <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class> > </servlet> > > <filter> > <filter-name>trinidad</filter-name> > > <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class> > </filter> > > <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> > <description>Set the size limit for uploaded files. > Format: 10 - 10 bytes > 10k - 10 KB > 10m - 10 MB > 1g - 1 GB > </description> > </init-param> > </filter> > > > <filter-mapping> > <filter-name>trinidad</filter-name> > <servlet-name>Faces Servlet</servlet-name> > </filter-mapping> > > <!-- 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</servlet-name> > </filter-mapping> > > <!-- extension mapping for serving page-independent resources (javascript, > stylesheets, images, etc.) --> > <filter-mapping> > <filter-name>MyFacesExtensionsFilter</filter-name> > <url-pattern>/faces/myFacesExtensionResource/*</url-pattern> > </filter-mapping> > > > > <servlet-mapping> > <servlet-name>Faces Servlet</servlet-name> > <url-pattern>/faces/*</url-pattern> > </servlet-mapping> > <servlet-mapping> > <servlet-name>resources</servlet-name> > <url-pattern>/adf/*</url-pattern> > </servlet-mapping> > > <welcome-file-list> > <welcome-file>index.jspx</welcome-file> > <welcome-file>faces/welcomeJSF.jsp</welcome-file> > </welcome-file-list> > </web-app> > > Personally, I'm at a dead end. Does anybody recommend anything to try and > get the Tomahawk schedule to behave with Trinidad? > Really the problem is that trinidad hacks some "parts" in its own way. For example, trinidad override the originals h:commandButton and h:commandLink, because it uses its own javascript api to submit a form. Some tomahawk code has hacks to make this compatible. Maybe if you change the use of t:inputCalendar with some trinidad component and just use the t:schedule component... The info you provide is not enough to reproduce the missing behavior, making difficult to other developers to take a look at it regards Leonardo Uribe > > > On Mon, Oct 6, 2008 at 6:38 PM, Marco Vieira <[EMAIL PROTECTED]>wrote: > >> I've been going through some DEBUG information in the logs and I see this >> warning: >> >> WARN http-8085-7 org.apache.myfaces.custom.calendar.HtmlCalendarRenderer - >> There should always be a submitted value for an input if it is rendered, its >> form is submitted, and it was not originally rendered disabled or >> read-only. You cannot submit a form after disabling an input element via >> javascript. Consider setting read-only to true instead or resetting the >> disabled value back to false prior to form submission. Component : >> {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: >> /testSchedJSP.jsp][Class: javax.faces.component.html.HtmlForm,Id: >> j_id_jsp_1635405084_1][Class: org.apache.myfaces.custom.div.Div,Id: >> j_id_jsp_1635405084_4][Class: javax.faces.component.html.HtmlPanelGrid,Id: >> j_id_jsp_1635405084_5][Class: >> org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: scheduleNavigator]} >> >> Any ideas on this? Could this be the problem? >> >> Thanks in advance, >> >> Marco >> >> >> On Mon, Oct 6, 2008 at 4:55 PM, Marco Vieira <[EMAIL PROTECTED]>wrote: >> >>> Never mind, I had the trinidad renderkit commented out. But I still have >>> the problem of the schedule not selecting the entry. I feel Trinidad is >>> interfering in some way. Has anyone else successfully got the Tomahawk >>> Schedule to work with Trinidad? >>> >>> >>> On Mon, Oct 6, 2008 at 4:33 PM, Marco Vieira <[EMAIL PROTECTED]>wrote: >>> >>>> I've implemented the Tomahawk Schedule examples. Here's the page I'm >>>> testing: >>>> >>>> <%-- >>>> Document : testSchedJSP >>>> Created on : 6/Out/2008, 12:36:25 >>>> Author : Marco >>>> --%> >>>> >>>> <[EMAIL PROTECTED] contentType="text/html"%> >>>> <[EMAIL PROTECTED] pageEncoding="UTF-8"%> >>>> >>>> <[EMAIL PROTECTED] prefix="f" uri="http://java.sun.com/jsf/core"%> >>>> <[EMAIL PROTECTED] prefix="h" uri="http://java.sun.com/jsf/html"%> >>>> <[EMAIL PROTECTED] 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=UTF-8"> >>>> <title>JSP Page</title> >>>> </head> >>>> <body> >>>> <f:view> >>>> <h:form> >>>> <!-- The schedule itself --> >>>> <t:div style="position: absolute; left: 220px; top: 5px; right: >>>> 5px;"> >>>> <t:schedule value="#{scheduleHandler1.model}" id="schedule1" >>>> rendered="true" visibleEndHour="18" visibleStartHour="8" >>>> workingEndHour="17" workingStartHour="9" >>>> readonly="false" >>>> theme="evolution" tooltip="true"/> >>>> </t:div> >>>> <!-- The column on the left, containing the calendar and other >>>> controls --> >>>> <t:div style="position: absolute; left: 5px; top: 5px; width: >>>> 210px; overflow: auto"> >>>> <h:panelGrid columns="1"> >>>> <t:inputCalendar id="scheduleNavigator" >>>> value="#{scheduleHandler1.model.selectedDate}" /> >>>> <h:commandButton >>>> >>>> actionListener="#{scheduleHandler1.addSampleEntries}" >>>> value="add sample entries" /> >>>> <h:commandButton >>>> >>>> actionListener="#{scheduleHandler1.addSampleHoliday}" >>>> value="add sample holiday" /> >>>> </h:panelGrid> >>>> </t:div> >>>> </h:form> >>>> >>>> </f:view> >>>> </body> >>>> </html> >>>> >>>> The problem continued, but as I check my log file I see the following: >>>> >>>> ERROR http-8085-6 >>>> org.apache.myfaces.renderkit.html.HtmlResponseStateManager - No component >>>> states to be saved in client response! >>>> WARN http-8085-3 >>>> org.apache.myfaces.custom.calendar.HtmlCalendarRenderer - There should >>>> always be a submitted value for an input if it is rendered, its form is >>>> submitted, and it was not originally rendered disabled or read-only. You >>>> cannot submit a form after disabling an input element via javascript. >>>> Consider setting read-only to true instead or resetting the disabled value >>>> back to false prior to form submission. Component : {Component-Path : >>>> [Class: javax.faces.component.UIViewRoot,ViewId: /testSchedJSP.jsp][Class: >>>> javax.faces.component.html.HtmlForm,Id: j_id_jsp_1635405084_1][Class: >>>> org.apache.myfaces.custom.div.Div,Id: j_id_jsp_1635405084_4][Class: >>>> javax.faces.component.html.HtmlPanelGrid,Id: j_id_jsp_1635405084_5][Class: >>>> org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: >>>> scheduleNavigator]} >>>> >>>> Could this be a bug? Should I try a <t:saveState> tag to explicitly save >>>> the schedule's state? >>>> >>>> Any ideas? >>>> >>>> Thanks >>>> >>>> >>>> On Mon, Oct 6, 2008 at 3:37 PM, Marco Vieira <[EMAIL PROTECTED]>wrote: >>>> >>>>> Hi there, >>>>> >>>>> Does anyone have any ideas. Could it be a jar compatibility problem? >>>>> Has anyone experienced problems with the Tomahawk Schedule and Trinidad? >>>>> >>>>> Thanks, >>>>> >>>>> Marco >>>>> >>>>> >>>>> On Sun, Oct 5, 2008 at 2:13 PM, Marco Vieira <[EMAIL PROTECTED]>wrote: >>>>> >>>>>> Hello everyone, >>>>>> >>>>>> I'm working with the Tomahawk Schedule component and Trinidad. >>>>>> However, I'm having some difficulties. My original page uses mostly >>>>>> Trinidad >>>>>> components with the exception of the Schedule component. Every time I >>>>>> select >>>>>> an entry no graphical indication of the entry being selected is given >>>>>> and in >>>>>> the backing java classes when I try to access the ScheduleModel's >>>>>> selected >>>>>> entry I get null. Here's my page source: >>>>>> >>>>>> <?xml version="1.0" encoding="iso-8859-1"?> >>>>>> >>>>>> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >>>>>> xmlns:f="http://java.sun.com/jsf/core" xmlns:h=" >>>>>> http://java.sun.com/jsf/html" >>>>>> xmlns:t="http://myfaces.apache.org/tomahawk" >>>>>> xmlns:trh="http://myfaces.apache.org/trinidad/html" >>>>>> xmlns:tr="http://myfaces.apache.org/trinidad"> >>>>>> <jsp:directive.page contentType="text/html;charset=utf-8"/> >>>>>> <f:view> >>>>>> <tr:document title="Tratamentos"> >>>>>> <tr:form> >>>>>> <tr:messages/> >>>>>> <tr:panelGroupLayout layout="horizontal" inlineStyle = >>>>>> "width: 100%;"> >>>>>> <tr:panelBox text="Agenda de Tomas" inlineStyle = >>>>>> "width: 100%;"> >>>>>> <t:schedule >>>>>> value="#{treatmentUIScheduleHandler.treatSchedule}" id="treatUISchedule" >>>>>> rendered="true" visibleEndHour="23" >>>>>> visibleStartHour="0" >>>>>> workingEndHour="18" workingStartHour="8" >>>>>> theme="default" tooltip="true" >>>>>> submitOnClick="true" >>>>>> readonly="false" /> >>>>>> </tr:panelBox> >>>>>> <tr:panelGroupLayout layout="vertical"> >>>>>> <tr:panelBox text="Acções" inlineStyle = "width: >>>>>> 65%;"> >>>>>> <tr:panelGroupLayout layout="horizontal"> >>>>>> <tr:commandButton id="tbuttonViewDetails" >>>>>> partialSubmit="true" text="Ver" >>>>>> actionListener="#{treatmentUIScheduleHandler.retrieveDetailsForSelTreat}" >>>>>> /> >>>>>> <tr:commandButton id="tbuttonAddNewTreat" >>>>>> text="Adicionar" >>>>>> actionListener="#{treatmentUIScheduleHandler.addSampleEntries}"/> >>>>>> <tr:commandButton id="tbuttonDelSelTreat" >>>>>> text="Apagar" /> >>>>>> <tr:commandButton id="tbuttonModSelTreat" >>>>>> text="Editar" /> >>>>>> </tr:panelGroupLayout> >>>>>> </tr:panelBox> >>>>>> <tr:panelBox text="Detalhes" inlineStyle = "width: >>>>>> 65%;"> >>>>>> <tr:inputText id="tdetailsInputTextRO" >>>>>> readOnly="true" partialTriggers="tbuttonViewDetails" rows="33" >>>>>> wrap="soft" >>>>>> value="#{treatmentUIScheduleHandler.treatUIDetails}" /> >>>>>> </tr:panelBox> >>>>>> </tr:panelGroupLayout> >>>>>> </tr:panelGroupLayout> >>>>>> </tr:form> >>>>>> </tr:document> >>>>>> </f:view> >>>>>> </jsp:root> >>>>>> >>>>>> With regards to the backing beans, 'treatSchedule' is a class I made >>>>>> that extends Tomahawk's SimpleScheduleModel, and uses the class >>>>>> TreatmentBean which extends Tomahawk's DefaultScheduleEntry. The >>>>>> schedule is >>>>>> handeled by the class TreatmentUIScheduleHandler that initializes and >>>>>> populates the schedule with data from a local Oracle Database. >>>>>> >>>>>> Feeling the problem could be related to using extended classes and not >>>>>> the originals I tried something different. I made another page (see >>>>>> below), >>>>>> using as many default MyFaces componentes as possible a using source from >>>>>> the Tomahawk example source ( >>>>>> http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ >>>>>> ). >>>>>> >>>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>>> <!-- >>>>>> Document : testsched >>>>>> Created on : 4/Out/2008, 23:10:25 >>>>>> Author : Marco >>>>>> --> >>>>>> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0" >>>>>> xmlns:f="http://java.sun.com/jsf/core" xmlns:h=" >>>>>> http://java.sun.com/jsf/html" >>>>>> xmlns:t="http://myfaces.apache.org/tomahawk" >>>>>> xmlns:trh="http://myfaces.apache.org/trinidad/html" >>>>>> xmlns:tr="http://myfaces.apache.org/trinidad"> >>>>>> >>>>>> <jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/> >>>>>> >>>>>> <f:view> >>>>>> <tr:document title="Tratamentos"> >>>>>> <h:form> >>>>>> <h:outputText >>>>>> value="#{treatmentUIScheduleHandler.mouseActionText}"></h:outputText> >>>>>> <t:schedule >>>>>> value="#{treatmentUIScheduleHandler.testSched}" id="treatUISchedule" >>>>>> rendered="true" visibleEndHour="23" >>>>>> visibleStartHour="0" >>>>>> workingEndHour="18" workingStartHour="8" >>>>>> theme="default" tooltip="true" >>>>>> submitOnClick="true" >>>>>> >>>>>> mouseListener="#{treatmentUIScheduleHandler.scheduleClicked}" >>>>>> >>>>>> action="#{treatmentUIScheduleHandler.scheduleAction}" >>>>>> >>>>>> binding="#{treatmentUIScheduleHandler.htmlSchedule}" >>>>>> readonly="false" /> >>>>>> <h:commandButton id="tbuttonAddNewTreat" value="Adicionar" >>>>>> actionListener="#{treatmentUIScheduleHandler.addSampleEntries}"/> >>>>>> </h:form> >>>>>> </tr:document> >>>>>> </f:view> >>>>>> >>>>>> </jsp:root> >>>>>> >>>>>> >>>>>> Yet the problem persists, now I feel it could have to do with the fact >>>>>> of me using Trinidad, particularily the <tr:document> tag. My Jars are >>>>>> the >>>>>> following: >>>>>> >>>>>> MyFaces 1.2.3, Tomahawk 1.1.7, Trinidad 1.2.8 >>>>>> >>>>>> Has anyone else come across this problem or might have insight into a >>>>>> possible solution? >>>>>> >>>>>> Thanks in advance, >>>>>> >>>>>> Marco >>>>>> >>>>>> >>>>> >>>> >>> >> >