p:button with h:form - 2.2M1-SNAPSHOT

UI Components for JSF
Post Reply
gledson_rabelo
Posts: 2
Joined: 28 Aug 2010, 00:15

28 Aug 2010, 00:23

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

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

28 Aug 2010, 01:26

What do you mean by not working, what happens, can you provide your code?

callahan
Posts: 768
Joined: 27 May 2010, 22:52

28 Aug 2010, 01:49

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;"

gledson_rabelo
Posts: 2
Joined: 28 Aug 2010, 00:15

30 Aug 2010, 18:43

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';">

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

30 Aug 2010, 19:10

This should be fixed yesterday.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 27 guests