So I have developed a web app using JSF and have names and ids for my buttons/text input fields. But when I open up the web page and do Inspect Element, I do not see the corresponding name/id for each field. Instead, I see this: j_idtx:j_idty, where x and y are some numbers, such as: j_idt2:j_idt5.
I do not see this problem when developing using JSP instead of JSF.
Here is a sample code that sets a button to a certain name:
<ui:composition template="WEB-INF/templates/BasicTemplate.xhtml">
<ui:define name="content">
<h:form>
<h:commandButton action="login_page" value="Login" name="loginButton"></h:commandButton>
<br></br>
<br></br>
<h:commandButton action="registration_page" value="Register" name="registrationButton"></h:commandButton>
</h:form>
</ui:define>
</ui:composition>
So how can I make sure my names and ids appear correctly?
Thanks