my xhtml form code :
<h:inputText id="name" value="#{customer.name}"
size="20" required="true"
label="Name" onblur="alert(this.value())" >
</h:inputText>
Now when I view source it renders to
<input id="j_idt22:name" name="j_idt22:name" onblur="alert(this.value())" size="20" type="text">
If we check their is a prefix appended to it: j_idt22:,
I want to get this prefix name in my bean form.
how I can achieve that?
To avoid dynamically generated ids in JSF component you could use
<h:form prependId="false">
You can directly get the values binded with your managed bean
If you want to retrieve list of names then you could use request.getParameterMap()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With