DropDown

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
kno_dk
Posts: 102
Joined: Tue Feb 23, 2016 12:00 am

DropDown

Post by kno_dk » Fri Mar 18, 2016 1:10 am

Hi

I have created a copy of you demo app with a DropDown in a list - xDemoWebDataEntryGrid. In this app there is focus on one of the entries in the dropdown.
If I in this RP - xDemoWebDataEntryGrade change it from #ÆCom_owner.CreateInstance to #Com_owner.Initialize then the focus does not work any more. Why?

I have then created 1 application (still based on this sample) in my own partition. If I use the Com_owner.Initialize I can use the value from the component that contains the ADD_ENTRY to send to my Server modul for selection, but then the focus don't work. If I then change the Com_owner.Initialize to ÆCom_owner.CreateInstance the focus works but then the value from component that contains the ADD_ENTRY is blank.

Why the difference? what can I do so this works with focus and the field is not blank?

/klaus

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: DropDown

Post by Stewart Marshall » Fri Mar 18, 2016 10:00 am

Hi Klaus

This all to do with the sequence of processing.

When a component instance is created, all components defined in static define_coms will be created and all fields values will be set to their repository default value. The CreateInstance is then fired. When all of the createinstances are done and the UI has been drawn for the first time (Realized), the Initialize event will fire.

Effectively, initialize if the last event to occur at start up. (http://docs.lansa.com/140/EN/LANSA016/P ... IALIZE.htm)

Reusable parts for list cells, tree items etc., also implement an interface and this injects a couple of secondary activities.

After Createinstance has completed, all *ListField field values are copied in and the OnAdd method is executed. Only when these are done will Initialize fire.


I'm not sure In fully understand your second question, but I think you're talking about a timing mismatch. My guess is that it relates directly to the above. Unless both the list and the reusable part are ready to get going at the same time, you're going to run in to problems.

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

Post Reply