0

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?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
asyard
  • 1,743
  • 5
  • 21
  • 43
  • Just curious, why exactly do you want to get rid of the prepended ID? – BalusC May 11 '11 at 11:50
  • hi BalusC, the reason is beacuse of my jquery validation script. when i write – asyard May 11 '11 at 14:50
  • See http://stackoverflow.com/questions/5878692/how-to-use-jsf-generated-html-element-id-in-css-selectors – BalusC May 11 '11 at 15:39
  • balusC, thank you so much. i think as a newbie I will ask these simple questions and we will meet again many times :) – asyard May 11 '11 at 16:16

1 Answers1

2

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>
r.piesnikowski
  • 2,911
  • 1
  • 26
  • 32