Мне нужно добавить форму к небольшой части функциональности AJAX, реализованной в GWT. В HTML-выражениях я хотел бы
<label for="personName">Name:</label><input type="text" size="50" id="personName"/>
Кажется, виджет Label в GWT просто отображается как DIV.
В идеале я бы хотел щелкнуть по тексту метки, чтобы сфокусировать соответствующий вход. Это встроенная функция браузера, с которой я не хочу общаться с ClickHandlers на ярлыках ярлыков!
Кто-нибудь сталкивался с этой проблемой? Существует ли как встроенный виджет, но называется чем-то еще?
EDIT: Придумали следующее. Может быть, есть лучший способ?
HTML label = new HTML();
label.setHTML("<label for='"+input.getElement().getId()+"'>"+labelText+"</label>");