Show TOC

Date NavigatorLocate this document in the navigation structure

Definition

A control for advanced handling of all actions which require a date input and to visualize a date.

  • id

    Identification name of the dateNavigator.

  • model

    Defines the model which provides the dateNavigator with data. How to work with the DateNavigatorModel .

  • monthPerColumn

    The dateNavigator can display several month. The months are arranged in matrix form. This attribute defines the number of columns of the matrix.

  • monthPerRow

    The dateNavigator can display several month. The months are arranged in matrix form. This attribute defines the number of rows of the matrix.

  • onNavigate

    The navigation fields are located left and right of the displayed month. The << and >> fields can be used to select the previous and next month. If a dateNavigator has more columns the previous month navigator is located at the first column and the next month navigator at the last column.

    The 'onNavigate' attribute defines the event handling method that will be processed when the user clicks on the navigation fields.

  • onDayClick

    Defines the event handling method that will be processed when the user clicks on a day.

  • onWeekClick

    Defines the event handling method that will be processed when the user clicks on a week. The week is the first column of the dateNavigator grid.

  • onMonthClick

    Defines the event handling method that will be processed when the user clicks on the header text string representing the month displayed.

Attributes

M

Values

Usage

id

*

String (cs)

Taglib

id = "VacationPlanner"

Classlib

setId ("VacationPlanner")

model

*

String

Taglib

model =" myBean.model "

Classlib

setModel (( DateNavigatorModel ) model)

monthPerColumn

Numeric (1)

Taglib

monthPerColumn = "3"

Classlib

setMonthPerColumn (3)

monthPerRow

Numeric (1)

Taglib

monthPerRow = "4"

Classlib

setMonthPerRow (4)

Events

M

Values

Usage

onNavigate

String (cs)

Taglib

onNavigate = "ProcessNav"

Classlib

setOnNavigate ("ProcessNav")

onDayClick

String (cs)

Taglib

onDayClick = "DaySel"

Classlib

setOnDayClick ("DaySel ")

onWeekClick

String (cs)

Taglib

onWeekClick = "WeekSel"

Classlib

setOnWeekClick ("WeekSel ")

onMonthClick

String (cs)

Taglib

onMonthClick = "MonSel"

Classlib

setOnMonthClick ("MonSel")

Example

using the taglib

    <hbj:dateNavigator
           id="myDateNavigator1"
           model="myBean.model"
           monthsPerColumn="2"
           monthsPerRow="3"
           onNavigate="myOnNavigate"
           onDayClick="myOnDayClick"
           onWeekClick="myOnWeekClick"
           onMonthClick="myOnMonthClick"
    />

         

using the classlib

    IPortalComponentRequest request =                         (IPortalComponentRequest) this.getRequest();
    IPortalComponentContext context = request.getComponentContext();
    IPortalComponentProfile profile = myContext.getProfile();
    IPageContext pagecontext =
                        PageContextFactory.createPageContext(request);

    Form form = (Form)this.getForm();
    DateNavigator dn = new DateNavigator(pagecontext);
    dn.setId("myDateNavigator1");
    dn.setMonthsPerColumn(2);
    dn.setMonthsPerRow(3);
    dn.setOnNavigate("myOnNavigate");
    dn.setOnDayClick("myOnDayClick");
    dn.setOnWeekClick("myOnWeekClick");
    dn.setOnMonthClick("myOnMonthClick");
    MyBean myBean = new MyBean(pagecontext);
    dn.setModel(myBean.getModel());
    form.addComponent(dn);

         

Result