myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fduo <fabio....@swissonline.ch>
Subject Re: Seam and Tomahawk Scheduler
Date Thu, 12 Apr 2007 10:33:12 GMT

It was exactly this. I was not thinking about that, stupid me.
Thank you very much.

Best regards
Fabio


Stefan Frank wrote:
> 
> This sounds like a classloader-problem: You should maybe check where
> you deploy your tomahawk-jars - maybe you have it in two different
> locations (and thereby classloaders)?
> 
> 
> 2007/4/5, Fabio Duo <fabio.duo@swissonline.ch>:
>> Hello,
>>
>> I am trying to use the Tomahawk Scheduler Component together with seam.
>> But
>> I get some very strange behavior. I've tried the Binding Method and only
>> filling the Model. I always used the example Paged and Classes.
>>
>> With the Binding Method I get a Error Message:
>> java.lang.ClassCastException:
>> org.apache.myfaces.custom.schedule.HtmlSchedule cannot be cast to org.
>> apache.myfaces.custom.schedule.HtmlSchedule
>>
>> It doesn't makes a lot of sense in my opinion.
>>
>> If I give the Model to the Component I don't receive a Error, but I only
>> see
>> a Day view. Shows no entries and it's also impossible to change the view
>> or
>> update the model.
>>
>>
>> Init:
>> .....
>> .....
>> ScheduleModel model = new SimpleScheduleModel();
>> model.setMode(ScheduleModel.MONTH);
>> scheduleHandler.setModel(model);
>> HtmlSchedule schedule = new HtmlSchedule();
>> bindingScheduleHandler.setSchedule(schedule);
>> Contexts.getSessionContext().set("bindingScheduleHandler",
>> bindingScheduleHandler);
>> Contexts.getSessionContext().set("scheduleHandler", scheduleHandler);
>> Contexts.getSessionContext().set("scheduleSettings", scheduleSettings);
>> Contexts.getSessionContext().set("model", model);
>> .....
>> .....
>>
>>
>> Binding:
>>
>> Binding.xhtml:
>> .......
>> .......
>> <ui:define name="body">
>>
>>     <h1>Login</h1>
>>     <p>Please login using any username and password</p>
>>
>>     <h:messages styleClass="message"/>
>>  <f:view>
>>         <h:form>
>>                 <!--  The schedule itself -->
>>                 <t:div style="position: absolute; left: 220px; top: 5px;
>> right: 5px;">
>>                         <t:schedule
>> value="#{bindingScheduleHandler.model}"
>> id="schedule1"
>>                             binding="#{bindingScheduleHandler.schedule}"
>>                                 rendered="true"
>> visibleEndHour="#{scheduleSettings.visibleEndHour}"
>>
>> visibleStartHour="#{scheduleSettings.visibleStartHour}"
>>
>> workingEndHour="#{scheduleSettings.workingEndHour}"
>>
>> workingStartHour="#{scheduleSettings.workingStartHour}"
>>                                 readonly="#{scheduleSettings.readonly}"
>>                                 theme="#{scheduleSettings.theme}"
>>                                 tooltip="#{scheduleSettings.tooltip}"
>>
>> headerDateFormat="#{scheduleSettings.headerDateFormat}"
>>
>> compactWeekRowHeight="#{scheduleSettings.compactWeekRowHeight}"
>>
>> compactMonthRowHeight="#{scheduleSettings.compactMonthRowHeight}"
>>
>> detailedRowHeight="#{scheduleSettings.detailedRowHeight}"
>>
>> mouseListener="#{bindingScheduleHandler.scheduleClicked}"
>>
>> action="#{bindingScheduleHandler.scheduleAction}"
>>                                 />
>>                         <h:outputText
>> value="#{bindingScheduleHandler.mouseActionText}"></h:outputText>
>>                 </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="#{bindingScheduleHandler.model.selectedDate}" />
>>                                 <h:commandButton
>>
>> actionListener="#{bindingScheduleHandler.addSampleEntries}"
>>                                         value="add sample entries" />
>>                                 <h:commandButton
>>
>> actionListener="#{bindingScheduleHandler.addSampleHoliday}"
>>                                         value="add sample holiday" />
>>                         </h:panelGrid>
>>                 </t:div>
>>         </h:form>
>> </f:view>
>> </ui:define>
>> </ui:composition>
>>
>>
>> Model Value:
>>
>> <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>>
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <ui:composition xmlns="http://www.w3.org/1999/xhtml"
>>                 xmlns:s="http://jboss.com/products/seam/taglib"
>>                 xmlns:ui="http://java.sun.com/jsf/facelets"
>>                 xmlns:f="http://java.sun.com/jsf/core"
>>                 xmlns:h="http://java.sun.com/jsf/html"
>>                 xmlns:t="http://myfaces.apache.org/tomahawk">
>> <head>
>> <link href="stylesheet/basic.css" rel="stylesheet" type="text/css" />
>> </head>
>> <f:view>
>>         <h:form>
>>                 <!--  The schedule itself -->
>>                 <t:div style="position: absolute; left: 220px; top: 5px;
>> right: 5px;">
>>                         <t:schedule value="#{model}" id="schedule"
>>                                 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="#{model.selectedDate}" />
>>                                 <h:commandButton
>>
>> actionListener="#{scheduleHandler.addSampleEntries}"
>>                                         value="add sample entries" />
>>                                 <h:commandButton
>>
>> actionListener="#{scheduleHandler.addSampleHoliday}"
>>                                         value="add sample holiday" />
>>                         </h:panelGrid>
>>                 </t:div>
>>         </h:form>
>>     <h:messages globalOnly="true" styleClass="message"
>> id="globalMessages"/>
>> </f:view>
>> <ui:debug rendered="true" hotkey="h"/>
>> </ui:composition>
>>
>> I only extend the example Handler Classes with the seam name tag.
>> @Name("")
>>
>> Any Ideas?
>> I am out of Ideas, I don't see why doesn't work.
>>
>> Best regards
>> Fabio
>>
>>
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Seam-and-Tomahawk-Scheduler-tf3531589.html#a9956813
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message