Page 1 of 1
p:button with h:form - 2.2M1-SNAPSHOT
Posted: 28 Aug 2010, 00:23
by gledson_rabelo
I'm using p:button component of 2.2M1 release and it isn't working when I put it between h:form tags.
Without h:form tag, the component work perfectly.
Is this behavour a bug?
Thanks,
Gledson
Re: p:button with h:form - 2.2M1-SNAPSHOT
Posted: 28 Aug 2010, 01:26
by cagatay.civici
What do you mean by not working, what happens, can you provide your code?
Re: p:button with h:form - 2.2M1-SNAPSHOT
Posted: 28 Aug 2010, 01:49
by callahan
There's a "return false;" missing at the end of the Javascript onclick handler rendered by p:button. This means that the GET is aborted just after it starts and the the form is POSTed.
onclick="window.location.href='/jsf/view/navigation/navigation.xhtml';"
should be
onclick="window.location.href='/jsf/view/navigation/navigation.xhtml'; return false;"
Re: p:button with h:form - 2.2M1-SNAPSHOT
Posted: 30 Aug 2010, 18:43
by gledson_rabelo
exactly callahan!!!
The "return false;" is missing in p:button...
Code: Select all
<button id="j_idt23" name="j_idt23" onclick="window.location.href='/projetopilotoarquitetura-web/ListaRotinas.faces';">
Re: p:button with h:form - 2.2M1-SNAPSHOT
Posted: 30 Aug 2010, 19:10
by cagatay.civici
This should be fixed yesterday.