Simple JSF Application (Part II)
25 December 2007We were making a simple JSF application in Simple JSF Application (Part I). We have already discussed the first page. Now we look into second page, on which, we will move after entering a number and clicking submit button on first page i.e. welcome.jsp. Second page is factor.jsp. On the first page, we get a number as input, on this page we will display factors of that number.
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <f:view> <html> <head> <title> Factors </title> </head> <body> <h:form id="factorForm"> <h:outputText id="factorOutput" value="Factors of " style ="color: blue"/> <h:outputText id="welcomeBeanOutput" value="#{welcomeBean.numControls}"/> <br/> <h:panelGrid id="controlPanel" binding="#{welcomeBean.htmlPanel}" columns="5" border="1" cellspacing="0"/> </h:form> </body> </html> </f:view>
This jsp file has almost same components, which we have seen in the previous file with one exception. In the start there are imports. Then
Related Posts:
Top Of Page | Trackback
If you found this page useful, consider linking to it. Simply copy and paste the code below into your web site.
It will look like this: Simple JSF Application (Part II)