My h:commandLink doesn't work. I've got a navigation rule in the faces-config.xml and a String method doSave() in my bean. I don't know why It only reloads the page without jumping into the doSave() method.
jsf-page
<h:form id="surveyForm">
<div class="srvButton">
<h:commandLink action="#{surveyBean.doSave}" value="#{msg.srvButton}" />
</div>
</h:form>
faces-config
<navigation-rule>
<from-view-id>/pages/survey.xhtml</from-view-id>
<navigation-case>
<from-outcome>success</from-outcome>
<to-view-id>/pages/surveyFinish.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
bean
public String doSave() {
// Kundendaten speichern
saveCustomer();
return "success";
}
I cleaned the content in the jsf-page for a better view, but all you need to know is the form and button I think.
h:messagestag in your form? - Matt Handyh:selectOneRadio,t:inputTextand oneh:dataTabletag within the form. I've got an similar webpage and there it works, but I can't find the differences - yves.beutlerh:messages. It displays all validation errors and you will get more insight on what happens. - Matt Handy