| Where allowed to run: All environments (*ALL) Threadsafe: No |
Parameters Examples Error messages |
The Create Event Definition (CRTEVTDFN) command defines a Java event and its attributes. An event could be a double-click or a right-click to a pop-up menu.
All optional parameters are controlled by the event type (EVTTYPE) parameter. To prompt the correct parameters, first specify the EVTTYPE then press enter.
Premised that iWeb converts 5250 application into Java objects. The concept of this CL command, part of a set of CL commands, is to interface Java Objects (and their properties and events) with RPG programs. The advantages of using CL commands are in the fact that they have parameters which can accept variables or expressions. For instance: One can create a "Button" which can call a host program using a variable which could be any field currently on the screen. Another example is the simplicity of showing an article's picture using, to define the path of the image, the expression ' ''/directory/articles/picture/'' *cat &FLD01 *tcat ''.gif'' ' where &FLD01 is a field (visible or hidden) within a subfile. Any customizations or enhancement are retained after a DDS or RPG application is recompiled because iWeb uses cascading XML documents to define styles and functions. The root is the original display, any sublevel XML are customizations. All customization or widget development can be defined for specific user, group, or languages. One can create a multi-language version of the application without touching the original RPG or DDS, or a specific layout can be defined for specific LOGIN user or one can specify that any fields such as COST% are hidden for a group of user. All this and much more just by using just the iWeb CL commands.
See also related commands.
| Top |
| Keyword | Description | Choices | Notes |
|---|---|---|---|
| EVT | Event | Qualified object name | Required, Positional 1 |
| Qualifier 1: Event | Name, *DDSSRC | ||
| Qualifier 2: Collection | Name, DEFAULT | ||
| EVTTYPE | Event type | ONDOUBLECLICK, ONRIGHTCLICK | Required, Positional 2 |
| TEXT | 'Description' text | Character value, *BLANK | Optional, Positional 3 |
| ACTION | Action | SYSCMD, LINK, F01, F02, F03, F04, F05, F06, F07, F08, F09, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, ENTER, *NONE | Optional, Positional 4 |
| SYSCMD | System command or expression | Character value | Optional, Positional 5 |
| HREF | Href link or expression | Character value | Optional, Positional 6 |
| EVAL | Evaluate field(s) expression | Values (up to 100 repetitions): Element list | Optional, Positional 7 |
| Element 1: [Formatname.]Field name | Character value, *NONE, '&THIS', *CLIENTFLD | ||
| Element 2: Eval value expression | Character value, *NONE, '&THIS' | ||
| POPMENU | Pop menu option(s) | Values (up to 50 repetitions): Element list | Optional, Positional 8 |
| Element 1: Image path or expression | Character value, *NONE | ||
| Element 2: 'Label' text | Character value, *NONE | ||
| Element 3: Action | SYSCMD, LINK, F01, F02, F03, F04, F05, F06, F07, F08, F09, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, ENTER, *NONE | ||
| Element 4: System command or expression | Character value, *NONE | ||
| Element 5: Href link or expression | Character value, *NONE | ||
| Element 6: Evaluate field expression | Element list | ||
| Element 1: [Formatname.]Field name | Character value, *NONE, '&THIS', *CLIENTFLD | ||
| Element 2: Eval value expression | Character value, *NONE, '&THIS' |
| Top |
Specifies the event you want to define.
This is a required parameter.
Qualifier 1: Event
|
A R FMT1
A . . .
*%%WBIW CRTEVTDFN EVT(*DDSSRC)
*%%WBIW EVTTYPE(...)
*%%WBIW . . .
*%%WBIW ADDEVTCNT EVT(*DDSSRC)
*%%WBIW TOLEVEL(*DDSSRC)
A . . .
|
The parameter value *DDSSRC assume the format or field name preceding the command insertion, like does any DDS keyword.
Nota: To insert the cmd within a DDS source, type-in the cmd in another session, use F14=cmd string and then do a copy/past to the DDS source.
Qualifier 2: Collection
Nota: To define new COLLECTION use the cmd: IWEB/CRTCLC
| Top |
Specifies the event's type you want to define.
Nota: The command will prompt a different set of parameters according to the type of event you select. Any other parameters will be ignored.
This is a required parameter.
| Top |
Specifies the text description of the event you define.
| Top |
Specifies the action of the event. This is the action returned to the host program.
This parameter is controlled by the event type (EVTTYPE): ONDOUBLECLICK
| Top |
Specifies the system command that will be executed. This command could be any CL command.
This parameter is controlled by the event type (EVTTYPE): ONDOUBLECLICK Approach to the Object Oriented Programming (OOP).
| Top |
Specifies the Hypertext Reference of a link.
This parameter is controlled by the event type (EVTTYPE): ONDOUBLECLICK
All HREF protocols are usable, for instance:
| Top |
Specifies the expression value of a field. Approach to the Object Oriented Programming (OOP).
This parameter is controlled by the event type (EVTTYPE): ONDOUBLECLICK
You can specify 100 values for this parameter.
Element 1: Field name
Example you may use:
Element 2: Eval value expression
| Top |
Specifies the pop-menu items of the right-click event.
This parameter is controlled by the event type (EVTTYPE): ONRIGHTCLICK
You can specify 50 values for this parameter.
Element 1: Image path or expression
Specifies the adress of the image for the icon-item.
Element 2: 'Label' text
Nota: You can define multi-level menu using the separatore "/" within the item label. "links/link1" will create 2 pop-up menu, the first will show "link >" and the second will show "link1". If you create 2 label's item "links/link1" and "link/link2" the first pop-up menu will group the label "link >" and the second level pop-up menu will show link2 and link2.
Element 3: Action
Element 4: System command or expression
Element 5: Href link or expression
Element 6: Evaluate field expression
Element 1: [Formatname.]Field name
Element 2: Eval value expression
| Top |
Example 1: Create a double-click event
CRTEVTDFN EVT(MYCLCL/MYDBLCLICK)
EVTTYPE(ONDOUBLECLICK)
TEXT('on double click')
ACTION(LINK)
HREF(WWW.GOOGLE.COM)
This command creates a double-click event, named MYDBLCLICK within the collection named MYCLC. The double-click will open a new window with the link www.google.com
| Top |
| Top |