Hi All!
I have problem with a table bound to a mapped model node in my contex.
But first let me descripte how my project setup is.
I have 2 views and a custom controller
The first view(view1) consist of a dropdown by key, which has som employee numbers and names.
the second view(view2) has a table, which displays some data for the selected employee(in view1).
The flow is as this:
when an employee is selected from the dropdown, an event is fired, which calls a method in my custom controller
with the employee nr as parameter (eg: wdthis.wdgetcust.getEmployeeinfo(pernr) )
in my custom controller i then
take the current model element an set the new employee nr, before executing it:
wdContext.current__Teamrtre__Hr_Accident_Getlist_InputElement().setPernr(pernr); wdContext.current__Teamrtre__Hr_Accident_Getlist_InputElement().modelObject().execute();
after this i call the invalidate on the output(which the table is bound to, so that the table will refresh)
And the table does refresh, but it just dont remove the
info for the last employee selected.
so for every employee i select in the dropdown menu, there is added af new line to the table.
and what i wanted was to show info only for the employee selected.
Does anyone know what I do wrong?
and is there a way to remove all entrys
in the table, before executing the call with the new employee nr. as import paramter ?
Help is Much apreciated!
Kind regards
Ronni Hostrup