In my flowUI application, when I am calling an editor screen, I can pass any parameter which is a field of the editor screen as discussed in one of my posts here. However, this is only limited to the fields of the editor view
In a different example below, when I click of the button marked 1, I am showing a dialog to display a list of employees, here is my code:
@Subscribe("selectEmployeeBtn")
public void onSelectEmployeeBtnClick(ClickEvent<Button> event) {
DialogWindow<View<?>> window =
dialogWindows.lookup(this, EmployeeProfile.class)
.withSelectHandler(selectedItems -> {
for(EmployeeProfile employeeProfile : selectedItems){
AttendLogManualLine line = dataContext.create(AttendLogManualLine.class);
line.setEmployeeProfile(employeeProfile);
line.setAttendLogManual(getEditedEntity());
attendLogManualLineDc.getMutableItems().add(line);
}
})
.build();
window.open();
}
This works well.
Now I want to filter the list of employees with the company selected (marked 2 in the screen-shot above).
How can we achieve this option? Can send the company as a parameter or how can we get the employeesDl from where I am opening the dialog?