Exadel Studio Pro: Getting Started Guide For Creating A JSF Application
Exadel Studio Pro: Getting Started Guide For Creating A JSF Application
page 2 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
page 3 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
inputname.jsp
30. Click on the Diagram tab for the configuration file editor.
31. Open the editor for this first JSP file by double-clicking on the /pages/input-
name.jsp icon.
page 4 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
The Visual Page Editor will open in a screen split between source code along the top and
a WYSIWIG view along the bottom:
Some JSF code will already be in the file because we selected a template when creating the page.
32. Select the Visual tab, so we can work with the editor completely in its WYSIWYG
mode.
33. To the right of the editor, in the Exadel Palette, expand the JSF HTML palette folder
by selecting it.
34. Click on form within this folder, drag the cursor over to the editor, and drop it inside
the red box in the editor.
page 5 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
Another red box will appear inside the first red box.
35. Right-click on the innermost box and select <h:form> Attributes from the menu.
36. In the value field next to id, type greeting and click on the Close button.
37. Type Please enter name: inside the boxes.
38. Select inputText within the JSF HTML palette folder and drag it into the innermost
box in the editor after “Please enter name: ”.
39. In the attributes dialog, click in the value field next to the value attribute and click
on the ... button.
40. Then, select the Managed Beans/personBean/name node and click on the Ok
button
41. Back in the attributes dialog, select the Advanced tab, type in name as the value
for the id attribute, and then click on the Finish button.
42. Select commandButton within the JSF HTML palette folder and drag it into the
innermost box in the editor after the input box.
43. In the attributes dialog, click in the value field next to the action attribute and click
on the ... button.
44. Then, select the View Actions/greeting node and click on the Ok button.
45. Back in the attributes dialog box, type in Say Hello as the value for the value
attribute (" Say Hello ") and then click on the Finish button.
The source coding should be something like this now:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<html>
<head>
<title></title>
</head>
<body>
<f:view>
<h:form id="greeting">
Please enter a name:
<h:inputText id="name" value="#{personBean.name}"/>
<h:commandButton value=" Say Hello " action="greeting"/>
</h:form>
</f:view>
</body>
</html>
page 6 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
46. Save the file by selecting File/Save from the menu bar.
greeting.jsp
47. Click on the faces-config.xml tab to bring the diagram back.
48. Open the editor for the second file by double-clicking on the /pages/greeting.jsp
icon.
49. Select the Visual tab, so we can work with the editor completely in its WYSIWYG
mode.
50. Type Hello (note space after hello) into the box.
51. Select outputText within the JSF HTML palette folder and drag it into the inner-
most box in the editor after “Hello ”.
52. In the attributes dialog, click in value field next to the value attribute and click on
the ... button.
53. Then, select the Managed Beans/personBean/name node, click on the Ok but-
ton, and then click on the Finish button.
54. Right after the output field, type an exclamation point (!).
page 7 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
<html>
<head>
<title></title>
</head>
<body>
<f:view>
Hello <h:outputText value="#{personBean.name}"/>!
</f:view>
</body>
</html>
55. Save the file.
page 8 of 9
Exadel Studio Pro: Getting Started Guide for Creating a JSF Application
60. Start up Tomcat by clicking on the first icon from left. (If Tomcat is already running,
stop it by clicking on the third icon from the left and then start it again. Remember,
the JSF run-time requires restarting the servlet engine when any changes have been
made.)
After the messages in the Console tabbed view stop scrolling, Tomcat is available.
61. Click on the Exadel run icon in the toolbar.
page 9 of 9