"The form component needs to have a UIForm in its ancestry. Suggestion: enclose the necessary components within <h:form>"
Tried to include a commandbutton in the empty test page in freya, looking like this:
Code: Select all
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="/WEB-INF/template.xhtml">
<ui:define name="title">Empty Page</ui:define>
<ui:define name="content">
<div class="grid">
<div class="col">
<div class="card">
<h4>Empty Page</h4>
<p>This is your empty page template to start building beautiful applications.</p>
<h:form>
<p:growl id="messages" showDetail="true" />
<p:commandButton value="Test" action="#{sessionController.test}" ajax="true"/>
</h:form>
</div>
</div>
</div>
</ui:define>
</ui:composition>
And I still get the same error. What am I missing here or is there a bug in the Freya theme or?
BTJ