0

I'm using Primefaces 6.x and JSF 2.x

I have a 'breadCrumb' and then I have put a CommandButton for 'Options' facet.

I'm seeing the button is generated with 'type=submit' instead of 'type=button' and cuz of it the form is getting submitted when the button is click.

Could you please advice why it is happening like that?

If I put the button outside of breadcrumb, the button is rendered as expected.

Thanks,

Nghia Do
  • 2,588
  • 2
  • 17
  • 31
  • See here: http://stackoverflow.com/questions/25339056/understanding-primefaces-process-update-and-jsf-fajax-execute-render-attributes – Kukeltje Apr 05 '17 at 13:17

1 Answers1

1

Is your button wrapped by a form in both cases? Maybe this makes the difference.

To explicitly reduce the processing to the given button, you can set its process attribute:

<p:commandButton ... process="@this" />

See also:

Community
  • 1
  • 1
Jens Piegsa
  • 7,399
  • 5
  • 58
  • 106