JBoss.orgCommunity Documentation
This chapter will explain how you can configure JSF Portlet within Dynamic Web Project and JSF Project by using the wizards JBoss Tools provides.
To add JSF Portlet to a Dynamic Web Project, you should set the Configuration to JavaServer Faces v1.1 Project or JavaServer Faces v1.2 Project and configure the JSF Portlet Facets in the New Dynamic Web Project wizard by clicking the Modify button.
On the Project Facets dialog you should select JBoss Core Portlet and JBoss JSF Portlet check boxes.
Next wizard page is for configuring JSF Capabilities. You can leave everything as it is here.
To support Portlets in JSF/Seam applications JBoss Tools works with JBoss Portlet Bridge. Thus on the next page you should add JSF Portlet capabilities by pointing to the Portletbridge Runtime location.
You can download JBoss Portlet Bridge 1.0.0.B4 from Portletbridge Download page.
Next click Finish to organize the Project.
To add JSF Portlet to generated project you should call the Create Portlet wizard by navigating to New > Other > JBoss Tools Web > Portlet > JSF/Seam Portlet.
As you see, the Seam and JSF Portlet wizards are merged into one. We set JSF Configuration for the project, so default values in this wizard will be set as for a JSF portlet.
Click Finish to complete JSF Portlet creation. Now you can deploy the project the same way as it was described above.
In the Browser JSF Portlet looks as follows.
How to organize a JSF Project you can find out in our JSF Tools Reference Guide. Just remember to point Target Runtime to JBoss Portal directory location.
Before adding a Portlet to the project you should enable necessary facets for it. Right-click the created project and click Preferences to open the Project Preferences screen.
On the Project Facets page select the JBoss Core Portlet and JBoss JSF Portlet checkboxes. And then the screen will ask you to enable JavaServer Faces facet as well.
Notice, "Further configuration required..." warning appears at the bottom of the screen. It means that you should click it to configure JSF and JSF Portlet Capabilities in the project.
After setting the path to Portletbridge Runtime location, click OK and then OK again.
Now you can add JSF Portlet to the generated JSF Project. How to do it we showed in the previous section.