get the id of a component attached to a template.

I have a polymer template with an element.

<wizard-controller>
<template>
	<div id="page1"></div>
	<div id="page2"></div>
	...

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.

Is there some way to get the Components id?

I guess one approach would be reading the annotations of the class member fields for the @Id annotated fields: https://stackoverflow.com/questions/4453159/how-to-get-annotations-of-a-member-variable

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?

https://github.com/vaadin/flow should be fine (issues can be moved between repositories if needed).

I’ve opened an issue:

https://github.com/vaadin/flow/issues/5428