I have a simple PaneTemplate I am setting up like this:
Row row1 = new Row.Builder().setTitle("Do Thing 1").build();
Row row2 = new Row.Builder().setTitle("Do Thing 2").build();
Row row3 = new Row.Builder().setTitle("Do Thing 3").build();
Row row4 = new Row.Builder().setTitle("Do Thing 4").build();
return new PaneTemplate.Builder(new Pane.Builder().addRow(row1).addRow(row2).addRow(row3).addRow(row4).build()).setTitle("AA Hello!!").build();
and it all works fine and looks like this:
but if I add setOnClickListener to one of the rows:
Row row1 = new Row.Builder().setTitle("Do Thing 1").setOnClickListener(this::onClick).build();
I get an exception: "a click listener is not allowed on the row"
I get an error:
I have not read about this restriction in any of the AA documentation. I tried making the onClick function anything number of things, including a blank function, and it makes no difference. Any idea what is going on here? How can I get around it? I want the press of this item to do something.