I need to determine the ID of a form field from within an action handler. The field is a part of a included facelets component and so the form will vary.
included.xhtml
<ui:component>
<h:inputText id="contained_field"/>
<h:commandButton actionListener="#{backingBean.update}" value="Submit"/>
</ui:component>
example_containing.xhtml
<h:form id="containing_form">
<ui:include src="/included.xhtml"/>
</h:form>
How may I determine the ID of the form in the update
method at runtime? Or better yet, the ID of the input field directly.