## JavaScript Bean

# Calendar

    Object
        |
        +----netscape.samples.widgets.Calendar

JSB_CONSTRUCTOR Index

- netscape_samples_widgets_Calendar

JSB_DESCRIPTOR Index

- netscape.samples.widgets.Calendar

JSB_PROPERTY Index

- value

JSB_METHOD Index

- getValue
- setValue

JSB_ICON Index

- n_s_w_Calendar

JSB_EVENT Index

- onChange

## JSB_CONSTRUCTORs

##
- netscape_samples_widgets_Calendar

      function netscape_samples_widgets_Calendar(params)

  The constructor simply adds an image-link that pops up a Calendar page in a sep. window, passing to it the datefield.

  Makes use of a custom visual defined in CalendarVisual.java (see also the javadocs for CalendarVisual).

  Outputs an HTML link which triggers a JavaScript function to open and initialize the calendar window with this component acting simply as the "dateController" stub.

  Most of the logic for the actual calendar operation is in the Pagelet packaged with the component called "calendar.html"

## JSB_DESCRIPTORs

##
- netscape.samples.widgets.Calendar

  NAME=netscape.samples.widgets.Calendar
  DISPLAYNAME=Date Picker
  HELP_URL=netscape/samples/widgets/Calendar_jsb.html
  VISUAL=netscape.samples.widgets.CalendarVisual
  EVENTMODEL=JS

  Displays a calendar for setting the date of a textfield, calendar pops up in a second window. Most of the logic is in the secondary window -- the JSB is used simply as an instantiation-stub.

## JSB_PROPERTYs

##
- value

  NAME=value
  PROPTYPE=JS
  TYPE=string
  DEFAULTVALUE=MM/DD/1997
  READMETHOD=getValue
  WRITEMETHOD=setValue
  ISDESIGNTIMEREADONLY ISBOUND ISDEFAULT SHORTDESCRIPTION=Current date

  The datefield that this calendar controls.

  This is implemented using JSB Bound Properties but is simply passed in as a constructor in this simple example.

## JSB_METHODs

##
- getValue

  NAME=getValue
  TYPE=string
  ENV=client

  getValue

##
- setValue

  NAME=setValue
  TYPE=void
  ENV=client
  JSB_PARAMETER NAME="newValue" TYPE="string"

  setValue

## JSB_ICONs

##
- n_s_w_Calendar

  NAME=n_s_w_Calendar

  n_s_w_ stands for netscape/samples/widgets... allows icon to sit in root of jar while providing reasonable namespace-collision protection.

## JSB_EVENTs

##
- onChange

  NAME=onChange
  LISTENERMETHODS=onChange
  LISTENERTYPE=onChangeListener
  EVENTMODEL=JS

  Declares a JSB_EVENT called "onChange" which gets fired when any bound property changes. All bound properties should call onChange when the bound property is changed internally by the component.

  In this example, only one property is bound (datefield) and the onChange event is called in the Calendar.html file.

Generated by jsbdoc on Sun Nov 23 15:10:50 PST 1997