NJX:SESSIONPARAMS

#### Search Results

Search

# NJX:SESSIONPARAMS

The NJX:SESSIONPARAMS control is used to modify the following Natural for Ajax session parameters in the Natural application:

- `STYLE`: By specifying this parameter in the Natural application, you can change the style sheet of a running Natural for Ajax session.

- `FIRSTDAYINWEEK`: By specifying this parameter in the Natural application, you can define either Sunday or Monday as the first day in the week.

The following topics are covered below:

- General Information

- Example

- Adapter Interface

## General Information

In the Natural program, the NJX:SESSIONPARAMS control is represented with the following data structure:

    1 XCISESSIONPARAMS
    2 FIRSTDAYINWEEK (U) DYNAMIC
    2 STYLE (U) DYNAMIC

Possible values for the `FIRSTDAYINWEEK` parameter are "SU" for Sunday and "MO" for Monday. Other values are not supported.

The `STYLE` parameter must contain the name of the style sheet that is to be used, including the path. For example, "../cis/styles/CIS_DEFAULT.css".

The following sample code shows how to change the Natural for Ajax session parameters in the Natural application:

    XCISESSIONPARAMS.STYLE := '../cis/styles/CIS_DEFAULT.css'
    XCISESSIONPARAMS.FIRSTDAYINWEEK := 'MO'   /* 'SU' or 'MO'
    . . .
    PROCESS PAGE UPDATE FULL

## Example

An example program `CTRSEP-P` which shows the usage of the NJX:SESSIONPARAMS control is provided in the Natural for Ajax demos.

## Adapter Interface

    1 XCISESSIONPARAMS
    2 FIRSTDAYINWEEK (U) DYNAMIC
    2 STYLE (U) DYNAMIC

Element | Description
--- | ---
`STYLE` | The name of the style sheet.
`FIRSTDAYINWEEK` | The first day of the week. This can be either "SU" for Sunday or "MO" for Monday.

### On this page

- General Information
- Example
- Adapter Interface