0
I’m doing a project with JSF and I’m also using common HTML fields and buttons in some forms.
Excerpt from my (X)HTML
<div class="clearfix">
<input class="small DDD" type="tel" placeholder="DDD"
maxlength="2" name="DDD" id="DDDFb"
onkeypress="return onlyNumbersValue(event);" />
<input class="medium telefoneFb" type="tel" maxlength="9"
placeholder="Digite seu Telefone" name="fone" id="phoneFb"
onkeypress="return onlyNumbersValue(event);"></input>
<input type="hidden" id="fb_phoneId" name="phoneId" />
</div>
<input type="submit" value="Cadastrar" id="cadastrarTel" />
I want to know how to take the value that the user typed and send to my Setcampo in JSF without using the <h:inputText value="#{meuBean.contato.ddd}">
and <h:commandButton action="#{meuBean.cadastrar}" value="Cadastrar">
.
Why don’t you use JSF yourself? It’s because of the appearance?
– Renan Gomes
Yes, because of the appearance and because I had difficulty taking Javascript data and passing to JSF fields. with pure HTML works without difficulties.
– Luiz