asyard
asyard

Reputation: 1743

<h:inputText> render problem in a form

i have a question about rendering a simple <h:inputText> value. When i write

<h:inputText id="username" value="#{userBean.user.username}" />

it's output is

<input id="form:username" name="form:username" type="text" />

is there a way for an output without form:xxx like this?

<input id="username" name="username" type="text" />

Also minlength is not working with <h:inputText>. do you have an idea without writing javascript for each data in form?

Upvotes: 0

Views: 1221

Answers (1)

r.piesnikowski
r.piesnikowski

Reputation: 2951

Yes it's possible. You should add prependId attribute inside h:form

<h:form prependId="false" id="form1">
Now everything won't have prefix form1
</h:form>

Upvotes: 2

Related Questions