I'm trying to make a registration application using JSF 2.0 with jsp as pages. My page has several input fields, once the user enters all the data and clicks on the submit button, database has to be updated with user entered data. I want to generate a popup window here stating that "REGISTRATION COMPLETE, your REFERENCE ID is 00001" where the reference ID is from back end.
Here is the code which I tried
<h:commandButton id="submitBtn" value="Submit" action="#{regBean.submitDetails}" onclick="javascript:popUp('registrationNum.jsp')" />
The registrationNum.jsp
is
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<f:view>
<h:panelGrid>
<f:facet name="header">
<h:outputText value="#{regBean.regNum}" ></h:outputText>
</f:facet>
</h:panelGrid>
</f:view>
</body>
</html>
But I'm unable to display the registrationNum.jsp
.