primefaces: CommandButton: when ajax=false, it doesn't work when used inside composite component with a form

Describe the bug

When using a composite component which has a h:form inside and using cc:renderFacet to put a p:commandButton with ajax=false inside, that page won’t render with the following error:

FacesException: CommandButton : "j_id_7:j_id_8" must be inside a form element
    at org.primefaces.component.commandbutton.CommandButtonRenderer.buildRequest (CommandButtonRenderer.java:153)

I think this issue might be related to #8317

Reproducer

primefaces_test.7z

Expected behavior

Primefaces should be able to detect that the p:commandButton is inside a h:form already even though the h:form is inside the composite component

PrimeFaces edition

Community

PrimeFaces version

11.0.0

Theme

ALL?

JSF implementation

All

JSF version

ALL?

Browser(s)

ALL?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Unfortunately as far as I can see that is the only workaround for now that would actually work.