Component-related events
This section describes component-related events.
Click
This event occurs when a user clicks on a clickable component. The component name is available in the parms. Component names are unique across a display layout, so this can be used to conclusively determine what was clicked on. If the component is not in a header area, the record with which it is associated will also be available in the parms.
context.Handlers.RegisterClickHandler(OnClick)
context.Handlers.UnregisterClickHandler()
String parms.GetName()
- name of component available
to OnClick
IPFItemI parms.GetItem()
- item available to OnClick
If there is no work that needs to be done on the server side, the following call should be made in the client-side handler to prevent passing the alert to the server side, as this avoids unneeded round trips from client to server.
parms.StopServerSideHandler(true)
FillinEntered and FillinExited
These events occur only for enabled fill-in fields.
When a fill-in receives focus, whether from a mouse click or by the user navigating using the keyboard or any other way, the FillinEntered event occurs.
The component name is available in the parms. Component names are unique across a display layout, so this can be used to conclusively determine what was clicked on. If the component is not in a header area, the record with which it is associated will also be available in the parms.
When a fill-in loses focus, whether from a mouse click or by the user navigating using the keyboard or any other way, the FillinExited event occurs. If another field is receiving focus, the FillinExited event handler is called before the FillinEntered handler for the next field.
The parms contains the same information as FillinEntered plus the BeforeValue. The BeforeValue is the value of the property at the time the FillinEntered handler completed. If the user made no data changes (for example, they just tabbed through), then the GetBeforeValue() is the same as the current value of the property and parms.GetDataChanged() returns false.
context.Handlers.RegisterFillInEnteredHandler(OnFillinEntered)
context.Handlers.UnregisterFillInEnteredHandler()
context.Handlers.RegisterFillInExitedHandler(OnFillinExited)
context.Handlers.UnregisterFillInExitedHandler()
string parms.GetName()
- name of component available
to OnFillinEntered and OnFillinExited
IPFItemI parms.GetItem()
- item available to
OnFillinEntered and OnFillinExited
string parms.GetBeforeValue()
- value of the component
when OnFillinEntered is completed
string parms.GetBeforeValueWhenNull(whenNull)
number parms.GetBeforeValueAsNumber()
number parms.GetBeforeValueAsNumberWhenNull(whenNull)
boolean parms.GetBeforeValueAsBoolean()
boolean
parms.GetBeforeValueAsBooleanWhenNull(whenNull)
boolean parms.GetBeforeValueIsNull()
boolean parms.GetDataChanged()
DataChanged
This event occurs for enabled fields when the user changes the value. It does not occur at other times, such as when the data is changed by scripting.
This is a fine-grained event and can result in the event handler being called many times in a short period.
For fill-ins, the event is generated for every keystroke that changes the value of the property. Keystrokes that navigate within the fill-in without changing the data do not generate a DataChanged event.
For fill-ins with a drop-down that are select only, the data change fires only when a drop-down value has been selected.
For enabled non-fill-in components, such as a slider manipulated with the mouse, the event is generated at a rapid rate depending on the responsiveness of the client browser.
The parms contain the component or property name, the record it is associated with, if applicable, and the BeforeValue.
context.Handlers.RegisterDataChangedHandlerFor(OnDataChanged,
componentName)
context.Handlers.UnregisterDataChangedHandlerFor(componentName)
String parms.GetName()
: This is the name of the
component available to OnDataChanged
IPFItemI parms.GetItem()
: This is the item available
to OnDataChanged
string parms.GetBeforeValue()
: This is the value of
the component prior to data change
string parms.GetBeforeValueWhenNull(whenNull)
number parms.GetBeforeValueAsNumber()
number parms.GetBeforeValueAsNumberWhenNull(whenNull)
boolean parms.GetBeforeValueAsBoolean()
boolean
parms.GetBeforeValueAsBooleanWhenNull(whenNull)
boolean parms.GetBeforeValueIsNull()
boolean parms.GetDataChanged()