Hello,
As far as I can see there is a problem with the onRecordSelection method and actions I want to do.
I have a form A witch contains a header record (like salesorderheader) in recordview
On the form I’ve put a tabpanel, which contains a form B on salesorderline which is being shown in tabelview.
When I select another header record, I want to recalculate in the all the line records some field.
// Method 'RefreshQTD'
for (var i = 1; i <= controller.getMaxRecordIndex(); i++)
{
controller.setSelectedIndex(i)
quantity_to_deliver = total_quantity_remainder
}
In my header I have an onRecordSelection method, that calls a method in the lineform:
forms.order_to_deliver_lines_lst.RefreshQTD();
Now the problem I have is that the relation has not been refreshed yet, so that the controller still works with the data of the previous record.
I also tried to use
salesorder_to_salesorderline.relookup()
forms.order_to_deliver_lines_lst.controller.relookup();
but both didn’t help. So I need the following:
Select record
Refresh form on tabpanel
Trigger onRecordSelection
but it seems that Servoy works like this:
Select record
Trigger onRecordSelection
Refresh form on tabpanel
In fact what I need is some kind of default method ‘AfterRecordSelection’ which is triggered just before the focus is given back to the user.
Has anyone a solution, or is this perhaps a bug in Servoy?
Thanks for your reply.
Servoy Developer
Version 3.5-build 513
Java version 1.6.0_02-b06 (Windows XP)