I am new to jsf and doing the following: For example, i ask user to fill a form, and then submit it. After submitting, i want to show whether submission is successful. To do this i create another html page and after submission, if it is successful i redirect page to this new successful html page. So, i have a lot of web pages in my project. My question is, is that a bad thing? Are there any other solutions that i can try instead of creating many "successful" pages? Here is how i do it:
<h:form>
<h:panelGrid columns="2">
<h:outputText value="Select one:"></h:outputText>
<rich:select defaultLabel="Select..." value="#{account.accountCurrency}" >
<f:selectItem itemValue="a" itemLabel="a" />
<f:selectItem itemValue="b" itemLabel="b" />
<f:selectItem itemValue="c" itemLabel="c" />
</rich:select>
<h:commandButton value="Submit" action="#{selection.approve}" ></h:commandButton>
</h:panelGrid>
</h:form>
And in my managed bean i do following:
public void approve() {
// check whether it is successful, then redirect to successful page
}
Thanks