net.liftweb.widgets.calendars.CalendarMonthView

class CalendarMonthView

class CalendarMonthView(val when : Calendar, val meta : MonthViewMeta)

 extends ScalaObject


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
  }
 }

 
param
when - - the Calendar object describing the month that needs tobe rendered


Companion: CalendarMonthView

Source: CalendarMonthView.scala(110)

 Constructors

def this(when : Calendar)
def this(when : Calendar, meta : MonthViewMeta)

 Methods

!=.. final def !=(arg0 : Object) Boolean AnyRef
!=.. final def !=(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Object) Boolean AnyRef
asInstanceOf.. final def asInstanceOf[T0] T0 Any
clone.. protected def clone Object AnyRef
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
finalize.. protected def finalize Unit AnyRef
getClass.. final def getClass Class[Any] AnyRef
hashCode.. def hashCode Int AnyRef
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
ne.. final def ne(arg0 : Object) Boolean AnyRef
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
render.. def render(calendars : Seq[CalendarItem], itemClick : Box[AnonFunc], dayClick : Box[AnonFunc], weekClick : Box[AnonFunc])
Returns the markup for rendering the calendar month view [details]
param
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
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
calendars - - the calendar items than need to be rendered
return
- NodeSeq - the markup to be rendered
NodeSeq
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
toString.. def toString String AnyRef
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait.. final def wait Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.