开发者

<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 <开发者_Python百科;h:inputText>. do you have an idea without writing javascript for each data in form?


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜