NaturalONE Version 8.3.7
 —  Natural for Ajax  —

NJX:EVENTDATA

The NJX:EVENTDATA control supplies additional information related to specific events. With some events, the application needs additional information to handle the event properly. Only one instance of the control needs to be added to the page. This instance provides the event data for all events of other controls on the page that supply additional data. If the page does not contain an instance of the NJX:EVENTDATA control, no additional event data is supplied to the application.

The following topics are covered below:


Example

Example

The XML layout definition is:

<?xml version="1.0" encoding="UTF-8"?>
<natpage natsource="CTREVD-A" natsinglebyte="true" 
xmlns:njx="http://www.softwareag.com/njx/njxMapConverter">
    <titlebar name="Event Data Example">
    </titlebar>
    <pagebody takefullheight="true">
        <rowarea name="Event Data" height="100%">
            <itr height="100%">
                <textgrid2 griddataprop="lines" width="100%" 
                 height="100%" selectprop="selected" 
                 onclickmethod="lines.onClick">
                    <column name="ID" property="id" width="100">
                    </column>
                    <column name="Last" property="last">
                    </column>
                    <column name="First" property="first">
                    </column>
                </textgrid2>
            </itr>
        </rowarea>
    </pagebody>
    <statusbar withdistance="false">
    </statusbar>
    <njx:eventdata>
    </njx:eventdata>
</natpage>

Top of page

Adapter Interface

1 LINES (1:*)
2 FIRST (A) DYNAMIC
2 ID (A) DYNAMIC
2 LAST (A) DYNAMIC
2 SELECTED (L)
1 XCIEVENTDATA
2 XCIINDEX (I4)

If a left click is applied to the grid, the index of the line is contained in XCIEVENTDATA.XCIINDEX.

Note that in order to receive the event data, the click event must refer to a specific control. In this example, it must therefore be named lines.onClick, not just onClick.

Top of page