I could not get this option to work with screens count > 1 problem. It selects a wrong record. Here's the navigation class according to your example you did sometimes before to another navigation problem:
public static class NavigateToTasojenTuotteet implements TerminalAction {
public void perform(TerminalSession session, Object entity, Object... keys) {
// don't continue if no keys passed in URL
if (keys.length == 0) {
return;
}
if (session.getEntity() instanceof TuotekuvastonHakemisto) {
TuotekuvastonHakemisto tuotekuvastonHakemisto = (TuotekuvastonHakemisto) session.getEntity();
// get and iterate through all rows
List<TuotekuvastonHakemistoRecord> records = tuotekuvastonHakemisto.getTuotekuvastonHakemistoRecords();
for (TuotekuvastonHakemistoRecord record : records) {
// if current row matches the request key, mark it with T
if (record.getAvain().equals(keys[0])) {
record.setValinta("T");
break;
}
}
// send the modified screen (with "T" mark)
session.doAction(TerminalActions.ENTER(), tuotekuvastonHakemisto);
}
}
public boolean isMacro() {
return true;
}
}
Should that be modified somehow? The problem is also I cannot debug that like I wrote in another question today.