<h:inputtext>以表单形式呈现问题</h:inputtext>

时间:2011-05-11 06:14:21

标签: jsf facelets

我有一个关于渲染简单<h:inputText>值的问题。我写的时候

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

它的输出是

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

有没有像这样的输出没有form:xxx

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

minlength也不能与<h:inputText>一起使用。如果没有为表格中的每个数据编写javascript,你有什么想法吗?

1 个答案:

答案 0 :(得分:2)

是的,这是可能的。您应该在h:form

中添加 prependId 属性
<h:form prependId="false" id="form1">
Now everything won't have prefix form1
</h:form>
相关问题