Interface that allows a visual host reusable part to interact with other components via a monitor
Ancestors - None
Interface that allows a visual host reusable part to interact with other components via a Monitor. This interface is used in a reusable part as part of a hosted field visualization.
The following example uses the iMonitorSubject and iContextualSubject to support use as a field visualization, in this case an autocomplete feature for SURNAME.
Function Options(*DIRECT) Begin_Com Role(*EXTENDS #PRIM_PANL *implements #Prim_dc.iMonitorSubject #Prim_dc.iContextualSubject) Defaultpty(Value) Displayposition(1) Height(19) Layoutmanager(#TableLayout_1) Left(0) Tabposition(1) Tabstop(False) Top(0) Width(418) Define_Com Class(#Surname.Visualedit) Name(#Surname) Displayposition(1) Height(19) Marginleft(0) Parent(#COM_OWNER) Tabposition(1) Width(418) Define_Com Class(#PRIM_TBLO) Name(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Row) Name(#Row_1) Displayposition(1) Parent(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Column) Name(#Column_1) Displayposition(1) Parent(#TableLayout_1) Define_Com Class(#PRIM_TBLO.Item) Name(#Item_1) Column(#Column_1) Manage(#Surname) Parent(#TableLayout_1) Row(#Row_1) * Default property of the Value to allow data values to beset/retrieved Define_Pty Name(Value) Get(*auto #Surname) Set(*auto #Surname) Mthroutine Name(OnContextChanged) Options(*redefine) * If being hosted in a field If (#Context *Is #prim_evp) * Match the edit to the component field state #Surname.ReadOnly := (#Context *As #prim_evp).ReadOnly #Surname.ShowError := (#Context *As #prim_evp).ShowError Endif Endroutine Evtroutine Handling(#Surname.Changed) Signal Event(ValueChanged) Endroutine Evtroutine Handling(#Surname.AutoCompleting) Value(#Value) * Find the first record matching the entered value Select Fields(#Surname) From_File(pslmst2) With_Key(#Value) Generic(*yes) #Value := #Surname Leave Endselect Endroutine End_Com
Name | Description |
---|---|
ValueChanged | Signals that the current value of a field has changed |
Name | Description |
---|---|
ApplyMonitoredValue | Informs a monitoring Target of a change in a monitored Source value
MonitorSubject |
GetValue | Obtains the value of a monitored source component
Result |
Febuary 18 V14SP2