Testing Identifiers

Visual LANSA Framework

Testing Identifiers

You can use a generic VLF command handler to test the visual and programmatic identifiers passed from the instance list. It shows the selected business object and its identifier values:

 

To use the command handler, copy and paste the sample code to a reusable part, compile it and snap it in as a command handler for any business object:

Function Options(*DIRECT)

 

BEGIN_COM ROLE(*EXTENDS #VF_AC010) HEIGHT(240) HINT(*MTXTDF_DET1) WIDTH(600)

 

DEFINE_COM CLASS(#VF_ELXVI1.Visual) NAME(#VF_ELXVI1) DISPLAYPOSITION(1) HEIGHT(19) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(1) TOP(8) USEPICKLIST(False) WIDTH(416)

 

DEFINE_COM CLASS(#VF_ELXVI2.Visual) NAME(#VF_ELXVI2) DISPLAYPOSITION(2) HEIGHT(19) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(2) TOP(26) USEPICKLIST(False) WIDTH(417)

 

DEFINE_COM CLASS(#VF_ELXNK1.Visual) NAME(#VF_ELXNK1) DISPLAYPOSITION(7) HEIGHT(19) LEFT(272) PARENT(#COM_OWNER) TABPOSITION(7) TOP(136) USEPICKLIST(False) WIDTH(247)

 

DEFINE_COM CLASS(#VF_ELXNK2.Visual) NAME(#VF_ELXNK2) DISPLAYPOSITION(6) HEIGHT(19) LEFT(273) PARENT(#COM_OWNER) TABPOSITION(6) TOP(155) USEPICKLIST(False) WIDTH(247)

 

DEFINE_COM CLASS(#VF_ELXNK3.Visual) NAME(#VF_ELXNK3) DISPLAYPOSITION(5) HEIGHT(19) LEFT(273) PARENT(#COM_OWNER) TABPOSITION(5) TOP(174) USEPICKLIST(False) WIDTH(247)

 

DEFINE_COM CLASS(#VF_ELXNK4.Visual) NAME(#VF_ELXNK4) DISPLAYPOSITION(4) HEIGHT(19) LEFT(273) PARENT(#COM_OWNER) TABPOSITION(4) TOP(192) USEPICKLIST(False) WIDTH(247)

 

DEFINE_COM CLASS(#VF_ELXNK5.Visual) NAME(#VF_ELXNK5) DISPLAYPOSITION(3) HEIGHT(19) LEFT(273) PARENT(#COM_OWNER) TABPOSITION(3) TOP(208) USEPICKLIST(False) WIDTH(247)

 

DEFINE_COM CLASS(#VF_ELXAK1.Visual) NAME(#VF_ELXAK1) DISPLAYPOSITION(12) HEIGHT(19) LEFT(11) PARENT(#COM_OWNER) TABPOSITION(12) TOP(136) USEPICKLIST(False) WIDTH(249)

 

DEFINE_COM CLASS(#VF_ELXAK2.Visual) NAME(#VF_ELXAK2) DISPLAYPOSITION(11) HEIGHT(19) LEFT(11) PARENT(#COM_OWNER) TABPOSITION(11) TOP(153) USEPICKLIST(False) WIDTH(249)

 

DEFINE_COM CLASS(#VF_ELXAK3.Visual) NAME(#VF_ELXAK3) DISPLAYPOSITION(10) HEIGHT(19) LEFT(11) PARENT(#COM_OWNER) TABPOSITION(10) TOP(172) USEPICKLIST(False) WIDTH(249)

 

DEFINE_COM CLASS(#VF_ELXAK4.Visual) NAME(#VF_ELXAK4) DISPLAYPOSITION(9) HEIGHT(19) LEFT(11) PARENT(#COM_OWNER) TABPOSITION(9) TOP(190) USEPICKLIST(False) WIDTH(249)

 

DEFINE_COM CLASS(#VF_ELXAK5.Visual) NAME(#VF_ELXAK5) DISPLAYPOSITION(8) HEIGHT(19) LEFT(11) PARENT(#COM_OWNER) TABPOSITION(8) TOP(208) USEPICKLIST(False) WIDTH(249)

 

DEFINE_COM CLASS(#VF_ELBOOL.Visual) NAME(#VF_ELBOOL) CAPTION('Found ') DISPLAYPOSITION(13) HEIGHT(19) LABELTYPE(Caption) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(13) TOP(44) USEPICKLIST(False) WIDTH(209)

 

DEFINE_COM CLASS(#VF_ELIDN.Visual) NAME(#VF_ELIDN) CAPTION('Business Object Type') DISPLAYPOSITION(14) HEIGHT(19) LABELTYPE(Caption) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(14) TOP(64) USEPICKLIST(False) WIDTH(329)

 

DEFINE_COM CLASS(#VF_ELTXTS.Visual) NAME(#VF_ELTXTS) CAPTION('Type') DISPLAYPOSITION(15) HEIGHT(19) LABELTYPE(Caption) LEFT(344) MARGINLEFT(30) PARENT(#COM_OWNER) TABPOSITION(15) TOP(108) USEPICKLIST(False) WIDTH(159)

 

DEFINE_COM CLASS(#VF_ELTXTL.Visual) NAME(#VF_ELTXTL) CAPTION('Business Object Caption') DISPLAYPOSITION(16) HEIGHT(19) LABELTYPE(Caption) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(16) TOP(107) USEPICKLIST(False) WIDTH(329)

 

DEFINE_COM CLASS(#STD_TEXTL.Visual) NAME(#STD_TEXTL) CAPTION('Command Caption') DISPLAYPOSITION(17) HEIGHT(19) LABELTYPE(Caption) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(17) TOP(84) USEPICKLIST(False) WIDTH(329)

 

DEFINE_COM CLASS(#STD_TEXTS.Visual) NAME(#STD_TEXTS) CAPTION('Type') DISPLAYPOSITION(18) HEIGHT(19) LABELTYPE(Caption) LEFT(344) MARGINLEFT(30) PARENT(#COM_OWNER) TABPOSITION(18) TOP(84) USEPICKLIST(False) WIDTH(159)

 

* --------------------------------------------------------------------------------

 

* Handle Command Execution

 

* --------------------------------------------------------------------------------

 

Mthroutine Name(uExecute) Options(*REDEFINE)

 

*  Do any execution logic defined in the ancestor

 

Invoke #Com_Ancestor.uExecute

 

* Get the details

 

Invoke #avListManager.GetCurrentInstance AKey1(#vf_elxak1) AKey2(#vf_elxak2) AKey3(#vf_elxak3) AKey4(#vf_elxak4) AKey5(#vf_elxak5) NKey1(#vf_elxnk1) NKey2(#vf_elxnk2) NKey3(#vf_elxnk3) NKey4(#vf_elxnk4) NKey5(#vf_elxnk4) Found(#vf_elBool) VisualId1(#VF_ELXVI1) VisualId2(#VF_ELXVI2) BusinessObjectType(#vf_elidn)

 

 

* Display other details as well

 

Change #Std_texts #com_Owner.avCommandType

 

Change #Std_textl #com_Owner.avCommandCaption

 

Change #vf_eltxts #com_Owner.avObjectType

 

Change #vf_eltxtl #com_Owner.avObjectCaption

 

Endroutine

 

End_Com