CommandButton: when ajax=false, it doesn't work when used inside composite component with a form
See original GitHub issueDescribe 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
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?
Issue Analytics
- State:
- Created a year ago
- Comments:17 (17 by maintainers)
Top Results From Across the Web
commandButton doesn't work in facets of composite components
i've got a problem with a p:commandButton in a facet which will be rendered in a h:form by the composite components feature.
Read more >jsf 2 - PrimeFaces CommandButton Action not called inside ...
When you used the composite component, was it already placed in ... When you have nested forms, command button action isn't triggered.
Read more >MenuItem: doesn't work when used inside composite ... - GitHub
Caused by: javax.faces.FacesException: MenuItem must be inside a form element at org.primefaces.renderkit.MenuItemAwareRenderer.
Read more >Use a command button to start an action or a series of actions
Open the form in Design view by right-clicking the form in the Navigation Pane, and then clicking Design View Button image · In...
Read more >Problem with primefaces monitorDownload - Forums - Liferay
1) The p:commandButton component with ajax="false" is executing a full page postback using the "action" attribute of the surrounding <form> element.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Unfortunately as far as I can see that is the only workaround for now that would actually work.
Yeah Thats very hard, and If you find one, you are not sure If its really the parent one