org.apache.myfaces.custom.schedule
Class UISchedule

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.custom.schedule.AbstractUIScheduleBase
              extended by org.apache.myfaces.custom.schedule.UIScheduleBase
                  extended by org.apache.myfaces.custom.schedule.UISchedule
All Implemented Interfaces:
Serializable, EventListener, javax.faces.component.ActionSource, javax.faces.component.ActionSource2, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder

@JSFComponent
public class UISchedule
extends org.apache.myfaces.custom.schedule.UIScheduleBase
implements Serializable, javax.faces.component.ActionSource2

This class contains all 'interactive' stuff for the Schedule component, meaning actions and actionListeners.

Version:
$Revision: 736908 $
Author:
Jurgen Lust
See Also:
Serialized Form

Nested Class Summary
protected static class UISchedule.PropertyKeys
           
 
Field Summary
static String COMPONENT_TYPE
           
 
Fields inherited from class org.apache.myfaces.custom.schedule.UIScheduleBase
COMPONENT_FAMILY
 
Fields inherited from class org.apache.myfaces.custom.schedule.AbstractUIScheduleBase
DEFAULT_COMPACT_MONTH_ROWHEIGHT, DEFAULT_COMPACT_WEEK_ROWHEIGHT, DEFAULT_DETAILED_ROWHEIGHT, DEFAULT_ENABLED_ON_USER_ROLE, DEFAULT_EXPAND_TO_FIT, DEFAULT_HEADER_DATE_FORMAT, DEFAULT_IMMEDIATE, DEFAULT_READONLY, DEFAULT_RENDER_ZEROLENGTH, DEFAULT_SPLIT_WEEKEND, DEFAULT_SUBMIT_ON_CLICK, DEFAULT_THEME, DEFAULT_TOOLTIP, DEFAULT_VISIBLE_END_HOUR, DEFAULT_VISIBLE_ON_USER_ROLE, DEFAULT_VISIBLE_START_HOUR, DEFAULT_WORKING_END_HOUR, DEFAULT_WORKING_START_HOUR, HOUR_NOTATION_12, HOUR_NOTATION_24, RENDERER_TYPE
 
Fields inherited from class javax.faces.component.UIComponent
BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEY
 
Constructor Summary
UISchedule()
           
 
Method Summary
 void addActionListener(javax.faces.event.ActionListener listener)
           
 void broadcast(javax.faces.event.FacesEvent event)
           
protected  org.apache.myfaces.custom.schedule.model.ScheduleEntry findEntry(String id)
          Find the entry with the given id
 javax.faces.el.MethodBinding getAction()
          Deprecated. Use getActionExpression() instead.
 javax.el.MethodExpression getActionExpression()
          Gets Specifies the action to take when this command is invoked.
 javax.faces.el.MethodBinding getActionListener()
           
 javax.faces.event.ActionListener[] getActionListeners()
           
 Date getLastClickedDateAndTime()
          The last date and time of day that was clicked.
 javax.faces.el.MethodBinding getMouseListener()
           
 javax.el.MethodExpression getMouseListenerExpression()
           
 org.apache.myfaces.custom.schedule.model.ScheduleEntry getSubmittedEntry()
           
 void queueEvent(javax.faces.event.FacesEvent event)
           
 void removeActionListener(javax.faces.event.ActionListener listener)
           
protected  void resetMouseEvents()
          This method is invoked at the beginning of the restore view phase, resetting all mouse event variables that were left from the previous request
 void restoreState(javax.faces.context.FacesContext facesContext, Object state)
           
 Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setAction(javax.faces.el.MethodBinding action)
          Deprecated. Use setActionExpression instead.
 void setActionExpression(javax.el.MethodExpression actionExpression)
          Sets Specifies the action to take when this command is invoked.
 void setActionListener(javax.faces.el.MethodBinding actionListener)
           
protected  void setLastClickedDateAndTime(Date lastClickedDateAndTime)
          The last date and time of day that was clicked.
 void setMouseListener(javax.faces.el.MethodBinding mouseListener)
          Deprecated. Use setMouseListenerExpression instead.
 void setMouseListenerExpression(javax.el.MethodExpression mouseListenerExpression)
           
protected  void setSubmittedEntry(org.apache.myfaces.custom.schedule.model.ScheduleEntry submittedEntry)
           
 
Methods inherited from class org.apache.myfaces.custom.schedule.UIScheduleBase
getCompactMonthDayOfWeekDateFormat, getCompactMonthRowHeight, getCompactWeekRowHeight, getConverter, getDetailedRowHeight, getFamily, getHeaderDateFormat, getHourNotation, getLocalValue, getTheme, getValue, getVisibleEndHour, getVisibleStartHour, getWorkingEndHour, getWorkingStartHour, isExpandToFitEntries, isImmediate, isReadonly, isRenderZeroLengthEntries, isSplitWeekend, isSubmitOnClick, isTooltip, setCompactMonthDayOfWeekDateFormat, setCompactMonthRowHeight, setCompactWeekRowHeight, setConverter, setDetailedRowHeight, setExpandToFitEntries, setHeaderDateFormat, setHourNotation, setImmediate, setReadonly, setRenderZeroLengthEntries, setSplitWeekend, setSubmitOnClick, setTheme, setTooltip, setValue, setValueBinding, setValueExpression, setVisibleEndHour, setVisibleStartHour, setWorkingEndHour, setWorkingStartHour
 
Methods inherited from class org.apache.myfaces.custom.schedule.AbstractUIScheduleBase
getModel, isRendersChildren, setModel
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, clearInitialState, decode, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, initialStateMarked, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, visitTree
 
Methods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ActionSource
isImmediate, setImmediate
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE
See Also:
Constant Field Values
Constructor Detail

UISchedule

public UISchedule()
Method Detail

addActionListener

public void addActionListener(javax.faces.event.ActionListener listener)
Specified by:
addActionListener in interface javax.faces.component.ActionSource

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class javax.faces.component.UIComponentBase
Throws:
javax.faces.event.AbortProcessingException
See Also:
UIComponent.broadcast(javax.faces.event.FacesEvent)

findEntry

protected org.apache.myfaces.custom.schedule.model.ScheduleEntry findEntry(String id)
Find the entry with the given id

Parameters:
id - the id
Returns:
the entry

setAction

public void setAction(javax.faces.el.MethodBinding action)
Deprecated. Use setActionExpression instead.

Specified by:
setAction in interface javax.faces.component.ActionSource

getAction

public javax.faces.el.MethodBinding getAction()
Deprecated. Use getActionExpression() instead.

Specified by:
getAction in interface javax.faces.component.ActionSource

getActionExpression

@JSFProperty(returnSignature="java.lang.String",
             jspName="action")
public javax.el.MethodExpression getActionExpression()
Gets Specifies the action to take when this command is invoked. If the value is an expression, it is expected to be a method binding EL expression that identifies an action method. An action method accepts no parameters and has a String return value, called the action outcome, that identifies the next view displayed. The phase that this event is fired in can be controlled via the immediate attribute. If the value is a string literal, it is treated as a navigation outcome for the current view. This is functionally equivalent to a reference to an action method that returns the string literal.

Specified by:
getActionExpression in interface javax.faces.component.ActionSource2
Returns:
the new actionExpression value

setActionExpression

public void setActionExpression(javax.el.MethodExpression actionExpression)
Sets Specifies the action to take when this command is invoked. If the value is an expression, it is expected to be a method binding EL expression that identifies an action method. An action method accepts no parameters and has a String return value, called the action outcome, that identifies the next view displayed. The phase that this event is fired in can be controlled via the immediate attribute. If the value is a string literal, it is treated as a navigation outcome for the current view. This is functionally equivalent to a reference to an action method that returns the string literal.

Specified by:
setActionExpression in interface javax.faces.component.ActionSource2
Parameters:
actionExpression - the new actionExpression value

getMouseListenerExpression

@JSFProperty(returnSignature="void",
             methodSignature="org.apache.myfaces.custom.schedule.ScheduleMouseEvent",
             stateHolder=true,
             jspName="mouseListener")
public javax.el.MethodExpression getMouseListenerExpression()
Returns:

setMouseListenerExpression

public void setMouseListenerExpression(javax.el.MethodExpression mouseListenerExpression)

getActionListener

@JSFProperty(returnSignature="void",
             methodSignature="javax.faces.event.ActionEvent")
public javax.faces.el.MethodBinding getActionListener()
Specified by:
getActionListener in interface javax.faces.component.ActionSource

getActionListeners

public javax.faces.event.ActionListener[] getActionListeners()
Specified by:
getActionListeners in interface javax.faces.component.ActionSource

getLastClickedDateAndTime

@JSFProperty(tagExcluded=true)
public Date getLastClickedDateAndTime()
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.

Returns:
the last clicked date and time

setMouseListener

public void setMouseListener(javax.faces.el.MethodBinding mouseListener)
Deprecated. Use setMouseListenerExpression instead.


getMouseListener

public javax.faces.el.MethodBinding getMouseListener()
Returns:
the method binding to the mouse listener method

getSubmittedEntry

public org.apache.myfaces.custom.schedule.model.ScheduleEntry getSubmittedEntry()
Returns:
the submittedEntry

queueEvent

public void queueEvent(javax.faces.event.FacesEvent event)
Overrides:
queueEvent in class javax.faces.component.UIComponentBase
See Also:
UIComponent.queueEvent(javax.faces.event.FacesEvent)

removeActionListener

public void removeActionListener(javax.faces.event.ActionListener listener)
Specified by:
removeActionListener in interface javax.faces.component.ActionSource

resetMouseEvents

protected void resetMouseEvents()
This method is invoked at the beginning of the restore view phase, resetting all mouse event variables that were left from the previous request


restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UIComponentBase
See Also:
UIComponentBase.restoreState(javax.faces.context.FacesContext, java.lang.Object)

saveState

public Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UIComponentBase
See Also:
UIComponentBase.saveState(javax.faces.context.FacesContext)

setActionListener

public void setActionListener(javax.faces.el.MethodBinding actionListener)
Specified by:
setActionListener in interface javax.faces.component.ActionSource

setLastClickedDateAndTime

protected void setLastClickedDateAndTime(Date lastClickedDateAndTime)
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.


setSubmittedEntry

protected void setSubmittedEntry(org.apache.myfaces.custom.schedule.model.ScheduleEntry submittedEntry)
Parameters:
submittedEntry - the submittedEntry to set


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.