net.liftmodules.widgets.calendars

CalendarMonthView

class CalendarMonthView extends AnyRef

CalendarMonthView renders a month view representation of a collection of CalendarItem
Usage example - assume CalendarView is a typical LiftWeb snippet

class CalendarView {

 def render(html: Group) : NodeSeq = {
   val c = Calendar getInstance;
   c.set(MONTH, 4)
   bind("cal", html,
        "widget" --> CalendarMonthView(c, makeCals, itemClick, dayClick, weekClick)
   )
 }

 import JE._
 import JsCmds._

 def itemClick = Full(AnonFunc("elem, param", JsRaw("alert(param + ' - ' + elem.nodeName)")))
 def dayClick = Full(AnonFunc("elem, param", JsRaw("alert(param + ' - ' + elem.nodeName)")))
 def weekClick = Full(AnonFunc("elem, param", JsRaw("alert(param + ' - ' + elem.nodeName)")))


 private def makeCals = {
   val c1 = Calendar getInstance
   val c2 = Calendar getInstance;
   val c3 = Calendar getInstance;

   c2.set(DAY_OF_MONTH, 3)
   c3.set(DAY_OF_MONTH, 1)
   c3.set(MONTH, 4)

   val item1 = CalendarItem(...)
   val item2 = CalendarItem(...)
   val item3 = CalendarItem(...)

   item1 :: item2 :: item3 ::  Nil
 }
}

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. CalendarMonthView
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CalendarMonthView (when: Calendar)

  2. new CalendarMonthView (when: Calendar, meta: MonthViewMeta)

    when

    - the Calendar object describing the month that needs tobe rendered

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  9. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  12. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  13. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  14. val meta : MonthViewMeta

  15. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  16. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  17. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  18. def render (calendars: Seq[CalendarItem], itemClick: Box[AnonFunc], dayClick: Box[AnonFunc], weekClick: Box[AnonFunc]): NodeSeq

    Returns the markup for rendering the calendar month view

    Returns the markup for rendering the calendar month view

    calendars

    - the calendar items than need to be rendered

    itemClick

    - Ajax function to be called when a calendar item was clicked. It takes two parameters: elem the node that was clicked and param the identifier if this CalendarItem

    dayClick

    - Ajax function to be called when a day number(cell header) item was clicked It takes two parameters: elem the node that was clicked and param the date of the clicked day in MM/dd/yyyy format

    weekClick

    - Ajax function to be called when a day number(cell header) item was clicked It takes two parameters: elem the node that was clicked and the week number

    returns

    NodeSeq - the markup to be rendered

  19. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  20. def toString (): String

    Definition Classes
    AnyRef → Any
  21. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. val when : Calendar

    - the Calendar object describing the month that needs tobe rendered

Inherited from AnyRef

Inherited from Any