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 2007/06/19 01:16:18 UTC
svn commit: r548528 [3/4] - in /myfaces/tomahawk/trunk/core: ./
src/main/java/org/apache/myfaces/custom/schedule/
src/main/java/org/apache/myfaces/custom/schedule/renderer/
src/main/java/org/apache/myfaces/custom/schedule/util/
src/main/resources-faces...
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTag.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTag.java?view=diff&rev=548528&r1=548527&r2=548528
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTag.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/ScheduleTag.java Mon Jun 18 16:16:17 2007
@@ -16,1107 +16,912 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package org.apache.myfaces.custom.schedule;
-import java.io.Serializable;
-
import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
-import javax.faces.event.ActionEvent;
-import javax.faces.webapp.UIComponentTag;
+
+import org.apache.myfaces.shared_tomahawk.taglib.html.HtmlComponentTagBase;
/**
- * <p>
- * JSP tag for the schedule component
- * </p>
- *
- * @author Jurgen Lust (latest modification by $Author: jlust $)
- * @version $Revision: 392301 $
+ * @author Jurgen Lust
+ * @version $Revision$
*/
-public class ScheduleTag extends UIComponentTag implements Serializable
+public class ScheduleTag extends HtmlComponentTagBase
{
- private static final long serialVersionUID = -5226785969160327763L;
+ //UIScheduleBase properties
+ private String _compactMonthRowHeight;
+ private String _compactWeekRowHeight;
+ private String _detailedRowHeight;
+ private String _expandToFitEntries;
+ private String _headerDateFormat;
+ private String _immediate;
+ private String _readonly;
+ private String _renderZeroLengthEntries;
+ private String _theme;
+ private String _tooltip;
+ private String _visibleEndHour;
+ private String _visibleStartHour;
+ private String _workingEndHour;
+ private String _workingStartHour;
+ private String _submitOnClick;
+ //UISchedule properties
+ private String _action;
+ private String _actionListener;
+ private String _mouseListener;
+ //HtmlSchedule properties
+ private String _enabledOnUserRole;
+ private String _visibleOnUserRole;
+ private String _backgroundClass;
+ private String _columnClass;
+ private String _contentClass;
+ private String _dateClass;
+ private String _dayClass;
+ private String _entryClass;
+ private String _entryRenderer;
+ private String _evenClass;
+ private String _foregroundClass;
+ private String _freeClass;
+ private String _gutterClass;
+ private String _headerClass;
+ private String _holidayClass;
+ private String _hoursClass;
+ private String _inactiveDayClass;
+ private String _minutesClass;
+ private String _monthClass;
+ private String _selectedClass;
+ private String _selectedEntryClass;
+ private String _subtitleClass;
+ private String _textClass;
+ private String _titleClass;
+ private String _unevenClass;
+ private String _weekClass;
+
- //~ Instance fields --------------------------------------------------------
- private String action;
- private String actionListener;
- private String backgroundClass;
- private String columnClass;
- private String compactMonthRowHeight;
- private String compactWeekRowHeight;
- private String contentClass;
- private String dateClass;
- private String dayClass;
- private String detailedRowHeight;
- private String entryClass;
- private String entryRenderer;
- private String evenClass;
- private String foregroundClass;
- private String freeClass;
- private String gutterClass;
- private String headerClass;
- private String headerDateFormat;
- private String holidayClass;
- private String hoursClass;
- private String immediate;
- private String inactiveDayClass;
- private String minutesClass;
- private String monthClass;
- private String mouseListener;
- private String readonly;
- private String rendered;
- private String selectedClass;
- private String selectedEntryClass;
- private String submitOnClick;
- private String subtitleClass;
- private String textClass;
- private String theme;
- private String titleClass;
- private String tooltip;
- private String unevenClass;
- private String value;
- private String visibleEndHour;
- private String visibleStartHour;
- private String weekClass;
- private String workingEndHour;
- private String workingStartHour;
- private String renderZeroLengthEntries;
- private String expandToFitEntries;
-
- //~ Methods ----------------------------------------------------------------
-
- private void addAttribute(final Application app, final UIComponent component,
- final String key, final String value)
- {
- if ((key != null) && (value != null))
- {
- if (isValueReference(value))
- {
- component.setValueBinding(key, app
- .createValueBinding((String) value));
- }
- else
- {
- component.getAttributes().put(key, value);
- }
- }
- }
-
- /**
- * <p>
- * The action of the JSF component
- * </p>
- *
- * @return Returns the action.
+ /**
+ * @return the action
*/
public String getAction()
{
- return action;
+ return _action;
}
/**
- * <p>
- * The actionlistener of the JSF component
- * </p>
- *
- * @return Returns the actionListener.
+ * @return the actionListener
*/
public String getActionListener()
{
- return actionListener;
- }
-
- public String getBackgroundClass()
- {
- return backgroundClass;
- }
-
- public String getColumnClass()
- {
- return columnClass;
+ return _actionListener;
}
/**
- * <p>
- * The height in pixels of a cell in the compact month view
- * </p>
- *
- * @return Returns the compactMonthRowHeight.
+ * @return the compactMonthRowHeight
*/
public String getCompactMonthRowHeight()
{
- return compactMonthRowHeight;
+ return _compactMonthRowHeight;
}
/**
- * <p>
- * The height in pixels of a cell in the compact week view
- * </p>
- *
- * @return Returns the compactWeekRowHeight.
+ * @return the compactWeekRowHeight
*/
public String getCompactWeekRowHeight()
{
- return compactWeekRowHeight;
+ return _compactWeekRowHeight;
}
- /**
- * @see javax.faces.webapp.UIComponentTag#getComponentType()
- */
public String getComponentType()
{
return HtmlSchedule.COMPONENT_TYPE;
}
- public String getContentClass()
+ /**
+ * @return the detailedRowHeight
+ */
+ public String getDetailedRowHeight()
{
- return contentClass;
+ return _detailedRowHeight;
}
- public String getDateClass()
+ /**
+ * @return the enabledOnUserRole
+ */
+ public String getEnabledOnUserRole()
{
- return dateClass;
+ return _enabledOnUserRole;
}
- public String getDayClass()
+ /**
+ * @return the expandToFitEntries
+ */
+ public String getExpandToFitEntries()
{
- return dayClass;
+ return _expandToFitEntries;
}
/**
- * The height in pixels of a cell in the detailed day view
- *
- * @return the detailedRowHeight
+ * @return the headerDateFormat
*/
- public String getDetailedRowHeight()
+ public String getHeaderDateFormat()
{
- return detailedRowHeight;
+ return _headerDateFormat;
}
- public String getEntryClass()
+ /**
+ * @return the immediate
+ */
+ public String getImmediate()
{
- return entryClass;
+ return _immediate;
}
- public String getEntryRenderer()
+ /**
+ * @return the mouseListener
+ */
+ public String getMouseListener()
{
- return entryRenderer;
+ return _mouseListener;
}
- public String getEvenClass()
+ /**
+ * @return the readonly
+ */
+ public String getReadonly()
{
- return evenClass;
+ return _readonly;
}
- public String getForegroundClass()
+ public String getRendererType()
{
- return foregroundClass;
+ return HtmlSchedule.RENDERER_TYPE;
}
- public String getFreeClass()
+ /**
+ * @return the renderZeroLengthEntries
+ */
+ public String getRenderZeroLengthEntries()
{
- return freeClass;
+ return _renderZeroLengthEntries;
}
- public String getGutterClass()
+ /**
+ * @return the submitOnClick
+ */
+ public String getSubmitOnClick()
{
- return gutterClass;
+ return _submitOnClick;
}
- public String getHeaderClass()
+ /**
+ * @return the theme
+ */
+ public String getTheme()
{
- return headerClass;
+ return _theme;
}
/**
- * <p>
- * The dateformat used in the header
- * </p>
- *
- * @return Returns the headerDateFormat.
+ * @return the tooltip
*/
- public String getHeaderDateFormat()
+ public String getTooltip()
{
- return headerDateFormat;
+ return _tooltip;
}
- public String getHolidayClass()
+ /**
+ * @return the visibleEndHour
+ */
+ public String getVisibleEndHour()
{
- return holidayClass;
+ return _visibleEndHour;
}
- public String getHoursClass()
+ /**
+ * @return the visibleOnUserRole
+ */
+ public String getVisibleOnUserRole()
{
- return hoursClass;
+ return _visibleOnUserRole;
}
/**
- * <p>
- * The immediate property of the JSF component
- * </p>
- *
- * @return Returns the immediate.
+ * @return the visibleStartHour
*/
- public String getImmediate()
+ public String getVisibleStartHour()
{
- return immediate;
+ return _visibleStartHour;
}
- public String getInactiveDayClass()
+ /**
+ * @return the workingEndHour
+ */
+ public String getWorkingEndHour()
{
- return inactiveDayClass;
+ return _workingEndHour;
}
- public String getMinutesClass()
+ /**
+ * @return the workingStartHour
+ */
+ public String getWorkingStartHour()
{
- return minutesClass;
+ return _workingStartHour;
}
- public String getMonthClass()
+ public void release() {
+ super.release();
+ //UIScheduleBase properties
+ _compactMonthRowHeight = null;
+ _compactWeekRowHeight = null;
+ _detailedRowHeight = null;
+ _expandToFitEntries = null;
+ _headerDateFormat = null;
+ _immediate = null;
+ _readonly = null;
+ _renderZeroLengthEntries = null;
+ _theme = null;
+ _tooltip = null;
+ _visibleEndHour = null;
+ _visibleStartHour = null;
+ _workingEndHour = null;
+ _workingStartHour = null;
+ _submitOnClick = null;
+ //UISchedule properties
+ _action = null;
+ _actionListener = null;
+ _mouseListener = null;
+ //HtmlSchedule properties
+ _enabledOnUserRole = null;
+ _visibleOnUserRole = null;
+ _backgroundClass = null;
+ _columnClass = null;
+ _contentClass = null;
+ _dateClass = null;
+ _dayClass = null;
+ _entryClass = null;
+ _entryRenderer = null;
+ _evenClass = null;
+ _foregroundClass = null;
+ _freeClass = null;
+ _gutterClass = null;
+ _headerClass = null;
+ _holidayClass = null;
+ _hoursClass = null;
+ _inactiveDayClass = null;
+ _minutesClass = null;
+ _monthClass = null;
+ _selectedClass = null;
+ _selectedEntryClass = null;
+ _subtitleClass = null;
+ _textClass = null;
+ _titleClass = null;
+ _unevenClass = null;
+ _weekClass = null;
+
+ }
+
+ /**
+ * @param action the action to set
+ */
+ public void setAction(String action)
{
- return monthClass;
+ this._action = action;
}
- public String getMouseListener()
+ /**
+ * @param actionListener the actionListener to set
+ */
+ public void setActionListener(String actionListener)
{
- return mouseListener;
+ this._actionListener = actionListener;
}
/**
- * <p>
- * The readonly property of the JSF component
- * </p>
- *
- * @return Returns the readonly.
+ * @param compactMonthRowHeight the compactMonthRowHeight to set
*/
- public String getReadonly()
+ public void setCompactMonthRowHeight(String compactMonthRowHeight)
{
- return readonly;
+ this._compactMonthRowHeight = compactMonthRowHeight;
}
/**
- * <p>
- * Should this component be rendered?
- * </p>
- *
- * @return Returns the rendered.
+ * @param compactWeekRowHeight the compactWeekRowHeight to set
*/
- public String getRendered()
+ public void setCompactWeekRowHeight(String compactWeekRowHeight)
{
- return rendered;
+ this._compactWeekRowHeight = compactWeekRowHeight;
}
/**
- * @see javax.faces.webapp.UIComponentTag#getRendererType()
+ * @param detailedRowHeight the detailedRowHeight to set
*/
- public String getRendererType()
+ public void setDetailedRowHeight(String detailedRowHeight)
{
- return UISchedule.DEFAULT_RENDERER_TYPE;
+ this._detailedRowHeight = detailedRowHeight;
}
- public String getSelectedClass()
+ /**
+ * @param enabledOnUserRole the enabledOnUserRole to set
+ */
+ public void setEnabledOnUserRole(String enabledOnUserRole)
{
- return selectedClass;
+ this._enabledOnUserRole = enabledOnUserRole;
}
- public String getSelectedEntryClass()
+ /**
+ * @param expandToFitEntries the expandToFitEntries to set
+ */
+ public void setExpandToFitEntries(String expandToFitEntries)
{
- return selectedEntryClass;
+ this._expandToFitEntries = expandToFitEntries;
}
/**
- * <p>
- * Should the parent form of this schedule be submitted when the user
- * clicks on a day? Note that this will only work when the readonly
- * property is set to false.
- * </p>
- *
- * @return submit the form on mouse click
+ * @param headerDateFormat the headerDateFormat to set
*/
- public String getSubmitOnClick()
+ public void setHeaderDateFormat(String headerDateFormat)
{
- return submitOnClick;
+ this._headerDateFormat = headerDateFormat;
}
- public String getSubtitleClass()
+ /**
+ * @param immediate the immediate to set
+ */
+ public void setImmediate(String immediate)
{
- return subtitleClass;
+ this._immediate = immediate;
}
- public String getTextClass()
+ /**
+ * @param mouseListener the mouseListener to set
+ */
+ public void setMouseListener(String mouseListener)
{
- return textClass;
+ this._mouseListener = mouseListener;
}
/**
- * <p>
- * The theme of the schedule component. This is the name of the
- * CSS file that should be loaded when rendering the schedule.
- * Possible values are 'default', 'outlookxp', 'evolution'.
- * </p>
- *
- * @return Returns the theme.
+ * @see javax.faces.webapp.UIComponentTag#setProperties
*/
- public String getTheme()
+ protected void setProperties(UIComponent component) {
+ super.setProperties(component);
+ HtmlSchedule schedule = (HtmlSchedule) component;
+ FacesContext context = FacesContext.getCurrentInstance();
+ Application app = context.getApplication();
+ //UIScheduleBase properties
+ setIntegerProperty(component, "compactMonthRowHeight", _compactMonthRowHeight);
+ setIntegerProperty(component, "compactWeekRowHeight", _compactWeekRowHeight);
+ setIntegerProperty(component, "detailedRowHeight", _detailedRowHeight);
+ setBooleanProperty(component, "expandToFitEntries", _expandToFitEntries);
+ setStringProperty(component, "headerDateFormat", _headerDateFormat);
+ setBooleanProperty(component, "immediate", _immediate);
+ setBooleanProperty(component, "readonly", _readonly);
+ setBooleanProperty(component, "renderZeroLengthEntries", _renderZeroLengthEntries);
+ setStringProperty(component, "theme", _theme);
+ setBooleanProperty(component, "tooltip", _tooltip);
+ setIntegerProperty(component, "visibleEndHour", _visibleEndHour);
+ setIntegerProperty(component, "visibleStartHour", _visibleStartHour);
+ setIntegerProperty(component, "workingEndHour", _workingEndHour);
+ setIntegerProperty(component, "workingStartHour", _workingStartHour);
+ setBooleanProperty(component, "submitOnClick", _submitOnClick);
+ //UISchedule properties
+ setActionProperty(component, _action);
+ setActionListenerProperty(component, _actionListener);
+ if (_mouseListener != null)
+ {
+ if (isValueReference(_mouseListener))
+ {
+ MethodBinding mouseListenerBinding = app
+ .createMethodBinding(_mouseListener,
+ new Class[] { ScheduleMouseEvent.class });
+ schedule.setMouseListener(mouseListenerBinding);
+ }
+ else
+ {
+ throw new IllegalArgumentException(
+ "mouseListener property must be a method-binding expression.");
+ }
+ }
+ //HtmlSchedule properties
+ setStringProperty(component, "enabledOnUserRole", _enabledOnUserRole);
+ setStringProperty(component, "visibleOnUserRole", _visibleOnUserRole);
+ setStringProperty(component, "backgroundClass", _backgroundClass);
+ setStringProperty(component, "columnClass", _columnClass);
+ setStringProperty(component, "contentClass", _contentClass);
+ setStringProperty(component, "dateClass", _dateClass);
+ setStringProperty(component, "dayClass", _dayClass);
+ setStringProperty(component, "entryClass", _entryClass);
+ if (_entryRenderer != null)
+ {
+ if (isValueReference(_entryRenderer))
+ {
+ setValueBinding(component, "entryRenderer", _entryRenderer);
+ }
+ }
+ setStringProperty(component, "evenClass", _evenClass);
+ setStringProperty(component, "foregroundClass", _foregroundClass);
+ setStringProperty(component, "freeClass", _freeClass);
+ setStringProperty(component, "gutterClass", _gutterClass);
+ setStringProperty(component, "headerClass", _headerClass);
+ setStringProperty(component, "holidayClass", _holidayClass);
+ setStringProperty(component, "hoursClass", _hoursClass);
+ setStringProperty(component, "inactiveDayClass", _inactiveDayClass);
+ setStringProperty(component, "minutesClass", _minutesClass);
+ setStringProperty(component, "monthClass", _monthClass);
+ setStringProperty(component, "selectedClass", _selectedClass);
+ setStringProperty(component, "selectedEntryClass", _selectedEntryClass);
+ setStringProperty(component, "subtitleClass", _subtitleClass);
+ setStringProperty(component, "textClass", _textClass);
+ setStringProperty(component, "titleClass", _titleClass);
+ setStringProperty(component, "unevenClass", _unevenClass);
+ setStringProperty(component, "weekClass", _weekClass);
+ }
+
+ /**
+ * @param readonly the readonly to set
+ */
+ public void setReadonly(String readonly)
{
- return theme;
+ this._readonly = readonly;
}
- public String getTitleClass()
+ /**
+ * @param renderZeroLengthEntries the renderZeroLengthEntries to set
+ */
+ public void setRenderZeroLengthEntries(String renderZeroLengthEntries)
{
- return titleClass;
+ this._renderZeroLengthEntries = renderZeroLengthEntries;
}
/**
- * <p>
- * Should tooltips be displayed?
- * </p>
- *
- * @return Returns the tooltip.
+ * @param submitOnClick the submitOnClick to set
*/
- public String getTooltip()
+ public void setSubmitOnClick(String submitOnClick)
{
- return tooltip;
+ this._submitOnClick = submitOnClick;
}
- public String getUnevenClass()
+ /**
+ * @param theme the theme to set
+ */
+ public void setTheme(String theme)
{
- return unevenClass;
+ this._theme = theme;
}
/**
- * <p>
- * The value of the JSF component
- * </p>
- *
- * @return Returns the value.
+ * @param tooltip the tooltip to set
*/
- public String getValue()
+ public void setTooltip(String tooltip)
{
- return value;
+ this._tooltip = tooltip;
}
/**
- * <p>
- * The visible end hour of the schedule
- * </p>
- *
- * @return Returns the visibleEndHour.
+ * @param visibleEndHour the visibleEndHour to set
*/
- public String getVisibleEndHour()
+ public void setVisibleEndHour(String visibleEndHour)
{
- return visibleEndHour;
+ this._visibleEndHour = visibleEndHour;
}
/**
- * <p>
- * The visible start hour of the schedule
- * </p>
- *
- * @return Returns the visibleStartHour.
+ * @param visibleOnUserRole the visibleOnUserRole to set
*/
- public String getVisibleStartHour()
+ public void setVisibleOnUserRole(String visibleOnUserRole)
{
- return visibleStartHour;
+ this._visibleOnUserRole = visibleOnUserRole;
}
- public String getWeekClass()
+ /**
+ * @param visibleStartHour the visibleStartHour to set
+ */
+ public void setVisibleStartHour(String visibleStartHour)
{
- return weekClass;
+ this._visibleStartHour = visibleStartHour;
}
/**
- * <p>
- * The working end hour of the schedule
- * </p>
- *
- * @return Returns the workingEndHour.
+ * @param workingEndHour the workingEndHour to set
*/
- public String getWorkingEndHour()
+ public void setWorkingEndHour(String workingEndHour)
{
- return workingEndHour;
+ this._workingEndHour = workingEndHour;
}
/**
- * <p>
- * The working start hour of the schedule
- * </p>
- *
- * @return Returns the workingStartHour.
+ * @param workingStartHour the workingStartHour to set
*/
- public String getWorkingStartHour()
+ public void setWorkingStartHour(String workingStartHour)
{
- return workingStartHour;
+ this._workingStartHour = workingStartHour;
}
/**
- * @see javax.servlet.jsp.tagext.Tag#release()
+ * @return the backgroundClass
*/
- public void release()
+ public String getBackgroundClass()
{
- super.release();
- visibleStartHour = null;
- visibleEndHour = null;
- workingStartHour = null;
- workingEndHour = null;
- headerDateFormat = null;
- value = null;
- immediate = null;
- actionListener = null;
- action = null;
- readonly = null;
- submitOnClick = null;
- mouseListener = null;
- theme = null;
- tooltip = null;
- rendered = null;
- compactMonthRowHeight = null;
- compactWeekRowHeight = null;
- detailedRowHeight = null;
-
- columnClass = null;
- backgroundClass = null;
- freeClass = null;
- evenClass = null;
- unevenClass = null;
- gutterClass = null;
- headerClass = null;
- dateClass = null;
- holidayClass = null;
- hoursClass = null;
- minutesClass = null;
- selectedEntryClass = null;
- textClass = null;
- titleClass = null;
- subtitleClass = null;
- entryClass = null;
- foregroundClass = null;
-
- dayClass = null;
- inactiveDayClass = null;
- contentClass = null;
- selectedClass = null;
- monthClass = null;
- weekClass = null;
-
- entryRenderer = null;
+ return _backgroundClass;
}
/**
- * <p>
- * The action of the JSF component
- * </p>
- *
- * @param action The action to set.
+ * @return the columnClass
*/
- public void setAction(String action)
+ public String getColumnClass()
{
- this.action = action;
+ return _columnClass;
}
/**
- * <p>
- * The actionlistener of the JSF component
- * </p>
- *
- * @param actionListener The actionListener to set.
+ * @return the contentClass
*/
- public void setActionListener(String actionListener)
+ public String getContentClass()
{
- this.actionListener = actionListener;
+ return _contentClass;
}
- public void setBackgroundClass(String backgroundClass)
+ /**
+ * @return the dateClass
+ */
+ public String getDateClass()
{
- this.backgroundClass = backgroundClass;
+ return _dateClass;
}
- public void setColumnClass(String columnClass)
+ /**
+ * @return the dayClass
+ */
+ public String getDayClass()
{
- this.columnClass = columnClass;
+ return _dayClass;
}
/**
- * <p>
- * The height in pixels of a cell in the compact month view
- * </p>
- *
- * @param compactMonthRowHeight The compactMonthRowHeight to set.
+ * @return the entryClass
*/
- public void setCompactMonthRowHeight(String compactMonthRowHeight)
+ public String getEntryClass()
{
- this.compactMonthRowHeight = compactMonthRowHeight;
+ return _entryClass;
}
/**
- * <p>
- * The height in pixels of a cell in the compact week view
- * </p>
- *
- * @param compactWeekRowHeight The compactWeekRowHeight to set.
+ * @return the entryRenderer
*/
- public void setCompactWeekRowHeight(String compactWeekRowHeight)
+ public String getEntryRenderer()
{
- this.compactWeekRowHeight = compactWeekRowHeight;
+ return _entryRenderer;
}
- public void setContentClass(String contentClass)
+ /**
+ * @return the evenClass
+ */
+ public String getEvenClass()
{
- this.contentClass = contentClass;
+ return _evenClass;
}
- public void setDateClass(String dateClass)
+ /**
+ * @return the foregroundClass
+ */
+ public String getForegroundClass()
{
- this.dateClass = dateClass;
+ return _foregroundClass;
}
- public void setDayClass(String dayClass)
+ /**
+ * @return the freeClass
+ */
+ public String getFreeClass()
{
- this.dayClass = dayClass;
+ return _freeClass;
}
/**
- * The height in pixels of a cell in the detailed day view
- *
- * @param detailedRowHeight the detailedRowHeight
+ * @return the gutterClass
*/
- public void setDetailedRowHeight(String detailedRowHeight)
+ public String getGutterClass()
{
- this.detailedRowHeight = detailedRowHeight;
+ return _gutterClass;
}
- public void setEntryClass(String entryClass)
+ /**
+ * @return the headerClass
+ */
+ public String getHeaderClass()
{
- this.entryClass = entryClass;
+ return _headerClass;
}
- public void setEntryRenderer(String entryRenderer)
+ /**
+ * @return the holidayClass
+ */
+ public String getHolidayClass()
{
- this.entryRenderer = entryRenderer;
+ return _holidayClass;
}
- public void setEvenClass(String evenClass)
+ /**
+ * @return the hoursClass
+ */
+ public String getHoursClass()
{
- this.evenClass = evenClass;
+ return _hoursClass;
}
- public void setForegroundClass(String foregroundClass)
+ /**
+ * @return the inactiveDayClass
+ */
+ public String getInactiveDayClass()
{
- this.foregroundClass = foregroundClass;
+ return _inactiveDayClass;
}
- public void setFreeClass(String freeClass)
+ /**
+ * @return the minutesClass
+ */
+ public String getMinutesClass()
{
- this.freeClass = freeClass;
+ return _minutesClass;
}
- public void setGutterClass(String gutterClass)
+ /**
+ * @return the monthClass
+ */
+ public String getMonthClass()
{
- this.gutterClass = gutterClass;
+ return _monthClass;
}
- public void setHeaderClass(String headerClass)
+ /**
+ * @return the selectedClass
+ */
+ public String getSelectedClass()
{
- this.headerClass = headerClass;
+ return _selectedClass;
}
/**
- * <p>
- * The dateformat used in the header
- * </p>
- *
- * @param headerDateFormat The headerDateFormat to set.
+ * @return the selectedEntryClass
*/
- public void setHeaderDateFormat(String headerDateFormat)
+ public String getSelectedEntryClass()
{
- this.headerDateFormat = headerDateFormat;
+ return _selectedEntryClass;
}
- public void setHolidayClass(String holidayClass)
+ /**
+ * @return the subtitleClass
+ */
+ public String getSubtitleClass()
{
- this.holidayClass = holidayClass;
+ return _subtitleClass;
}
- public void setHoursClass(String hoursClass)
+ /**
+ * @return the textClass
+ */
+ public String getTextClass()
{
- this.hoursClass = hoursClass;
+ return _textClass;
}
/**
- * <p>
- * The immediate property of the JSF component
- * </p>
- *
- * @param immediate The immediate to set.
+ * @return the titleClass
*/
- public void setImmediate(String immediate)
+ public String getTitleClass()
{
- this.immediate = immediate;
+ return _titleClass;
}
- public void setInactiveDayClass(String inactiveDayClass)
+ /**
+ * @return the unevenClass
+ */
+ public String getUnevenClass()
{
- this.inactiveDayClass = inactiveDayClass;
+ return _unevenClass;
}
- public void setMinutesClass(String minutesClass)
+ /**
+ * @return the weekClass
+ */
+ public String getWeekClass()
{
- this.minutesClass = minutesClass;
+ return _weekClass;
}
- public void setMonthClass(String monthClass)
+ /**
+ * @param backgroundClass the backgroundClass to set
+ */
+ public void setBackgroundClass(String backgroundClass)
{
- this.monthClass = monthClass;
+ this._backgroundClass = backgroundClass;
}
- public void setMouseListener(String mouseListener)
+ /**
+ * @param columnClass the columnClass to set
+ */
+ public void setColumnClass(String columnClass)
{
- this.mouseListener = mouseListener;
+ this._columnClass = columnClass;
}
/**
- * @see javax.faces.webapp.UIComponentTag#setProperties(javax.faces.component.UIComponent)
+ * @param contentClass the contentClass to set
*/
- protected void setProperties(UIComponent component)
+ public void setContentClass(String contentClass)
{
- super.setProperties(component);
-
- HtmlSchedule schedule = (HtmlSchedule) component;
- FacesContext context = FacesContext.getCurrentInstance();
- Application app = context.getApplication();
-
- if (rendered != null)
- {
- if (isValueReference(rendered))
- {
- schedule.setValueBinding("rendered", app
- .createValueBinding(rendered));
- }
- else
- {
- schedule.setRendered(Boolean.valueOf(rendered).booleanValue());
- }
- }
-
- if (visibleStartHour != null)
- {
- if (isValueReference(visibleStartHour))
- {
- schedule.setValueBinding("visibleStartHour", app
- .createValueBinding(visibleStartHour));
- }
- else
- {
- schedule.setVisibleStartHour(Integer.valueOf(visibleStartHour)
- .intValue());
- }
- }
-
- if (visibleEndHour != null)
- {
- if (isValueReference(visibleEndHour))
- {
- schedule.setValueBinding("visibleEndHour", app
- .createValueBinding(visibleEndHour));
- }
- else
- {
- schedule.setVisibleEndHour(Integer.valueOf(visibleEndHour)
- .intValue());
- }
- }
-
- if (workingStartHour != null)
- {
- if (isValueReference(workingStartHour))
- {
- schedule.setValueBinding("workingStartHour", app
- .createValueBinding(workingStartHour));
- }
- else
- {
- schedule.setWorkingStartHour(Integer.valueOf(workingStartHour)
- .intValue());
- }
- }
-
- if (workingEndHour != null)
- {
- if (isValueReference(workingEndHour))
- {
- schedule.setValueBinding("workingEndHour", app
- .createValueBinding(workingEndHour));
- }
- else
- {
- schedule.setWorkingEndHour(Integer.valueOf(workingEndHour)
- .intValue());
- }
- }
-
- if (immediate != null)
- {
- if (isValueReference(immediate))
- {
- schedule.setValueBinding("immediate", app
- .createValueBinding(immediate));
- }
- else
- {
- schedule
- .setImmediate(Boolean.valueOf(immediate).booleanValue());
- }
- }
-
- if (readonly != null)
- {
- if (isValueReference(readonly))
- {
- schedule.setValueBinding("readonly", app
- .createValueBinding(readonly));
- }
- else
- {
- schedule.setReadonly(Boolean.valueOf(readonly).booleanValue());
- }
- }
-
- if (submitOnClick != null)
- {
- if (isValueReference(submitOnClick))
- {
- schedule.setValueBinding("submitOnClick", app
- .createValueBinding(submitOnClick));
- }
- else
- {
- schedule.setSubmitOnClick(Boolean.valueOf(submitOnClick)
- .booleanValue());
- }
- }
-
- if (mouseListener != null)
- {
- if (isValueReference(mouseListener))
- {
- MethodBinding mouseListenerBinding = app
- .createMethodBinding(mouseListener,
- new Class[] { ScheduleMouseEvent.class });
- schedule.setMouseListener(mouseListenerBinding);
- }
- else
- {
- throw new IllegalArgumentException(
- "mouseListener property must be a method-binding expression.");
- }
- }
-
- if (actionListener != null)
- {
- if (isValueReference(actionListener))
- {
- MethodBinding actionListenerBinding = app.createMethodBinding(
- actionListener, new Class[] { ActionEvent.class });
- schedule.setActionListener(actionListenerBinding);
- }
- else
- {
- throw new IllegalArgumentException(
- "actionListener property must be a method-binding expression.");
- }
- }
-
- if (action != null)
- {
- if (isValueReference(action))
- {
- MethodBinding actionBinding = app.createMethodBinding(action,
- null);
- schedule.setAction(actionBinding);
- }
- else
- {
- throw new IllegalArgumentException(
- "action property must be a method-binding expression.");
- }
- }
-
- if ((value != null) && isValueReference(value))
- {
- schedule.setValueBinding("value", app.createValueBinding(value));
- }
- else
- {
- throw new IllegalArgumentException(
- "The value property must be a value binding expression that points to a SimpleScheduleModel object.");
- }
-
- if (entryRenderer != null && isValueReference(entryRenderer))
- {
- schedule.setValueBinding("entryRenderer", app.createValueBinding(entryRenderer));
- }
- else if (entryRenderer != null)
- {
- throw new IllegalArgumentException("The entryRenderer property must be a value binding expression that point to a ScheduleEntryRenderer instance");
- }
-
- addAttribute(app, schedule, "headerDateFormat", headerDateFormat);
- addAttribute(app, schedule, "theme", theme);
- addAttribute(app, schedule, "tooltip", tooltip);
- addAttribute(app, schedule, "compactWeekRowHeight",
- compactWeekRowHeight);
- addAttribute(app, schedule, "compactMonthRowHeight",
- compactMonthRowHeight);
- addAttribute(app, schedule, "detailedRowHeight", detailedRowHeight);
- addAttribute(app, schedule, "column", columnClass);
- addAttribute(app, schedule, "background", backgroundClass);
- addAttribute(app, schedule, "free", freeClass);
- addAttribute(app, schedule, "even", evenClass);
- addAttribute(app, schedule, "uneven", unevenClass);
- addAttribute(app, schedule, "gutter", gutterClass);
- addAttribute(app, schedule, "header", headerClass);
- addAttribute(app, schedule, "date", dateClass);
- addAttribute(app, schedule, "holiday", holidayClass);
- addAttribute(app, schedule, "hours", hoursClass);
- addAttribute(app, schedule, "minutes", minutesClass);
- addAttribute(app, schedule, "entry-selected", selectedEntryClass);
- addAttribute(app, schedule, "text", textClass);
- addAttribute(app, schedule, "title", titleClass);
- addAttribute(app, schedule, "subtitle", subtitleClass);
- addAttribute(app, schedule, "entry", entryClass);
- addAttribute(app, schedule, "foreground", foregroundClass);
-
- addAttribute(app, schedule, "day", dayClass);
- addAttribute(app, schedule, "inactive-day", inactiveDayClass);
- addAttribute(app, schedule, "content", contentClass);
- addAttribute(app, schedule, "selected", selectedClass);
- addAttribute(app, schedule, "month", monthClass);
- addAttribute(app, schedule, "week", weekClass);
-
- addAttribute(app, schedule, "renderZeroLengthEntries", renderZeroLengthEntries);
- addAttribute(app, schedule, "expandToFitEntries", expandToFitEntries);
+ this._contentClass = contentClass;
}
/**
- * <p>
- * The readonly property of the JSF component
- * </p>
- *
- * @param readonly The readonly to set.
+ * @param dateClass the dateClass to set
*/
- public void setReadonly(String readonly)
+ public void setDateClass(String dateClass)
{
- this.readonly = readonly;
+ this._dateClass = dateClass;
}
/**
- * <p>
- * Should this component be rendered?
- * </p>
- *
- * @param rendered The rendered to set.
+ * @param dayClass the dayClass to set
*/
- public void setRendered(String rendered)
+ public void setDayClass(String dayClass)
{
- this.rendered = rendered;
+ this._dayClass = dayClass;
}
- public void setSelectedClass(String selectedClass)
+ /**
+ * @param entryClass the entryClass to set
+ */
+ public void setEntryClass(String entryClass)
{
- this.selectedClass = selectedClass;
+ this._entryClass = entryClass;
}
- public void setSelectedEntryClass(String selectedEntryClass)
+ /**
+ * @param entryRenderer the entryRenderer to set
+ */
+ public void setEntryRenderer(String entryRenderer)
{
- this.selectedEntryClass = selectedEntryClass;
+ this._entryRenderer = entryRenderer;
}
/**
- * <p>
- * Should the parent form of this schedule be submitted when the user
- * clicks on a day? Note that this will only work when the readonly
- * property is set to false.
- * </p>
- *
- * @param submitOnClick submit the form on mouse click
+ * @param evenClass the evenClass to set
*/
- public void setSubmitOnClick(String submitOnClick)
+ public void setEvenClass(String evenClass)
{
- this.submitOnClick = submitOnClick;
+ this._evenClass = evenClass;
}
- public void setSubtitleClass(String subtitleClass)
+ /**
+ * @param foregroundClass the foregroundClass to set
+ */
+ public void setForegroundClass(String foregroundClass)
{
- this.subtitleClass = subtitleClass;
+ this._foregroundClass = foregroundClass;
}
- public void setTextClass(String textClass)
+ /**
+ * @param freeClass the freeClass to set
+ */
+ public void setFreeClass(String freeClass)
{
- this.textClass = textClass;
+ this._freeClass = freeClass;
}
/**
- * <p>
- * The theme of the schedule component. This is the name of the
- * CSS file that should be loaded when rendering the schedule.
- * Possible values are 'default', 'outlookxp', 'evolution'.
- * </p>
- *
- * @param theme The theme to set.
+ * @param gutterClass the gutterClass to set
*/
- public void setTheme(String theme)
+ public void setGutterClass(String gutterClass)
{
- this.theme = theme;
+ this._gutterClass = gutterClass;
}
- public void setTitleClass(String titleClass)
+ /**
+ * @param headerClass the headerClass to set
+ */
+ public void setHeaderClass(String headerClass)
{
- this.titleClass = titleClass;
+ this._headerClass = headerClass;
}
/**
- * <p>
- * Should tooltips be displayed?
- * </p>
- *
- * @param tooltip The tooltip to set.
+ * @param holidayClass the holidayClass to set
*/
- public void setTooltip(String tooltip)
+ public void setHolidayClass(String holidayClass)
{
- this.tooltip = tooltip;
+ this._holidayClass = holidayClass;
}
- public void setUnevenClass(String unevenClass)
+ /**
+ * @param hoursClass the hoursClass to set
+ */
+ public void setHoursClass(String hoursClass)
{
- this.unevenClass = unevenClass;
+ this._hoursClass = hoursClass;
}
/**
- * <p>
- * The value of the JSF component
- * </p>
- *
- * @param value The value to set.
+ * @param inactiveDayClass the inactiveDayClass to set
*/
- public void setValue(String value)
+ public void setInactiveDayClass(String inactiveDayClass)
{
- this.value = value;
+ this._inactiveDayClass = inactiveDayClass;
}
/**
- * <p>
- * The visible end hour of the schedule
- * </p>
- *
- * @param visibleEndHour The visibleEndHour to set.
+ * @param minutesClass the minutesClass to set
*/
- public void setVisibleEndHour(String visibleEndHour)
+ public void setMinutesClass(String minutesClass)
{
- this.visibleEndHour = visibleEndHour;
+ this._minutesClass = minutesClass;
}
/**
- * <p>
- * The visible start hour of the schedule
- * </p>
- *
- * @param visibleStartHour The visibleStartHour to set.
+ * @param monthClass the monthClass to set
*/
- public void setVisibleStartHour(String visibleStartHour)
+ public void setMonthClass(String monthClass)
{
- this.visibleStartHour = visibleStartHour;
+ this._monthClass = monthClass;
}
- public void setWeekClass(String weekClass)
+ /**
+ * @param selectedClass the selectedClass to set
+ */
+ public void setSelectedClass(String selectedClass)
{
- this.weekClass = weekClass;
+ this._selectedClass = selectedClass;
}
/**
- * <p>
- * The working end hour of the schedule
- * </p>
- *
- * @param workingEndHour The workingEndHour to set.
+ * @param selectedEntryClass the selectedEntryClass to set
*/
- public void setWorkingEndHour(String workingEndHour)
+ public void setSelectedEntryClass(String selectedEntryClass)
{
- this.workingEndHour = workingEndHour;
+ this._selectedEntryClass = selectedEntryClass;
}
/**
- * <p>
- * The working start hour of the schedule
- * </p>
- *
- * @param workingStartHour The workingStartHour to set.
+ * @param subtitleClass the subtitleClass to set
*/
- public void setWorkingStartHour(String workingStartHour)
+ public void setSubtitleClass(String subtitleClass)
{
- this.workingStartHour = workingStartHour;
+ this._subtitleClass = subtitleClass;
}
/**
- * <p>
- * When the start- and endtime of an entry are the same, should the entry
- * be rendered, fitting the entry box to the text?
- * </p>
- *
- * @return rendered or not
+ * @param textClass the textClass to set
*/
- public String getRenderZeroLengthEntries()
+ public void setTextClass(String textClass)
{
- return renderZeroLengthEntries;
+ this._textClass = textClass;
}
/**
- * <p>
- * When the start- and endtime of an entry are the same, should the entry
- * be rendered, fitting the entry box to the text?
- * </p>
- *
- * @param render
+ * @param titleClass the titleClass to set
*/
- public void setRenderZeroLengthEntries(String render)
+ public void setTitleClass(String titleClass)
{
- this.renderZeroLengthEntries = render;
+ this._titleClass = titleClass;
}
/**
- * <p>
- * By default, if an appointment exists outside the
- * visibleStartHour/visibleEndHour limits, it does not appear in the day
- * or workweek modes. This setting checks for events outside
- * the visible range and extends the visible range to display the events.
- * If events only occur within the visible range, then no adjustment is made.
- * </p>
- *
- * @return Returns the expandToFitEntries.
+ * @param unevenClass the unevenClass to set
*/
- public String getExpandToFitEntries()
+ public void setUnevenClass(String unevenClass)
{
- return expandToFitEntries;
+ this._unevenClass = unevenClass;
}
/**
- * <p>
- * By default, if an appointment exists outside the
- * visibleStartHour/visibleEndHour limits, it does not appear in the day
- * or workweek modes. This setting checks for events outside
- * the visible range and extends the visible range to display the events.
- * If events only occur within the visible range, then no adjustment is made.
- * </p>
- *
- * @param expandToFitEntries The expandToFitEntries to set.
+ * @param weekClass the weekClass to set
*/
- public void setExpandToFitEntries(String expandToFitEntries)
+ public void setWeekClass(String weekClass)
{
- this.expandToFitEntries = expandToFitEntries;
+ this._weekClass = weekClass;
}
}
-//The End
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UISchedule.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UISchedule.java?view=diff&rev=548528&r1=548527&r2=548528
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UISchedule.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UISchedule.java Mon Jun 18 16:16:17 2007
@@ -16,17 +16,14 @@
* specific language governing permissions and limitations
* under the License.
*/
-
package org.apache.myfaces.custom.schedule;
import java.io.Serializable;
+import java.util.Date;
import java.util.Iterator;
import javax.faces.component.ActionSource;
-import javax.faces.component.UIComponentBase;
-import javax.faces.component.ValueHolder;
import javax.faces.context.FacesContext;
-import javax.faces.convert.Converter;
import javax.faces.el.MethodBinding;
import javax.faces.event.AbortProcessingException;
import javax.faces.event.ActionEvent;
@@ -36,24 +33,17 @@
import org.apache.myfaces.custom.schedule.model.ScheduleDay;
import org.apache.myfaces.custom.schedule.model.ScheduleEntry;
-import org.apache.myfaces.custom.schedule.model.ScheduleModel;
-import org.apache.myfaces.custom.schedule.model.SimpleScheduleModel;
-import org.apache.myfaces.custom.schedule.util.ScheduleUtil;
/**
- * <p>
- * A schedule component similar to the ones found in Outlook or Evolution
- * </p>
- *
- * @author Jurgen Lust (latest modification by $Author: jlust $)
- * @author Bruno Aranda (adaptation of Jurgen code to myfaces)
- * @version $Revision: 392301 $
+ * This class contains all 'interactive' stuff for the Schedule component, meaning
+ * actions and actionListeners.
+ *
+ * @author Jurgen Lust
+ * @version $Revision$
*/
-public class UISchedule extends UIComponentBase implements ValueHolder,
+public class UISchedule extends UIScheduleBase implements
Serializable, ActionSource
{
- private static final long serialVersionUID = 3440822180568539483L;
-
private class ScheduleActionListener implements ActionListener
{
//~ Methods ------------------------------------------------------------
@@ -76,76 +66,68 @@
}
}
}
- public static final String COMPONENT_FAMILY = "javax.faces.Panel";
- //~ Static fields/initializers ---------------------------------------------
- public static final String COMPONENT_TYPE = "org.apache.myfaces.Schedule";
-
- //~ Instance fields --------------------------------------------------------
-
- public static final String DEFAULT_RENDERER_TYPE = "org.apache.myfaces.Schedule";
- private MethodBinding actionBinding;
- private MethodBinding actionListenerBinding;
- private Converter converter;
- private Boolean immediate;
- private Boolean readonly;
- private ScheduleActionListener scheduleListener;
- private ScheduleEntry submittedEntry;
- private Object value;
- private Integer visibleEndHour;
- private Integer visibleStartHour;
- private Integer workingEndHour;
-
- //~ Constructors -----------------------------------------------------------
+
+ private static final long serialVersionUID = -8333458172939036755L;
+ private MethodBinding _action;
+ private MethodBinding _actionListener;
+ private ScheduleActionListener _scheduleListener;
+ private ScheduleEntry _submittedEntry;
+ private Date _lastClickedDateAndTime = null;
+
- private Integer workingStartHour;
+ private MethodBinding _mouseListener = null;
- //~ Methods ----------------------------------------------------------------
-
- /**
- * Creates a new UISchedule object.
- */
public UISchedule()
{
super();
- setRendererType(DEFAULT_RENDERER_TYPE);
- scheduleListener = new ScheduleActionListener();
- addActionListener(scheduleListener);
+ _scheduleListener = new ScheduleActionListener();
+ addActionListener(_scheduleListener);
}
- /**
- * @see javax.faces.component.ActionSource#addActionListener(javax.faces.event.ActionListener)
- */
public void addActionListener(ActionListener listener)
{
addFacesListener(listener);
}
+
/**
* @see javax.faces.component.UIComponent#broadcast(javax.faces.event.FacesEvent)
*/
public void broadcast(FacesEvent event) throws AbortProcessingException
{
+ FacesContext context = getFacesContext();
+ //invoke the mouselistener first
+ if (event instanceof ScheduleMouseEvent)
+ {
+ ScheduleMouseEvent mouseEvent = (ScheduleMouseEvent) event;
+ MethodBinding mouseListener = getMouseListener();
+
+ if (mouseListener != null)
+ {
+ mouseListener.invoke(context,
+ new Object[] { mouseEvent });
+ }
+ }
+
+ //then invode any other listeners
super.broadcast(event);
- FacesContext context = getFacesContext();
- MethodBinding actionListenerBinding = getActionListener();
+ MethodBinding actionListener = getActionListener();
- if (actionListenerBinding != null)
+ if (actionListener != null)
{
- actionListenerBinding.invoke(context, new Object[] { event });
+ actionListener.invoke(context, new Object[] { event });
}
}
/**
- * <p>
* Find the entry with the given id
- * </p>
*
* @param id the id
*
* @return the entry
*/
- public ScheduleEntry findEntry(String id)
+ protected ScheduleEntry findEntry(String id)
{
if (id == null)
{
@@ -171,173 +153,46 @@
return null;
}
- /**
- * @see javax.faces.component.ActionSource#getAction()
- */
public MethodBinding getAction()
{
- return actionBinding;
+ return _action;
}
- /**
- * @see javax.faces.component.ActionSource#getActionListener()
- */
public MethodBinding getActionListener()
{
- return actionListenerBinding;
+ return _actionListener;
}
- /**
- * @see javax.faces.component.ActionSource#getActionListeners()
- */
public ActionListener[] getActionListeners()
{
return (ActionListener[]) getFacesListeners(ActionListener.class);
}
/**
- * @see javax.faces.component.ValueHolder#getConverter()
- */
- public Converter getConverter()
- {
- return converter;
- }
-
- /**
- * @see javax.faces.component.UIComponent#getFamily()
- */
- public String getFamily()
- {
- return COMPONENT_FAMILY;
- }
-
- /**
- * @see javax.faces.component.ValueHolder#getLocalValue()
- */
- public Object getLocalValue()
- {
- return value;
- }
-
- /**
- * <p>
- * The underlying model
- * </p>
- *
- * @return Returns the model.
- */
- public ScheduleModel getModel()
- {
- if (getValue() instanceof ScheduleModel)
- {
- return (ScheduleModel) getValue();
- }
- else
- {
- return new SimpleScheduleModel();
- }
- }
-
- /**
- * @see javax.faces.component.UIComponent#getRendersChildren()
- */
- public boolean getRendersChildren()
- {
- return true;
- }
-
- /**
- * <p>
- * The entry that was submitted on the last request
- * </p>
- *
- * @return Returns the submittedEntry.
- */
- public ScheduleEntry getSubmittedEntry()
- {
- return submittedEntry;
- }
-
- /**
- * @see javax.faces.component.ValueHolder#getValue()
- */
- public Object getValue()
- {
- return ScheduleUtil.getObjectProperty(this, value, "value", value);
- }
-
- /**
- * <p>
- * The last visible hour of the day
- * </p>
- *
- * @return Returns the visibleEndHour.
- */
- public int getVisibleEndHour()
- {
- return ScheduleUtil.getIntegerProperty(this, visibleEndHour,
- "visibleEndHour", 22);
- }
-
- /**
- * <p>
- * The first visible hour of the day
- * </p>
- *
- * @return Returns the visibleStartHour.
- */
- public int getVisibleStartHour()
- {
- return ScheduleUtil.getIntegerProperty(this, visibleStartHour,
- "visibleStartHour", 8);
- }
-
- /**
- * <p>
- * The last hour of the working day
- * </p>
- *
- * @return Returns the workingEndHour.
- */
- public int getWorkingEndHour()
- {
- return ScheduleUtil.getIntegerProperty(this, workingEndHour,
- "workingEndHour", 17);
- }
-
- /**
- * <p>
- * The first hour of the working day
- * </p>
- *
- * @return Returns the workingStartHour.
+ * The last date and time of day that was clicked. This is set when
+ * submitOnClick is true, and the schedule is clicked by the user.
+ *
+ * @return the last clicked date and time
*/
- public int getWorkingStartHour()
+ public Date getLastClickedDateAndTime()
{
- return ScheduleUtil.getIntegerProperty(this, workingStartHour,
- "workingStartHour", 9);
+ return _lastClickedDateAndTime;
}
/**
- * @see javax.faces.component.ActionSource#isImmediate()
+ * @return the method binding to the mouse listener method
*/
- public boolean isImmediate()
+ public MethodBinding getMouseListener()
{
- return ScheduleUtil.getBooleanProperty(this, immediate, "immediate",
- false);
+ return _mouseListener;
}
/**
- * <p>
- * is this component read-only?
- * </p>
- *
- * @return is this component read-only
+ * @return the submittedEntry
*/
- public boolean isReadonly()
+ protected ScheduleEntry getSubmittedEntry()
{
- return ScheduleUtil.getBooleanProperty(this, readonly, "readonly",
- false);
+ return _submittedEntry;
}
/**
@@ -345,7 +200,7 @@
*/
public void queueEvent(FacesEvent event)
{
- if (event instanceof ActionEvent)
+ if (event instanceof ActionEvent || event instanceof ScheduleMouseEvent)
{
if (isImmediate())
{
@@ -360,194 +215,93 @@
super.queueEvent(event);
}
- /**
- * @see javax.faces.component.ActionSource#removeActionListener(javax.faces.event.ActionListener)
- */
public void removeActionListener(ActionListener listener)
{
removeFacesListener(listener);
}
/**
- * @see javax.faces.component.StateHolder#restoreState(javax.faces.context.FacesContext,
- * java.lang.Object)
+ * This method is invoked at the beginning of the restore view phase,
+ * resetting all mouse event variables that were left from the previous
+ * request
+ */
+ protected void resetMouseEvents()
+ {
+ this._lastClickedDateAndTime = null;
+ }
+
+ /**
+ * @see org.apache.myfaces.custom.schedule.UIScheduleBase#restoreState(javax.faces.context.FacesContext, java.lang.Object)
*/
public void restoreState(FacesContext context, Object state)
{
Object[] values = (Object[]) state;
super.restoreState(context, values[0]);
- visibleStartHour = (Integer) values[1];
- visibleEndHour = (Integer) values[2];
- workingStartHour = (Integer) values[3];
- workingEndHour = (Integer) values[4];
-
- Boolean immediateState = (Boolean) values[5];
-
- if (immediateState != null)
- {
- setImmediate(immediateState.booleanValue());
- }
-
- Boolean readonlyState = (Boolean) values[6];
-
- if (readonlyState != null)
- {
- setReadonly(readonlyState.booleanValue());
- }
-
- value = values[7];
- actionListenerBinding = (MethodBinding) restoreAttachedState(context,
- values[8]);
- actionBinding = (MethodBinding) restoreAttachedState(context, values[9]);
- addActionListener(scheduleListener);
+ _lastClickedDateAndTime = (Date) values[1];
+ _actionListener = (MethodBinding) restoreAttachedState(context,
+ values[2]);
+ _action = (MethodBinding) restoreAttachedState(context, values[3]);
+ _mouseListener = (MethodBinding) restoreAttachedState(context, values[4]);
+ addActionListener(_scheduleListener);
}
-
+
/**
- * @see javax.faces.component.StateHolder#saveState(javax.faces.context.FacesContext)
+ * @see org.apache.myfaces.custom.schedule.UIScheduleBase#saveState(javax.faces.context.FacesContext)
*/
public Object saveState(FacesContext context)
{
- removeActionListener(scheduleListener);
+ removeActionListener(_scheduleListener);
- Object[] values = new Object[10];
+ Object[] values = new Object[5];
values[0] = super.saveState(context);
- values[1] = visibleStartHour;
- values[2] = visibleEndHour;
- values[3] = workingStartHour;
- values[4] = workingEndHour;
- values[5] = immediate;
- values[6] = readonly;
- values[7] = value;
- values[8] = saveAttachedState(context, actionListenerBinding);
- values[9] = saveAttachedState(context, actionBinding);
-
+ values[1] = _lastClickedDateAndTime;
+ values[2] = saveAttachedState(context, _actionListener);
+ values[3] = saveAttachedState(context, _action);
+ values[4] = saveAttachedState(context, _mouseListener);
+
return values;
}
- /**
- * @see javax.faces.component.ActionSource#setAction(javax.faces.el.MethodBinding)
- */
- public void setAction(MethodBinding action)
- {
- this.actionBinding = action;
- }
-
- /**
- * @see javax.faces.component.ActionSource#setActionListener(javax.faces.el.MethodBinding)
- */
- public void setActionListener(MethodBinding listener)
- {
- this.actionListenerBinding = listener;
- }
+
- /**
- * @see javax.faces.component.ValueHolder#setConverter(javax.faces.convert.Converter)
- */
- public void setConverter(Converter converter)
- {
- this.converter = converter;
- }
-
- /**
- * @see javax.faces.component.ActionSource#setImmediate(boolean)
- */
- public void setImmediate(boolean immediate)
- {
- this.immediate = Boolean.valueOf(immediate);
- }
-
- /**
- * <p>
- * The underlying model
- * </p>
- *
- * @param model The model to set.
- */
- public void setModel(ScheduleModel model)
- {
- setValue(model);
- }
-
- /**
- * <p>
- * is this component read-only?
- * </p>
- *
- * @param readonly is this component read-only
- */
- public void setReadonly(boolean readonly)
- {
- this.readonly = Boolean.valueOf(readonly);
- }
-
- /**
- * <p>
- * The entry that was submitted on the last request
- * </p>
- *
- * @param submittedEntry The submittedEntry to set.
- */
- public void setSubmittedEntry(ScheduleEntry submittedEntry)
+ public void setAction(MethodBinding action)
{
- this.submittedEntry = submittedEntry;
+ this._action = action;
}
- /**
- * @see javax.faces.component.ValueHolder#setValue(java.lang.Object)
- */
- public void setValue(Object value)
+ public void setActionListener(MethodBinding actionListener)
{
- this.value = value;
+ this._actionListener = actionListener;
}
+
+
/**
- * <p>
- * The last visible hour of the day
- * </p>
- *
- * @param visibleEndHour The visibleEndHour to set.
+ * The last date and time of day that was clicked. This is set when
+ * submitOnClick is true, and the schedule is clicked by the user.
+ *
+ * @return the last clicked date and time
*/
- public void setVisibleEndHour(int visibleEndHour)
+ protected void setLastClickedDateAndTime(Date lastClickedDateAndTime)
{
- this.visibleEndHour = new Integer(visibleEndHour);
+ this._lastClickedDateAndTime = lastClickedDateAndTime;
}
- /**
- * <p>
- * The first visible hour of the day
- * </p>
- *
- * @param visibleStartHour The visibleStartHour to set.
- */
- public void setVisibleStartHour(int visibleStartHour)
- {
- this.visibleStartHour = new Integer(visibleStartHour);
- }
/**
- * <p>
- * The last hour of the working day
- * </p>
- *
- * @param workingEndHour The workingEndHour to set.
+ * @param listener the method binding to the mouse listener method
*/
- public void setWorkingEndHour(int workingEndHour)
+ public void setMouseListener(MethodBinding listener)
{
- this.workingEndHour = new Integer(workingEndHour);
+ _mouseListener = listener;
}
- //~ Inner Classes ----------------------------------------------------------
-
/**
- * <p>
- * The first hour of the working day
- * </p>
- *
- * @param workingStartHour The workingStartHour to set.
+ * @param submittedEntry the submittedEntry to set
*/
- public void setWorkingStartHour(int workingStartHour)
+ protected void setSubmittedEntry(ScheduleEntry submittedEntry)
{
- this.workingStartHour = new Integer(workingStartHour);
+ this._submittedEntry = submittedEntry;
}
+
}
-//The End
Added: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UIScheduleBase.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UIScheduleBase.java?view=auto&rev=548528
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UIScheduleBase.java (added)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/UIScheduleBase.java Mon Jun 18 16:16:17 2007
@@ -0,0 +1,486 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.custom.schedule;
+
+import java.io.Serializable;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+
+import org.apache.myfaces.custom.schedule.model.ScheduleModel;
+import org.apache.myfaces.custom.schedule.model.SimpleScheduleModel;
+import org.apache.myfaces.custom.schedule.util.ScheduleUtil;
+
+/**
+ * Base class for the Schedule component. This class contains all the properties
+ * for the schedule, but not the ActionSource stuff. Keeping these things separate
+ * should make the code a little easier to digest.
+ *
+ * @author Jurgen Lust
+ * @version $Revision$
+ */
+public class UIScheduleBase extends UIComponentBase implements ValueHolder,
+ Serializable
+{
+ private static final long serialVersionUID = 5702081384947086911L;
+
+ public static final String COMPONENT_FAMILY = "javax.faces.Panel";
+ public static final String COMPONENT_TYPE = "org.apache.myfaces.Schedule";
+ public static final String RENDERER_TYPE = "org.apache.myfaces.Schedule";
+
+ protected static final int DEFAULT_COMPACT_MONTH_ROWHEIGHT = 120;
+ protected static final int DEFAULT_COMPACT_WEEK_ROWHEIGHT = 200;
+ protected static final int DEFAULT_DETAILED_ROWHEIGHT = 22;
+ protected static final boolean DEFAULT_EXPAND_TO_FIT = false;
+ protected static final String DEFAULT_HEADER_DATE_FORMAT = null;
+ protected static final boolean DEFAULT_IMMEDIATE = false;
+ protected static final boolean DEFAULT_READONLY = false;
+ protected static final boolean DEFAULT_RENDER_ZEROLENGTH = false;
+ protected static final String DEFAULT_THEME = "default";
+ protected static final boolean DEFAULT_TOOLTIP = false;
+ protected static final int DEFAULT_VISIBLE_END_HOUR = 20;
+ protected static final int DEFAULT_VISIBLE_START_HOUR = 8;
+ protected static final int DEFAULT_WORKING_END_HOUR = 17;
+ protected static final int DEFAULT_WORKING_START_HOUR = 9;
+ protected static final String DEFAULT_ENABLED_ON_USER_ROLE = null;
+ protected static final boolean DEFAULT_SUBMIT_ON_CLICK = false;
+ protected static final String DEFAULT_VISIBLE_ON_USER_ROLE = null;
+
+ private Integer _compactMonthRowHeight;
+ private Integer _compactWeekRowHeight;
+ private Converter _converter;
+ private Integer _detailedRowHeight;
+ private Boolean _expandToFitEntries;
+ private String _headerDateFormat;
+ private Boolean _immediate;
+ private Boolean _readonly;
+ private Boolean _renderZeroLengthEntries;
+ private String _theme;
+ private Boolean _tooltip;
+ private Object _value;
+ private Integer _visibleEndHour;
+ private Integer _visibleStartHour;
+ private Integer _workingEndHour;
+ private Integer _workingStartHour;
+ private Boolean _submitOnClick = null;
+
+ /**
+ * Should the parent form of this schedule be submitted when the user
+ * clicks on a day? Note that this will only work when the readonly
+ * property is set to false.
+ *
+ * @return the _submitOnClick
+ */
+ public boolean isSubmitOnClick()
+ {
+ return ScheduleUtil.getBooleanProperty(this, _submitOnClick, "submitOnClick", DEFAULT_SUBMIT_ON_CLICK);
+ }
+
+ /**
+ * @param submitOnClick the _submitOnClick to set
+ */
+ public void setSubmitOnClick(boolean submitOnClick)
+ {
+ _submitOnClick = Boolean.valueOf(submitOnClick);
+ }
+
+ public UIScheduleBase()
+ {
+ super();
+ setRendererType(RENDERER_TYPE);
+ }
+
+ /**
+ * @return the compactMonthRowHeight
+ */
+ public int getCompactMonthRowHeight()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _compactMonthRowHeight,
+ "compactMonthRowHeight", DEFAULT_COMPACT_MONTH_ROWHEIGHT);
+ }
+
+ /**
+ * @return the compactWeekRowHeight
+ */
+ public int getCompactWeekRowHeight()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _compactWeekRowHeight,
+ "compactWeekRowHeight", DEFAULT_COMPACT_WEEK_ROWHEIGHT);
+ }
+
+ /**
+ * @see javax.faces.component.ValueHolder#getConverter()
+ */
+ public Converter getConverter()
+ {
+ return _converter;
+ }
+
+ /**
+ * @return the detailedRowHeight
+ */
+ public int getDetailedRowHeight()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _detailedRowHeight,
+ "detailedRowHeight", DEFAULT_DETAILED_ROWHEIGHT);
+ }
+
+ /**
+ * @return the expandToFitEntries
+ */
+ public boolean isExpandToFitEntries()
+ {
+ return ScheduleUtil.getBooleanProperty(this, _expandToFitEntries,
+ "expandToFitEntries", DEFAULT_EXPAND_TO_FIT);
+ }
+
+ /**
+ * @see javax.faces.component.UIComponent#getFamily()
+ */
+ public String getFamily()
+ {
+ return COMPONENT_FAMILY;
+ }
+
+ /**
+ * @return the headerDateFormat
+ */
+ public String getHeaderDateFormat()
+ {
+ return ScheduleUtil.getStringProperty(this, _headerDateFormat,
+ "headerDateFormat", DEFAULT_HEADER_DATE_FORMAT);
+ }
+
+ /**
+ * @return the immediate
+ */
+ public boolean isImmediate()
+ {
+ return ScheduleUtil.getBooleanProperty(this, _immediate, "immediate",
+ DEFAULT_IMMEDIATE);
+ }
+
+ /**
+ * @see javax.faces.component.ValueHolder#getLocalValue()
+ */
+ public Object getLocalValue()
+ {
+ return _value;
+ }
+
+ /**
+ * The underlying model
+ *
+ * @return Returns the model.
+ */
+ public ScheduleModel getModel()
+ {
+ if (getValue() instanceof ScheduleModel)
+ {
+ return (ScheduleModel) getValue();
+ }
+ else
+ {
+ return new SimpleScheduleModel();
+ }
+ }
+
+ /**
+ * @return the readonly
+ */
+ public boolean isReadonly()
+ {
+ return ScheduleUtil.getBooleanProperty(this, _readonly, "readonly",
+ DEFAULT_READONLY);
+ }
+
+ /**
+ * @see javax.faces.component.UIComponentBase#getRendersChildren()
+ */
+ public boolean isRendersChildren()
+ {
+ return true;
+ }
+
+ /**
+ * @return the renderZeroLengthEntries
+ */
+ public boolean isRenderZeroLengthEntries()
+ {
+ return ScheduleUtil.getBooleanProperty(this, _renderZeroLengthEntries,
+ "renderZeroLengthEntries", DEFAULT_RENDER_ZEROLENGTH);
+ }
+
+ /**
+ * @return the theme
+ */
+ public String getTheme()
+ {
+ return ScheduleUtil.getStringProperty(this, _theme, "theme",
+ DEFAULT_THEME);
+ }
+
+ /**
+ * @return the tooltip
+ */
+ public boolean isTooltip()
+ {
+ return ScheduleUtil.getBooleanProperty(this, _tooltip, "tooltip",
+ DEFAULT_TOOLTIP);
+ }
+
+ /**
+ * @see javax.faces.component.ValueHolder#getValue()
+ */
+ public Object getValue()
+ {
+ return ScheduleUtil.getObjectProperty(this, _value, "value", _value);
+ }
+
+ /**
+ * @return the visibleEndHour
+ */
+ public int getVisibleEndHour()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _visibleEndHour,
+ "visibleEndHour", DEFAULT_VISIBLE_END_HOUR);
+ }
+
+ /**
+ * @return the visibleStartHour
+ */
+ public int getVisibleStartHour()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _visibleStartHour,
+ "visibleStartHour", DEFAULT_VISIBLE_START_HOUR);
+ }
+
+ /**
+ * @return the workingEndHour
+ */
+ public int getWorkingEndHour()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _workingEndHour,
+ "workingEndHour", DEFAULT_WORKING_END_HOUR);
+ }
+
+ /**
+ * @return the workingStartHour
+ */
+ public int getWorkingStartHour()
+ {
+ return ScheduleUtil.getIntegerProperty(this, _workingStartHour,
+ "workingStartHour", DEFAULT_WORKING_START_HOUR);
+ }
+
+ /**
+ * @see javax.faces.component.UIComponentBase#restoreState(javax.faces.context.FacesContext, java.lang.Object)
+ */
+ public void restoreState(FacesContext context, Object state)
+ {
+ Object[] values = (Object[]) state;
+ super.restoreState(context, values[0]);
+ _compactMonthRowHeight = (Integer)values[1];
+ _compactWeekRowHeight = (Integer)values[2];
+ _detailedRowHeight = (Integer)values[3];
+ _expandToFitEntries = (Boolean)values[4];
+ _headerDateFormat = (String)values[5];
+ _immediate = (Boolean)values[6];
+ _readonly = (Boolean)values[7];
+ _renderZeroLengthEntries = (Boolean)values[8];
+ _theme = (String)values[9];
+ _tooltip = (Boolean)values[10];
+ _value = values[11];
+ _visibleEndHour = (Integer)values[12];
+ _visibleStartHour = (Integer)values[13];
+ _workingEndHour = (Integer)values[14];
+ _workingStartHour = (Integer)values[15];
+ _submitOnClick = (Boolean)values[16];
+ }
+
+ /**
+ * @see javax.faces.component.UIComponentBase#saveState(javax.faces.context.FacesContext)
+ */
+ public Object saveState(FacesContext context)
+ {
+ Object[] values = new Object[17];
+ values[0] = super.saveState(context);
+ values[1] = _compactMonthRowHeight;
+ values[2] = _compactWeekRowHeight;
+ values[3] = _detailedRowHeight;
+ values[4] = _expandToFitEntries;
+ values[5] = _headerDateFormat;
+ values[6] = _immediate;
+ values[7] = _readonly;
+ values[8] = _renderZeroLengthEntries;
+ values[9] = _theme;
+ values[10] = _tooltip;
+ values[11] = _value;
+ values[12] = _visibleEndHour;
+ values[13] = _visibleStartHour;
+ values[14] = _workingEndHour;
+ values[15] = _workingStartHour;
+ values[16] = _submitOnClick;
+ return values;
+ }
+
+ /**
+ * @param compactMonthRowHeight the compactMonthRowHeight to set
+ */
+ public void setCompactMonthRowHeight(int compactMonthRowHeight)
+ {
+ this._compactMonthRowHeight = Integer.valueOf(compactMonthRowHeight);
+ }
+
+ /**
+ * @param compactWeekRowHeight the compactWeekRowHeight to set
+ */
+ public void setCompactWeekRowHeight(int compactWeekRowHeight)
+ {
+ this._compactWeekRowHeight = Integer.valueOf(compactWeekRowHeight);
+ }
+
+ /**
+ * @see javax.faces.component.ValueHolder#setConverter(javax.faces.convert.Converter)
+ */
+ public void setConverter(Converter converter)
+ {
+ this._converter = converter;
+ }
+
+ /**
+ * @param detailedRowHeight the detailedRowHeight to set
+ */
+ public void setDetailedRowHeight(int detailedRowHeight)
+ {
+ this._detailedRowHeight = Integer.valueOf(detailedRowHeight);
+ }
+
+ /**
+ * @param expandToFitEntries the expandToFitEntries to set
+ */
+ public void setExpandToFitEntries(boolean expandToFitEntries)
+ {
+ this._expandToFitEntries = Boolean.valueOf(expandToFitEntries);
+ }
+
+ /**
+ * @param headerDateFormat the headerDateFormat to set
+ */
+ public void setHeaderDateFormat(String headerDateFormat)
+ {
+ this._headerDateFormat = headerDateFormat;
+ }
+
+ /**
+ * @param immediate the immediate to set
+ */
+ public void setImmediate(boolean immediate)
+ {
+ this._immediate = Boolean.valueOf(immediate);
+ }
+
+ /**
+ * The underlying model
+ *
+ * @param model The model to set.
+ */
+ public void setModel(ScheduleModel model)
+ {
+ setValue(model);
+ }
+
+ /**
+ * @param readonly the readonly to set
+ */
+ public void setReadonly(boolean readonly)
+ {
+ this._readonly = Boolean.valueOf(readonly);
+ }
+
+ /**
+ * @param renderZeroLengthEntries the renderZeroLengthEntries to set
+ */
+ public void setRenderZeroLengthEntries(boolean renderZeroLengthEntries)
+ {
+ this._renderZeroLengthEntries = Boolean.valueOf(renderZeroLengthEntries);
+ }
+
+ /**
+ * @param theme the theme to set
+ */
+ public void setTheme(String theme)
+ {
+ this._theme = theme;
+ }
+
+ /**
+ * @param tooltip the tooltip to set
+ */
+ public void setTooltip(boolean tooltip)
+ {
+ this._tooltip = Boolean.valueOf(tooltip);
+ }
+
+ /**
+ * @see javax.faces.component.ValueHolder#setValue(java.lang.Object)
+ */
+ public void setValue(Object value)
+ {
+ this._value = value;
+ }
+
+ /**
+ * @param visibleEndHour the visibleEndHour to set
+ */
+ public void setVisibleEndHour(int visibleEndHour)
+ {
+ this._visibleEndHour = Integer.valueOf(visibleEndHour);
+ }
+
+ /**
+ * @param visibleStartHour the visibleStartHour to set
+ */
+ public void setVisibleStartHour(int visibleStartHour)
+ {
+ this._visibleStartHour = Integer.valueOf(visibleStartHour);
+ }
+
+ /**
+ * @param workingEndHour the workingEndHour to set
+ */
+ public void setWorkingEndHour(int workingEndHour)
+ {
+ this._workingEndHour = Integer.valueOf(workingEndHour);
+ }
+
+ /**
+ * @param workingStartHour the workingStartHour to set
+ */
+ public void setWorkingStartHour(int workingStartHour)
+ {
+ this._workingStartHour = Integer.valueOf(workingStartHour);
+ }
+
+
+
+}
Modified: myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/util/ScheduleUtil.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/util/ScheduleUtil.java?view=diff&rev=548528&r1=548527&r2=548528
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/util/ScheduleUtil.java (original)
+++ myfaces/tomahawk/trunk/core/src/main/java/org/apache/myfaces/custom/schedule/util/ScheduleUtil.java Mon Jun 18 16:16:17 2007
@@ -240,7 +240,7 @@
return defaultValue;
}
-
+
/**
* <p>
* Get the object value of a UIComponent, even if it is a value
Modified: myfaces/tomahawk/trunk/core/src/main/resources-facesconfig/META-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources-facesconfig/META-INF/faces-config.xml?view=diff&rev=548528&r1=548527&r2=548528
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources-facesconfig/META-INF/faces-config.xml (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources-facesconfig/META-INF/faces-config.xml Mon Jun 18 16:16:17 2007
@@ -797,7 +797,7 @@
<component-family>javax.faces.Panel</component-family>
<renderer-type>org.apache.myfaces.Schedule</renderer-type>
<renderer-class>
- org.apache.myfaces.custom.schedule.renderer.ScheduleDelegatingRenderer
+ org.apache.myfaces.custom.schedule.ScheduleDelegatingRenderer
</renderer-class>
</renderer>
Modified: myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/schedule/HtmlSchedule.xml
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/schedule/HtmlSchedule.xml?view=diff&rev=548528&r1=548527&r2=548528
==============================================================================
--- myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/schedule/HtmlSchedule.xml (original)
+++ myfaces/tomahawk/trunk/core/src/main/resources/org/apache/myfaces/custom/schedule/HtmlSchedule.xml Mon Jun 18 16:16:17 2007
@@ -4,7 +4,7 @@
"http://myfaces.apache.org/dtd/Component.dtd">
<component>
<component-class>org.apache.myfaces.custom.schedule.HtmlSchedule</component-class>
- <base-class>org.apache.myfaces.custom.schedule.UISchedule</base-class>
+ <base-class>org.apache.myfaces.custom.schedule.UIScheduleBase</base-class>
<component-type>org.apache.myfaces.Schedule</component-type>
<component-family>javax.faces.Panel</component-family>
<renderer-type>org.apache.myfaces.Schedule</renderer-type>