JBoss.orgCommunity Documentation

Chapter 3. Reference

3.1. JBoss Portlet Descriptors
3.2. Wizards
3.2.1. Java Portlet Wizard
3.2.2. JSF/Seam Portlet Wizard
3.3. JBoss Portlet Preferences

This chapter includes detailed reference information about JBoss Portlet Tools.

In order to a web project with portlets could be deployed to JBoss Portal, it should include certain descriptors. The next table lists and describes these configuration files.


For more detail information about each descriptor, see "Portlet Descriptors" in Chapter 6, "JBoss Portal Reference Guide".

This section describes the JBoss Portlet Tools wizards:

The Java Portlet wizard helps you create a new Java portlet (1.0 or 2.0). It is based on the WTP's Create Servlet wizard, but adapted to JBoss Portlet. You can call it from the File or context menu of your project by following to New > Other > JBoss Tools Web > Portlet > Java Portlet.

The wizard consists of the four pages:

  1. The first one includes the next options to adjust:


  2. The second wizard page is for specifying modifiers, interfaces to implement and method stubs to generate.


    The descriptions of the options listed on this page are in the following table.


  3. The third page is for adjusting the portlet deployment descriptor settings.



  4. The last wizard page helps configure the JBoss Portlet specific descriptors.



The JSF/Seam Portlet wizard, that is merged into one JSF and Seam Portlet wizards, helps you create a JSF/Seam portlet that uses the JBoss Portlet Bridge libraries. The default values in this wizard depend on the configuration set for the project. For instance, if you set the JSF configuration, the default values in this wizard will be as for a JSF portlet.

The JSF/Seam Portlet wizard could be started from the File or context menu of your project by following to New > Other > JBoss Tools Web > Portlet > JSF/Seam Portlet.

The wizard includes three pages to adjust JSF/Seam portlet setting:

  1. The first wizard page asks to select a project to add JSF/Seam portlet and set a class file destination.



  2. The second page allows to configure a portlet deployment descriptors.



  3. The last wizard page helps you configure the JBoss Portlet specific information.


    Table 3.8. JSF/Seam Portlet Wizard. Third Page Options.

    OptionDescriptionDefault (JSF / Seam)
    Create Portlet InstanceClear the Create Portlet Instance check box, if you don't wont the wizard to create the deployment elements in the default-object.xml and portlet-instances.xml filesSelected
    If ExistsSelect one of two options:
    • overwrite - destroys the existing object and creates a new one based on the content of the deployment

    • keep - maintains the existing object deployment or creates a new one if it does not exist

    overwrite
    Instance NameEnter a name of the portlet instance that the portlet window representsJSFPortletInstance / SeamPortletInstance
    Page NameIf set, the portlet page is created with the name definedJSFPortlet / SeamPortlet
    Window NameEnter a name of the portlet windowJSFPortletWindow / SeamPortletWindow
    Parent Reference

    Define a reference to the parent object.

    For example, default means that the page appears in the default portal.

    default
    RegionSpecify the region where the window should appear on the pagecenter
    HeightDefine the height of the window1
    Initial Window StateSet the window state indicator by selecting one of three states defined by the JSR-168 specification:
    • normal - a portlet shares this page with other portlets

    • minimized - a portlet may show very little information or none at all

    • maximized - a portlet may be the only portlet displayed on this page

    maximized
    Create JBoss Application

    Select to add the jboss-app.xml descriptor.

    riPortletApp / seamPortletApp - the default name of the JBoss application. You can change it by typing a new one in the JBoss Application Name field.

    Selected
    Add the jboss-portlet.xml fileSelect to create the jboss-portlet.xml fileSelected
    Copy JSF TemplatesSelect to add the folder with JSF templates (edit.jsp, help.jsp, view.jsp) to the projectCleared

To open JBoss Portlet Preferences property sheet, go to WindowPreferences and then JBoss ToolsJBoss Portlet.


The Check runtimes for Portlet Components option makes the JBoss Portlet functionality always visible no matter what the runtime is set. By default the option is checked.