I have a java class that binds to a number of elements
@Id("page1")
Div page1;
@Id("page2")
Div page2;
The template sends me an event which includes the id of the element that generated the event
this.$server._onNext("page1);
The java code accepts the onNext call and needs to match the passed Id to the appropriate page
@ClientCallable
public void _onNext(String pageId)
{
if (page1.getId().equals(pageId))
page1.doSomething();
else if (page2.getId().equals(pageId))
page2.doSomething();
}
The problem is that ‘getId()’ returns an empty optional.
i did think of that but it felt crude and unnecessary.
flow seems to encourage custom components that communicate back to the server access to the id seems like it should be in the Java api.
i was quite surprise that it wasn’t available given the template parser had access to the ids.
which repo should i put an enhancement request into?