You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jl...@apache.org on 2006/05/29 03:59:09 UTC

svn commit: r410011 [5/5] - in /myfaces/tomahawk/trunk: core/src/main/java/org/apache/myfaces/custom/schedule/ core/src/main/java/org/apache/myfaces/custom/schedule/model/ core/src/main/java/org/apache/myfaces/custom/schedule/renderer/ core/src/main/ja...

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/AddEntryHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/AddEntryHandler.java?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/AddEntryHandler.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/AddEntryHandler.java Sun May 28 18:59:05 2006
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.schedule;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.myfaces.custom.schedule.model.DefaultScheduleEntry;
+import org.apache.myfaces.custom.schedule.model.ScheduleModel;
+
+public class AddEntryHandler implements Serializable
+{
+    private static final long serialVersionUID = -4253400845605088699L;
+
+    private Date from;
+
+    private Date until;
+
+    private String title;
+
+    private String location;
+
+    private String comments;
+
+    private ScheduleModel model;
+
+    public String getComments()
+    {
+        return comments;
+    }
+
+    public void setComments(String comments)
+    {
+        this.comments = comments;
+    }
+
+    public Date getFrom()
+    {
+        return from;
+    }
+
+    public void setFrom(Date from)
+    {
+        this.from = from;
+    }
+
+    public String getLocation()
+    {
+        return location;
+    }
+
+    public void setLocation(String location)
+    {
+        this.location = location;
+    }
+
+    public ScheduleModel getModel()
+    {
+        return model;
+    }
+
+    public void setModel(ScheduleModel model)
+    {
+        this.model = model;
+    }
+
+    public String getTitle()
+    {
+        return title;
+    }
+
+    public void setTitle(String title)
+    {
+        this.title = title;
+    }
+
+    public Date getUntil()
+    {
+        return until;
+    }
+
+    public void setUntil(Date until)
+    {
+        this.until = until;
+    }
+
+    public String add()
+    {
+        if (!from.before(until))
+        {
+            FacesContext.getCurrentInstance().addMessage(
+                    null,
+                    new FacesMessage(FacesMessage.SEVERITY_ERROR,
+                            "start time must be before end time", null));
+            return "failure";
+        }
+        DefaultScheduleEntry entry = new DefaultScheduleEntry();
+        entry.setId(RandomStringUtils.randomNumeric(32));
+        entry.setStartTime(from);
+        entry.setEndTime(until);
+        entry.setTitle(title);
+        entry.setSubtitle(location);
+        entry.setDescription(comments);
+        model.addEntry(entry);
+        model.refresh();
+        return "success";
+    }
+
+}

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/AppointmentBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/AppointmentBean.java?rev=410011&view=auto
==============================================================================
    (empty)

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/BindingScheduleExampleHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/BindingScheduleExampleHandler.java?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/BindingScheduleExampleHandler.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/BindingScheduleExampleHandler.java Sun May 28 18:59:05 2006
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.schedule;
+
+import javax.faces.event.ActionEvent;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.myfaces.custom.schedule.HtmlSchedule;
+import org.apache.myfaces.custom.schedule.ScheduleMouseEvent;
+
+public class BindingScheduleExampleHandler extends ScheduleExampleHandler
+{
+    private static final Log log = LogFactory.getLog(BindingScheduleExampleHandler.class);
+    private HtmlSchedule schedule;
+    private String mouseActionText;
+
+    public String getMouseActionText()
+    {
+        return mouseActionText;
+    }
+
+    public HtmlSchedule getSchedule()
+    {
+        return schedule;
+    }
+
+    public void setSchedule(HtmlSchedule schedule)
+    {
+        this.schedule = schedule;
+    }
+
+     public String getLastClickedDate()
+    {
+        if (getSchedule() == null
+                || getSchedule().getLastClickedDateAndTime() == null)
+            return "no date/time clicked";
+        return getSchedule().getLastClickedDateAndTime().toString();
+    }
+    
+    public String scheduleAction() {
+        log.debug("The schedule was clicked");
+        return "success";
+    }
+
+    public void scheduleClicked(ScheduleMouseEvent event)
+    {
+        StringBuffer buffer = new StringBuffer();
+        switch (event.getEventType()) {
+        case ScheduleMouseEvent.SCHEDULE_BODY_CLICKED :
+            buffer.append("schedule body was clicked: ");
+            buffer.append(event.getClickedTime());
+            break;
+        case ScheduleMouseEvent.SCHEDULE_HEADER_CLICKED :
+            buffer.append("schedule header was clicked: ");
+            buffer.append(event.getClickedDate());
+            break;
+        case ScheduleMouseEvent.SCHEDULE_ENTRY_CLICKED :
+            buffer.append("schedule entry was clicked.");
+            break;
+        default:
+            buffer.append("no schedule mouse events registered");
+        }
+        mouseActionText = buffer.toString();
+    }
+}

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/RandomColorScheduleEntryRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/RandomColorScheduleEntryRenderer.java?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/RandomColorScheduleEntryRenderer.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/RandomColorScheduleEntryRenderer.java Sun May 28 18:59:05 2006
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.schedule;
+
+import java.util.HashMap;
+import java.util.Random;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.custom.schedule.HtmlSchedule;
+import org.apache.myfaces.custom.schedule.model.ScheduleEntry;
+import org.apache.myfaces.custom.schedule.renderer.DefaultScheduleEntryRenderer;
+
+/**
+ * An example ScheduleEntryRenderer that assigns a random color to each
+ * entry.
+ * 
+ * @author Jurgen Lust (latest modification by $Author$)
+ * @version $Revision$
+ */
+public class RandomColorScheduleEntryRenderer extends
+        DefaultScheduleEntryRenderer
+{
+    private HashMap colors = new HashMap();
+
+    public String getColor(FacesContext context, HtmlSchedule schedule, ScheduleEntry entry, boolean selected)
+    {
+        if (colors.containsKey(entry.getId())) return (String)colors.get(entry.getId());
+        StringBuffer color = new StringBuffer();
+        Random random = new Random();
+        color.append("rgb(");
+        color.append(random.nextInt(255));
+        color.append(",");
+        color.append(random.nextInt(255));
+        color.append(",");
+        color.append(random.nextInt(255));
+        color.append(")");
+        String colorString = color.toString();
+        colors.put(entry.getId(), colorString);
+        return colorString;
+    }
+
+}

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleBean.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleBean.java?rev=410011&view=auto
==============================================================================
    (empty)

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleExampleHandler.java Sun May 28 18:59:05 2006
@@ -0,0 +1,129 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.myfaces.examples.schedule;
+
+import java.io.Serializable;
+import java.util.Calendar;
+import java.util.GregorianCalendar;
+
+import javax.faces.event.ActionEvent;
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.myfaces.custom.schedule.model.DefaultScheduleEntry;
+import org.apache.myfaces.custom.schedule.model.ScheduleModel;
+import org.apache.myfaces.custom.schedule.model.SimpleScheduleModel;
+
+public class ScheduleExampleHandler implements Serializable
+{
+    private static final long serialVersionUID = -8815771399735333108L;
+
+    private ScheduleModel model;
+
+    public ScheduleModel getModel()
+    {
+        return model;
+    }
+
+    public void setModel(ScheduleModel model)
+    {
+        this.model = model;
+    }
+
+    public void deleteSelectedEntry(ActionEvent event)
+    {
+        if (model == null)
+            return;
+        model.removeSelectedEntry();
+    }
+
+    public void addSampleHoliday(ActionEvent event)
+    {
+        if (model instanceof SimpleScheduleModel)
+        {
+            SimpleScheduleModel ssm = (SimpleScheduleModel) model;
+            Calendar calendar = GregorianCalendar.getInstance();
+            calendar.setTime(ssm.getSelectedDate());
+            calendar.set(Calendar.DAY_OF_WEEK, Calendar.THURSDAY);
+            ssm.setHoliday(calendar.getTime(), "Poeperkesdag");
+            ssm.refresh();
+        }
+    }
+
+    public void addSampleEntries(ActionEvent event)
+    {
+        if (model == null)
+            return;
+        Calendar calendar = GregorianCalendar.getInstance();
+        calendar.setTime(model.getSelectedDate());
+        calendar.set(Calendar.DAY_OF_WEEK, Calendar.TUESDAY);
+        calendar.set(Calendar.HOUR_OF_DAY, 14);
+        DefaultScheduleEntry entry1 = new DefaultScheduleEntry();
+        // every entry in a schedule must have a unique id
+        entry1.setId(RandomStringUtils.randomNumeric(32));
+        entry1.setStartTime(calendar.getTime());
+        calendar.add(Calendar.MINUTE, 45);
+        entry1.setEndTime(calendar.getTime());
+        entry1.setTitle("Test MyFaces schedule component");
+        entry1.setSubtitle("my office");
+        entry1
+                .setDescription("We need to get this thing out of the sandbox ASAP");
+        model.addEntry(entry1);
+        DefaultScheduleEntry entry2 = new DefaultScheduleEntry();
+        entry2.setId(RandomStringUtils.randomNumeric(32));
+        // entry2 overlaps entry1
+        calendar.add(Calendar.MINUTE, -20);
+        entry2.setStartTime(calendar.getTime());
+        calendar.add(Calendar.HOUR, 2);
+        entry2.setEndTime(calendar.getTime());
+        entry2.setTitle("Show schedule component to boss");
+        entry2.setSubtitle("my office");
+        entry2.setDescription("Convince him to get time to thoroughly test it");
+        model.addEntry(entry2);
+        DefaultScheduleEntry entry3 = new DefaultScheduleEntry();
+        entry3.setId(RandomStringUtils.randomNumeric(32));
+        calendar.add(Calendar.DATE, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 9);
+        calendar.set(Calendar.MINUTE, 0);
+        calendar.set(Calendar.SECOND, 0);
+        entry3.setStartTime(calendar.getTime());
+        calendar.set(Calendar.HOUR_OF_DAY, 17);
+        entry3.setEndTime(calendar.getTime());
+        entry3.setTitle("Thoroughly test schedule component");
+        model.addEntry(entry3);
+        DefaultScheduleEntry entry4 = new DefaultScheduleEntry();
+        entry4.setId(RandomStringUtils.randomNumeric(32));
+        calendar.add(Calendar.MONTH, -1);
+        calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+        calendar.set(Calendar.HOUR_OF_DAY, 11);
+        entry4.setStartTime(calendar.getTime());
+        calendar.set(Calendar.HOUR_OF_DAY, 14);
+        entry4.setEndTime(calendar.getTime());
+        entry4.setTitle("Long lunch");
+        model.addEntry(entry4);
+        DefaultScheduleEntry entry5 = new DefaultScheduleEntry();
+        entry5.setId(RandomStringUtils.randomNumeric(32));
+        calendar.add(Calendar.MONTH, 2);
+        calendar.set(Calendar.DAY_OF_MONTH, 1);
+        calendar.set(Calendar.HOUR_OF_DAY, 1);
+        entry5.setStartTime(calendar.getTime());
+        calendar.set(Calendar.HOUR_OF_DAY, 5);
+        entry5.setEndTime(calendar.getTime());
+        entry5.setTitle("Fishing trip");
+        model.addEntry(entry5);
+        model.refresh();
+    }
+}

Added: myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/java/org/apache/myfaces/examples/schedule/ScheduleSettings.java Sun May 28 18:59:05 2006
@@ -0,0 +1,175 @@
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.myfaces.examples.schedule;
+
+import java.io.Serializable;
+
+import org.apache.myfaces.custom.schedule.model.ScheduleModel;
+
+public class ScheduleSettings implements Serializable
+{
+    private static final long serialVersionUID = -8547428935814382762L;
+
+    private int compactMonthRowHeight;
+
+    private int compactWeekRowHeight;
+
+    private int detailedRowHeight;
+
+    private String headerDateFormat;
+
+    private ScheduleModel model;
+
+    private boolean readonly;
+
+    private String theme;
+
+    private boolean tooltip;
+
+    private int visibleEndHour;
+
+    private int visibleStartHour;
+
+    private int workingEndHour;
+
+    private int workingStartHour;
+
+    public int getCompactMonthRowHeight()
+    {
+        return compactMonthRowHeight;
+    }
+
+    public int getCompactWeekRowHeight()
+    {
+        return compactWeekRowHeight;
+    }
+
+    public int getDetailedRowHeight()
+    {
+        return detailedRowHeight;
+    }
+
+    public String getHeaderDateFormat()
+    {
+        return headerDateFormat;
+    }
+
+    public ScheduleModel getModel()
+    {
+        return model;
+    }
+
+    public String getTheme()
+    {
+        return theme;
+    }
+
+    public int getVisibleEndHour()
+    {
+        return visibleEndHour;
+    }
+
+    public int getVisibleStartHour()
+    {
+        return visibleStartHour;
+    }
+
+    public int getWorkingEndHour()
+    {
+        return workingEndHour;
+    }
+
+    public int getWorkingStartHour()
+    {
+        return workingStartHour;
+    }
+
+    public boolean isReadonly()
+    {
+        return readonly;
+    }
+
+    public boolean isTooltip()
+    {
+        return tooltip;
+    }
+
+    public String save()
+    {
+        model.refresh();
+        return "success";
+    }
+
+    public void setCompactMonthRowHeight(int compactMonthRowHeight)
+    {
+        this.compactMonthRowHeight = compactMonthRowHeight;
+    }
+
+    public void setCompactWeekRowHeight(int compactWeekRowHeight)
+    {
+        this.compactWeekRowHeight = compactWeekRowHeight;
+    }
+
+    public void setDetailedRowHeight(int detailedRowHeight)
+    {
+        this.detailedRowHeight = detailedRowHeight;
+    }
+
+    public void setHeaderDateFormat(String headerDateFormat)
+    {
+        this.headerDateFormat = headerDateFormat;
+    }
+
+    public void setModel(ScheduleModel model)
+    {
+        this.model = model;
+    }
+
+    public void setReadonly(boolean readonly)
+    {
+        this.readonly = readonly;
+    }
+
+    public void setTheme(String theme)
+    {
+        this.theme = theme;
+    }
+
+    public void setTooltip(boolean tooltip)
+    {
+        this.tooltip = tooltip;
+    }
+
+    public void setVisibleEndHour(int visibleEndHour)
+    {
+        this.visibleEndHour = visibleEndHour;
+    }
+
+    public void setVisibleStartHour(int visibleStartHour)
+    {
+        this.visibleStartHour = visibleStartHour;
+    }
+
+    public void setWorkingEndHour(int workingEndHour)
+    {
+        this.workingEndHour = workingEndHour;
+    }
+
+    public void setWorkingStartHour(int workingStartHour)
+    {
+        this.workingStartHour = workingStartHour;
+    }
+}

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/WEB-INF/examples-config.xml Sun May 28 18:59:05 2006
@@ -359,6 +359,171 @@
 		<managed-bean-class>org.apache.myfaces.examples.testexception.TestException</managed-bean-class>
 		<managed-bean-scope>request</managed-bean-scope>
 	</managed-bean>
+
+
+    <!--  managed beans for schedule examples -->
+    <managed-bean>
+    	<managed-bean-name>today</managed-bean-name>
+    	<managed-bean-class>java.util.Date</managed-bean-class>
+    	<managed-bean-scope>application</managed-bean-scope>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>scheduleModel1</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.custom.schedule.model.SimpleScheduleModel
+    	</managed-bean-class>
+    	<managed-bean-scope>session</managed-bean-scope>
+    	<managed-property>
+    		<property-name>mode</property-name>
+    		<value>1</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>selectedDate</property-name>
+    		<value>#{today}</value>
+    	</managed-property>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>scheduleHandler1</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.examples.schedule.ScheduleExampleHandler
+    	</managed-bean-class>
+    	<managed-bean-scope>session</managed-bean-scope>
+    	<managed-property>
+    		<property-name>model</property-name>
+    		<value>#{scheduleModel1}</value>
+    	</managed-property>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>addEntryHandler</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.examples.schedule.AddEntryHandler
+    	</managed-bean-class>
+    	<managed-bean-scope>request</managed-bean-scope>
+    	<managed-property>
+    		<property-name>model</property-name>
+    		<value>#{scheduleModel1}</value>
+    	</managed-property>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>scheduleModel2</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.custom.schedule.model.SimpleScheduleModel
+    	</managed-bean-class>
+    	<managed-bean-scope>session</managed-bean-scope>
+    	<managed-property>
+    		<property-name>mode</property-name>
+    		<value>1</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>selectedDate</property-name>
+    		<value>#{today}</value>
+    	</managed-property>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>scheduleHandler2</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.examples.schedule.ScheduleExampleHandler
+    	</managed-bean-class>
+    	<managed-bean-scope>session</managed-bean-scope>
+    	<managed-property>
+    		<property-name>model</property-name>
+    		<value>#{scheduleModel2}</value>
+    	</managed-property>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>bindingScheduleHandler</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.examples.schedule.BindingScheduleExampleHandler
+    	</managed-bean-class>
+    	<managed-bean-scope>session</managed-bean-scope>
+    	<managed-property>
+    		<property-name>model</property-name>
+    		<value>#{scheduleModel2}</value>
+    	</managed-property>
+    </managed-bean>
+
+
+    <managed-bean>
+    	<managed-bean-name>scheduleSettings2</managed-bean-name>
+    	<managed-bean-class>
+    		org.apache.myfaces.examples.schedule.ScheduleSettings
+    	</managed-bean-class>
+    	<managed-bean-scope>session</managed-bean-scope>
+    	<managed-property>
+    		<property-name>model</property-name>
+    		<value>#{scheduleModel2}</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>visibleStartHour</property-name>
+    		<value>8</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>visibleEndHour</property-name>
+    		<value>18</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>workingStartHour</property-name>
+    		<value>9</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>workingEndHour</property-name>
+    		<value>17</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>tooltip</property-name>
+    		<value>true</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>readonly</property-name>
+    		<value>false</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>theme</property-name>
+    		<value>default</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>headerDateFormat</property-name>
+    		<value>yyyy-MM-dd</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>compactWeekRowHeight</property-name>
+    		<value>200</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>compactMonthRowHeight</property-name>
+    		<value>100</value>
+    	</managed-property>
+    	<managed-property>
+    		<property-name>detailedRowHeight</property-name>
+    		<value>22</value>
+    	</managed-property>
+    </managed-bean>
+
+    <managed-bean>
+    	<managed-bean-name>scheduleThemeChoices</managed-bean-name>
+    	<managed-bean-class>java.util.TreeMap</managed-bean-class>
+    	<managed-bean-scope>application</managed-bean-scope>
+    	<map-entries>
+    		<map-entry>
+    			<key>default</key>
+    			<value>default</value>
+    		</map-entry>
+    		<map-entry>
+    			<key>evolution</key>
+    			<value>evolution</value>
+    		</map-entry>
+    		<map-entry>
+    			<key>outlookxp</key>
+    			<value>outlookxp</value>
+    		</map-entry>
+    	</map-entries>
+    </managed-bean>
 	
     <navigation-rule>
         <navigation-case>
@@ -588,5 +753,62 @@
             <to-view-id>/masterDetail.jsp</to-view-id>
         </navigation-case>
     </navigation-rule>
+
+    <!-- navigational rules for the schedule examples -->
+	<navigation-rule>
+		<from-view-id>/schedule2.jsp</from-view-id>
+		<navigation-case>
+			<from-outcome>add_entry</from-outcome>
+			<to-view-id>/schedule_addentry.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+	</navigation-rule>
+	
+	<navigation-rule>
+		<from-view-id>/schedule_addentry.jsp</from-view-id>
+		<navigation-case>
+			<from-outcome>success</from-outcome>
+			<to-view-id>/schedule2.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>cancel</from-outcome>
+			<to-view-id>/schedule2.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>failure</from-outcome>
+			<to-view-id>/schedule_addentry.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+	</navigation-rule>
+	
+	<navigation-rule>
+		<from-view-id>/schedule3.jsp</from-view-id>
+		<navigation-case>
+			<from-outcome>edit_settings</from-outcome>
+			<to-view-id>/schedule_editsettings.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+	</navigation-rule>
+
+	<navigation-rule>
+		<from-view-id>/schedule_editsettings.jsp</from-view-id>
+		<navigation-case>
+			<from-outcome>success</from-outcome>
+			<to-view-id>/schedule3.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>cancel</from-outcome>
+			<to-view-id>/schedule3.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+		<navigation-case>
+			<from-outcome>failure</from-outcome>
+			<to-view-id>/schedule_editsettings.jsp</to-view-id>
+			<redirect />
+		</navigation-case>
+	</navigation-rule>
 
 </faces-config>

Modified: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/home.jsp Sun May 28 18:59:05 2006
@@ -81,7 +81,27 @@
                 <h:outputLink value="collapsiblePanel.jsf" ><f:verbatim>Collapsible Panel</f:verbatim></h:outputLink>
                 <h:outputLink value="testExceptions.jsf" ><f:verbatim>Test the custom error page - not really jsf stuff, but a demonstration how to print the real exception</f:verbatim></h:outputLink>
 
-            </h:panelGrid>
+			<h:outputText value="Schedule" />
+			<h:panelGrid style="padding-left:25px">
+				<h:outputLink value="schedule1.jsf">
+					<f:verbatim>Schedule with sample entries</f:verbatim>
+				</h:outputLink>
+				<h:outputLink value="schedule2.jsf">
+					<f:verbatim>Schedule with possibility for adding/removing entries</f:verbatim>
+				</h:outputLink>
+				<h:outputLink value="schedule3.jsf">
+					<f:verbatim>Customizable schedule</f:verbatim>
+				</h:outputLink>
+				<h:outputLink value="schedule4.jsf">
+					<f:verbatim>Schedule with custom styleClasses and custom EntryRenderer</f:verbatim>
+				</h:outputLink>
+				<h:outputLink value="schedule5.jsf">
+					<f:verbatim>Example demonstrating the submitOnClick and mouseListener properties</f:verbatim>
+				</h:outputLink>
+			</h:panelGrid>
+
+
+		</h:panelGrid>
 
 		</h:form>
         </f:view>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule1.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule1.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule1.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule1.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,52 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<%@include file="../inc/head.inc"%>
+<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;">
+			<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>
+    <%@include file="../inc/page_footer.jsp" %>
+		</t:div>
+	</h:form>
+</f:view>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule2.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule2.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule2.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule2.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,53 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<%@include file="../inc/head.inc"%>
+<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;">
+			<h:panelGrid columns="1">
+				<t:inputCalendar id="scheduleNavigator"
+					value="#{scheduleHandler1.model.selectedDate}" />
+				<h:commandButton
+					action="add_entry"
+					value="add entry" />
+				<h:commandButton
+					actionListener="#{scheduleHandler1.deleteSelectedEntry}"
+					value="delete selected entry"
+					rendered="#{scheduleHandler1.model.entrySelected}"/>
+			</h:panelGrid>
+		    <%@include file="../inc/page_footer.jsp" %>
+		</t:div>
+	</h:form>
+</f:view>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule3.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule3.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule3.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule3.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,63 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<%@include file="../inc/head.inc"%>
+<body>
+<f:view>
+	<h:form>
+		<!--  The schedule itself -->
+		<t:div style="position: absolute; left: 220px; top: 5px; right: 5px;">
+			<t:schedule value="#{scheduleHandler2.model}" id="schedule1"
+				rendered="true" visibleEndHour="#{scheduleSettings2.visibleEndHour}"
+				visibleStartHour="#{scheduleSettings2.visibleStartHour}"
+				workingEndHour="#{scheduleSettings2.workingEndHour}"
+				workingStartHour="#{scheduleSettings2.workingStartHour}"
+				readonly="#{scheduleSettings2.readonly}"
+				theme="#{scheduleSettings2.theme}"
+				tooltip="#{scheduleSettings2.tooltip}"
+				headerDateFormat="#{scheduleSettings2.headerDateFormat}"
+				compactWeekRowHeight="#{scheduleSettings2.compactWeekRowHeight}"
+				compactMonthRowHeight="#{scheduleSettings2.compactMonthRowHeight}"
+				detailedRowHeight="#{scheduleSettings2.detailedRowHeight}"/>
+		</t:div>
+		<!--  The column on the left, containing the calendar and other controls -->
+		<t:div style="position: absolute; left: 5px; top: 5px; width: 210px;">
+			<h:panelGrid columns="1">
+				<t:inputCalendar id="scheduleNavigator"
+					value="#{scheduleHandler2.model.selectedDate}" />
+				<h:commandButton
+					actionListener="#{scheduleHandler2.addSampleEntries}"
+					value="add sample entries" />
+				<h:commandButton
+					actionListener="#{scheduleHandler2.addSampleHoliday}"
+					value="add sample holiday" />
+				<h:commandButton
+					action="edit_settings"
+					value="Schedule properties..." />
+			</h:panelGrid>
+			<%@include file="../inc/page_footer.jsp"%>
+		</t:div>
+	</h:form>
+</f:view>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule4.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule4.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule4.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule4.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,82 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<head>
+<meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8" />
+<title>MyFaces - the free JSF Implementation</title>
+<link rel="stylesheet" type="text/css" href="css/basic.css" />
+<style>
+table.background td.evenReddish,
+table.background td.unevenReddish,
+table.background td.freeReddish {
+    font-family: Verdana, Arial, Helvetica, Sans-Serif;
+    font-size: 10px;
+    text-align: center;
+}
+
+table.background td.unevenReddish {
+    background-color: rgb(240,220,220);
+    color: rgb(230,220,220);
+}
+
+table.background td.evenReddish {
+    background-color: rgb(255,230,230);
+    color: rgb(240,230,230);
+}
+
+table.background td.freeReddish {
+	background-color: rgb(255,0,0);
+	color: rgb(255,0,0);
+}
+  </style>
+</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="outlookxp" tooltip="true"
+				evenClass="evenReddish" unevenClass="unevenReddish" freeClass="freeReddish"
+				entryRenderer="org.apache.myfaces.examples.schedule.RandomColorScheduleEntryRenderer" />
+		</t:div>
+		<!--  The column on the left, containing the calendar and other controls -->
+		<t:div style="position: absolute; left: 5px; top: 5px; width: 210px;">
+			<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>
+			<%@include file="../inc/page_footer.jsp"%>
+		</t:div>
+	</h:form>
+</f:view>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule5.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule5.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule5.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule5.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,66 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<%@include file="../inc/head.inc"%>
+<body>
+<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="#{scheduleSettings2.visibleEndHour}"
+				visibleStartHour="#{scheduleSettings2.visibleStartHour}"
+				workingEndHour="#{scheduleSettings2.workingEndHour}"
+				workingStartHour="#{scheduleSettings2.workingStartHour}"
+				readonly="#{scheduleSettings2.readonly}"
+				theme="#{scheduleSettings2.theme}"
+				tooltip="#{scheduleSettings2.tooltip}"
+				headerDateFormat="#{scheduleSettings2.headerDateFormat}"
+				compactWeekRowHeight="#{scheduleSettings2.compactWeekRowHeight}"
+				compactMonthRowHeight="#{scheduleSettings2.compactMonthRowHeight}"
+				detailedRowHeight="#{scheduleSettings2.detailedRowHeight}"
+				submitOnClick="true"
+				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;">
+			<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>
+    <%@include file="../inc/page_footer.jsp" %>
+		</t:div>
+	</h:form>
+</f:view>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_addentry.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_addentry.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_addentry.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_addentry.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,57 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<%@include file="../inc/head.inc"%>
+<body>
+<f:view>
+	<h:form>
+		<t:htmlTag value="h3">Add entry</t:htmlTag>
+		<h:messages tooltip="true" layout="table" globalOnly="true" />
+		<h:panelGrid columns="3">
+			<h:outputLabel for="from" value="from:" />
+			<t:inputDate id="from" value="#{addEntryHandler.from}" type="both"
+				required="true" popupCalendar="true"/>
+			<h:message for="from" />
+			<h:outputLabel for="until" value="until:" />
+			<t:inputDate id="until" value="#{addEntryHandler.until}" type="both"
+				required="true" popupCalendar="true"/>
+			<h:message for="until" />
+			<h:outputLabel for="title" value="title:" />
+			<h:inputText id="title" value="#{addEntryHandler.title}" required="true" />
+			<h:message for="title" />
+			<h:outputLabel for="location" value="location:" />
+			<h:inputText id="location" value="#{addEntryHandler.location}" />
+			<h:message for="location" />
+			<h:outputLabel for="comments" value="comments:" />
+			<h:inputTextarea id="comments" value="#{addEntryHandler.comments}" />
+			<h:message for="comments" />
+		</h:panelGrid>
+		<h:panelGrid columns="2">
+			<h:commandButton action="#{addEntryHandler.add}" value="add" />
+			<h:commandButton action="cancel" value="cancel" immediate="true"/>
+		</h:panelGrid>
+	</h:form>
+<%@include file="../inc/page_footer.jsp"%>
+</f:view>
+</body>
+</html>

Added: myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_editsettings.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_editsettings.jsp?rev=410011&view=auto
==============================================================================
--- myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_editsettings.jsp (added)
+++ myfaces/tomahawk/trunk/examples/simple/src/main/webapp/schedule_editsettings.jsp Sun May 28 18:59:05 2006
@@ -0,0 +1,110 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
+
+<!--
+/*
+ * Copyright 2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+//-->
+
+<html>
+<%@include file="../inc/head.inc"%>
+<body>
+<f:view>
+	<h:form>
+		<t:htmlTag value="h3">Edit settings</t:htmlTag>
+		<h:messages tooltip="true" layout="table" globalOnly="true" />
+		<h:panelGrid columns="3">
+			<h:outputLabel for="mode" value="Display mode:" />
+			<h:selectOneRadio id="mode" value="#{scheduleHandler2.model.mode}">
+				<f:selectItem itemValue="0" itemLabel="day"/>
+				<f:selectItem itemValue="1" itemLabel="workweek"/>
+				<f:selectItem itemValue="2" itemLabel="week" />
+				<f:selectItem itemValue="3" itemLabel="month" />
+			</h:selectOneRadio>
+			<h:message for="mode" />
+			<h:outputLabel for="visibleStartHour" value="Display from:" />
+			<h:inputText id="visibleStartHour"
+				value="#{scheduleSettings2.visibleStartHour}" required="true">
+				<f:validateLongRange minimum="0" maximum="11" />
+			</h:inputText>
+			<h:message for="visibleStartHour" />
+			<h:outputLabel for="visibleEndHour" value="Display until:" />
+			<h:inputText id="visibleEndHour"
+				value="#{scheduleSettings2.visibleEndHour}" required="true">
+				<f:validateLongRange minimum="13" maximum="24" />
+			</h:inputText>
+			<h:message for="visibleEndHour" />
+			<h:outputLabel for="workingStartHour" value="Working day starts at:" />
+			<h:inputText id="workingStartHour"
+				value="#{scheduleSettings2.workingStartHour}" required="true">
+				<f:validateLongRange minimum="7" maximum="11" />
+			</h:inputText>
+			<h:message for="workingStartHour" />
+			<h:outputLabel for="workingEndHour" value="Working day ends at:" />
+			<h:inputText id="workingEndHour"
+				value="#{scheduleSettings2.workingEndHour}" required="true">
+				<f:validateLongRange minimum="15" maximum="22" />
+			</h:inputText>
+			<h:message for="workingEndHour" />
+			<h:outputLabel for="readonly" value="Schedule is read only:" />
+			<h:selectBooleanCheckbox id="readonly"
+				value="#{scheduleSettings2.readonly}" required="true" />
+			<h:message for="readonly" />
+			<h:outputLabel for="tooltip" value="Show tooltips:" />
+			<h:selectBooleanCheckbox id="tooltip"
+				value="#{scheduleSettings2.tooltip}" required="true" />
+			<h:message for="tooltip" />
+			<h:outputLabel for="theme" value="Theme:" />
+			<h:selectOneRadio id="theme" value="#{scheduleSettings2.theme}"
+				required="true">
+				<f:selectItems value="#{scheduleThemeChoices}" />
+			</h:selectOneRadio>
+			<h:message for="theme" />
+			<h:outputLabel for="headerDateFormat" value="Header date format:" />
+			<h:inputText id="headerDateFormat"
+				value="#{scheduleSettings2.headerDateFormat}" required="true" />
+			<h:message for="headerDateFormat" />
+			<h:outputLabel for="compactWeekRowHeight"
+				value="Row height in week mode:" />
+			<h:inputText id="compactWeekRowHeight"
+				value="#{scheduleSettings2.compactWeekRowHeight}" required="true">
+				<f:validateLongRange minimum="100" maximum="300" />
+			</h:inputText>
+			<h:message for="compactWeekRowHeight" />
+			<h:outputLabel for="compactMonthRowHeight"
+				value="Row height in month mode:" />
+			<h:inputText id="compactMonthRowHeight"
+				value="#{scheduleSettings2.compactMonthRowHeight}" required="true">
+				<f:validateLongRange minimum="50" maximum="150" />
+			</h:inputText>
+			<h:message for="compactMonthRowHeight" />
+			<h:outputLabel for="detailedRowHeight"
+				value="Row height in detailed mode:" />
+			<h:inputText id="detailedRowHeight"
+				value="#{scheduleSettings2.detailedRowHeight}" required="true">
+				<f:validateLongRange minimum="22" maximum="50" />
+			</h:inputText>
+			<h:message for="detailedRowHeight" />
+		</h:panelGrid>
+		<h:panelGrid columns="2">
+			<h:commandButton action="#{scheduleSettings2.save}" value="save" />
+		</h:panelGrid>
+	</h:form>
+	<%@include file="../inc/page_footer.jsp"%>
+</f:view>
+</body>
+</html>

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/resources-facesconfig/META-INF/faces-config.xml Sun May 28 18:59:05 2006
@@ -75,16 +75,6 @@
   </component>
 
   <component>
-    <component-type>org.apache.myfaces.Planner</component-type>
-    <component-class>org.apache.myfaces.custom.schedule.HtmlPlanner</component-class>
-  </component>
-
-  <component>
-    <component-type>org.apache.myfaces.Schedule</component-type>
-    <component-class>org.apache.myfaces.custom.schedule.HtmlSchedule</component-class>
-  </component>
-  
-  <component>
      <component-type>org.apache.myfaces.Script</component-type>
      <component-class>org.apache.myfaces.custom.script.Script</component-class>
   </component>
@@ -287,18 +277,6 @@
       <component-family>javax.faces.SelectBoolean</component-family>
       <renderer-type>org.apache.myfaces.CheckboxAjax</renderer-type>
       <renderer-class>org.apache.myfaces.custom.inputAjax.HtmlSelectBooleanCheckboxAjaxRenderer</renderer-class>
-    </renderer>
-
-    <renderer>
-      <component-family>javax.faces.Panel</component-family>
-      <renderer-type>org.apache.myfaces.Planner</renderer-type>
-      <renderer-class>org.apache.myfaces.custom.schedule.renderer.PlannerRenderer</renderer-class>
-    </renderer>
-
-    <renderer>
-      <component-family>javax.faces.Panel</component-family>
-      <renderer-type>org.apache.myfaces.Schedule</renderer-type>
-      <renderer-class>org.apache.myfaces.custom.schedule.renderer.ScheduleDelegatingRenderer</renderer-class>
     </renderer>
 
     <renderer>

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/tld/myfaces_sandbox.tld Sun May 28 18:59:05 2006
@@ -115,9 +115,6 @@
 ===========================================================================
 -->
 <!ENTITY html_input_suggest_attributes       SYSTEM "entities/html_input_suggest_attributes.xml">
-<!ENTITY ui_schedule_attributes       SYSTEM "entities/ui_schedule_attributes.xml">
-<!ENTITY html_schedule_attributes       SYSTEM "entities/html_schedule_attributes.xml">
-<!ENTITY html_planner_attributes       SYSTEM "entities/html_planner_attributes.xml">
 <!ENTITY html_focus_attributes       SYSTEM "entities/html_focus_attributes.xml">
 <!ENTITY validator_compare_to_attributes       SYSTEM "entities/validator_compare_to_attributes.xml">
 <!ENTITY value_change_notifier_attributes       SYSTEM "entities/value_change_notifier_attributes.xml">
@@ -158,18 +155,6 @@
 	</tag>
 
 
-	<!-- planner -->
-	<tag>
-		<name>planner</name>
-		<tag-class>org.apache.myfaces.custom.schedule.PlannerTag</tag-class>
-		<body-content>empty</body-content>
-		<display-name>Planner component</display-name>
-		<description>A meeting planner component, similar to the ones found in Outlook or Evolution.</description>
-		&ui_component_attributes;
-		&ui_schedule_attributes;
-		&html_planner_attributes;
-	</tag>
-
 	<!-- valueChangeNotifier -->
 	<tag>
         <name>valueChangeNotifier</name>
@@ -179,18 +164,6 @@
 		&value_change_notifier_attributes;
 	</tag>
 
-
-	<!-- schedule -->
-	<tag>
-		<name>schedule</name>
-		<tag-class>org.apache.myfaces.custom.schedule.ScheduleTag</tag-class>
-		<body-content>empty</body-content>
-		<display-name>Schedule component</display-name>
-		<description>A schedule component similar to the ones found in Outlook or Evolution</description>
-		&ui_command_attributes;
-		&ui_schedule_attributes;
-		&html_schedule_attributes;
-	</tag>
 
 	<!-- script -->
 	<tag>

Modified: myfaces/tomahawk/trunk/sandbox/core/src/site/site.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/site/site.xml?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/site/site.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/site/site.xml Sun May 28 18:59:05 2006
@@ -36,7 +36,6 @@
       <item name="Input Suggest Ajax Menu" href="inputSuggestAjax.html"/>
       <item name="Auto Update DataTable" href="autoUpdateDataTable.html"/>  
       <item name="Input Suggest" href="inputSuggest.html"/>  
-      <item name="Schedule" href="schedule.html"/>
       <item name="Focus" href="focus.html"/>  
       <item name="Form" href="form.html"/>  
       <item name="SubForm" href="subForm.html"/> 	

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/WEB-INF/examples-config.xml Sun May 28 18:59:05 2006
@@ -298,157 +298,6 @@
   </managed-bean>
 
 
-  <!--  managed beans for schedule examples -->
-  <managed-bean>
-  	<managed-bean-name>today</managed-bean-name>
-  	<managed-bean-class>java.util.Date</managed-bean-class>
-  	<managed-bean-scope>application</managed-bean-scope>
-  </managed-bean>
-  
-  <managed-bean>
-  	<managed-bean-name>scheduleModel1</managed-bean-name>
-  	<managed-bean-class>org.apache.myfaces.custom.schedule.model.SimpleScheduleModel</managed-bean-class>
-  	<managed-bean-scope>session</managed-bean-scope>
-  		<managed-property>
-  			<property-name>mode</property-name>
-  			<value>1</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>selectedDate</property-name>
-  			<value>#{today}</value>
-  		</managed-property>
-  </managed-bean>
-  
-  <managed-bean>
-    <managed-bean-name>scheduleHandler1</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.examples.schedule.ScheduleExampleHandler</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-    	<managed-property>
-    		<property-name>model</property-name>
-    		<value>#{scheduleModel1}</value>
-    	</managed-property>
-  </managed-bean>
-  
-  <managed-bean>
-  	<managed-bean-name>addEntryHandler</managed-bean-name>
-  	<managed-bean-class>org.apache.myfaces.examples.schedule.AddEntryHandler</managed-bean-class>
-  	<managed-bean-scope>request</managed-bean-scope>
-    	<managed-property>
-    		<property-name>model</property-name>
-    		<value>#{scheduleModel1}</value>
-    	</managed-property>
-  </managed-bean>
-  
-  <managed-bean>
-  	<managed-bean-name>scheduleModel2</managed-bean-name>
-  	<managed-bean-class>org.apache.myfaces.custom.schedule.model.SimpleScheduleModel</managed-bean-class>
-  	<managed-bean-scope>session</managed-bean-scope>
-  		<managed-property>
-  			<property-name>mode</property-name>
-  			<value>1</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>selectedDate</property-name>
-  			<value>#{today}</value>
-  		</managed-property>
-  </managed-bean>
-
-  <managed-bean>
-    <managed-bean-name>scheduleHandler2</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.examples.schedule.ScheduleExampleHandler</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-    	<managed-property>
-    		<property-name>model</property-name>
-    		<value>#{scheduleModel2}</value>
-    	</managed-property>
-  </managed-bean>
-  
-  <managed-bean>
-    <managed-bean-name>bindingScheduleHandler</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.examples.schedule.BindingScheduleExampleHandler</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-    	<managed-property>
-    		<property-name>model</property-name>
-    		<value>#{scheduleModel2}</value>
-    	</managed-property>
-  </managed-bean>
-  
-  
-  <managed-bean>
-  	<managed-bean-name>scheduleSettings2</managed-bean-name>
-  	<managed-bean-class>org.apache.myfaces.examples.schedule.ScheduleSettings</managed-bean-class>
-  	<managed-bean-scope>session</managed-bean-scope>
-    	<managed-property>
-    		<property-name>model</property-name>
-    		<value>#{scheduleModel2}</value>
-    	</managed-property>
-  		<managed-property>
-  			<property-name>visibleStartHour</property-name>
-  			<value>8</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>visibleEndHour</property-name>
-  			<value>18</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>workingStartHour</property-name>
-  			<value>9</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>workingEndHour</property-name>
-  			<value>17</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>tooltip</property-name>
-  			<value>true</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>readonly</property-name>
-  			<value>false</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>theme</property-name>
-  			<value>default</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>headerDateFormat</property-name>
-  			<value>yyyy-MM-dd</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>compactWeekRowHeight</property-name>
-  			<value>200</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>compactMonthRowHeight</property-name>
-  			<value>100</value>
-  		</managed-property>
-  		<managed-property>
-  			<property-name>detailedRowHeight</property-name>
-  			<value>22</value>
-  		</managed-property>
-  </managed-bean>
-
-  <managed-bean>
-  	<managed-bean-name>scheduleThemeChoices</managed-bean-name>
-  	<managed-bean-class>java.util.TreeMap</managed-bean-class>
-  	<managed-bean-scope>application</managed-bean-scope>
-  	<map-entries>
-  		<map-entry>
-  			<key>default</key>
-  			<value>default</value>
-  		</map-entry>
-  		<map-entry>
-  			<key>evolution</key>
-  			<value>evolution</value>
-  		</map-entry>
-  		<map-entry>
-  			<key>outlookxp</key>
-  			<value>outlookxp</value>
-  		</map-entry>
-  	</map-entries>
-  </managed-bean>
-
-
   <!-- managed bean for graphicImageDynamic -->
 
   <managed-bean>
@@ -591,63 +440,6 @@
 		<navigation-case>
 			<from-outcome>home</from-outcome>
 			<to-view-id>/home.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-	</navigation-rule>
-
-    <!-- navigational rules for the schedule examples -->
-	<navigation-rule>
-		<from-view-id>/schedule/example2.jsp</from-view-id>
-		<navigation-case>
-			<from-outcome>add_entry</from-outcome>
-			<to-view-id>/schedule/addentry.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-	</navigation-rule>
-	
-	<navigation-rule>
-		<from-view-id>/schedule/addentry.jsp</from-view-id>
-		<navigation-case>
-			<from-outcome>success</from-outcome>
-			<to-view-id>/schedule/example2.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-		<navigation-case>
-			<from-outcome>cancel</from-outcome>
-			<to-view-id>/schedule/example2.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-		<navigation-case>
-			<from-outcome>failure</from-outcome>
-			<to-view-id>/schedule/addentry.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-	</navigation-rule>
-	
-	<navigation-rule>
-		<from-view-id>/schedule/example3.jsp</from-view-id>
-		<navigation-case>
-			<from-outcome>edit_settings</from-outcome>
-			<to-view-id>/schedule/editsettings.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-	</navigation-rule>
-
-	<navigation-rule>
-		<from-view-id>/schedule/editsettings.jsp</from-view-id>
-		<navigation-case>
-			<from-outcome>success</from-outcome>
-			<to-view-id>/schedule/example3.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-		<navigation-case>
-			<from-outcome>cancel</from-outcome>
-			<to-view-id>/schedule/example3.jsp</to-view-id>
-			<redirect />
-		</navigation-case>
-		<navigation-case>
-			<from-outcome>failure</from-outcome>
-			<to-view-id>/schedule/editsettings.jsp</to-view-id>
 			<redirect />
 		</navigation-case>
 	</navigation-rule>

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp?rev=410011&r1=410010&r2=410011&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/home.jsp Sun May 28 18:59:05 2006
@@ -58,15 +58,6 @@
 	            <h:outputLink value="inputSuggest.jsf" ><f:verbatim>Input Suggest - Suggest without Ajax</f:verbatim></h:outputLink>
             </h:panelGrid>
             
-            <h:outputText value="Schedule"/>
-            <h:panelGrid style="padding-left:25px">
-	            <h:outputLink value="schedule/example1.jsf" ><f:verbatim>Schedule with sample entries</f:verbatim></h:outputLink>
-	            <h:outputLink value="schedule/example2.jsf" ><f:verbatim>Schedule with possibility for adding/removing entries</f:verbatim></h:outputLink>
-	            <h:outputLink value="schedule/example3.jsf" ><f:verbatim>Customizable schedule</f:verbatim></h:outputLink>
-	            <h:outputLink value="schedule/example4.jsf" ><f:verbatim>Schedule with custom styleClasses and custom EntryRenderer</f:verbatim></h:outputLink>
-	            <h:outputLink value="schedule/example5.jsf" ><f:verbatim>Example demonstrating the submitOnClick and mouseListener properties</f:verbatim></h:outputLink>
-            </h:panelGrid>
-                        
             <h:outputText value="Data Tables"/>
             <h:panelGrid style="padding-left:25px">
             	<h:outputLink value="autoUpdateDataTable.jsf" ><f:verbatim>Automatically updated dataTable per AJAX</f:verbatim></h:outputLink>