Java Reference
In-Depth Information
Click here to view code image
<managed-bean eager="true">
<managed-bean-name> Book201 </managed-bean-name>
<managed-bean-class> dukesbookstore.model.ImageArea </managed-
bean-class>
<managed-bean-scope> application </managed-bean-scope>
<managed-property>
<property-name>shape</property-name>
<value>rect</value>
</managed-property>
<managed-property>
<property-name>alt</property-name>
<value>Duke</value>
</managed-property>
<managed-property>
<property-name>coords</property-name>
<value>67,23,212,268</value>
</managed-property>
</managed-bean>
Using NetBeans IDE, you can add a managed bean declaration by doing the following:
1. After opening your project in NetBeans IDE, expand the project node in the Pro-
jects pane.
2. Expand the Web Pages and WEB-INF nodes of the project node.
3. If there is no faces-config.xml in the project, create one as follows:
a. From the File menu, choose New File.
b. In the New File wizard, select the JavaServer Faces category, then select JSF
Faces Configuration and click Next.
c. On the Name and Location page, change the name and location of the file if
necessary. The default file name is faces-config.xml .
d. Click Finish.
4. Double-click faces-config.xml if the file is not already open.
5. After faces-config.xml opens in the editor pane, select XML from the sub-
tab panel options.
6. Right-click in the editor pane.
7. From the Insert menu, choose Managed Bean.
8. In the Add Managed Bean dialog box:
Search WWH ::




Custom Search