开发者

<h:inputText> render problem in a form

开发者 https://www.devze.com 2023-03-04 20:24 出处:网络
i have a question about rendering a simple <h:inputText> value. When i write <h:inputText id=\"username\" value=\"#{userBean.user.username}\" />

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

精彩评论

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