JBoss.org Community Documentation

- Prev

## Chapter 5. Category, Portlets and Gadgets Administration

To administrate category, portlet and gadget, you first need to go to Application Registry by selectingGroup, thenAdministration, and Application Registry on the Toolbar. The form to organize portlets/gadgets into different categories will be displayed as below

Details:

- Tab bar consists of three items, including Categories , Portlet, Gadget.

- Action bar consists of some actions related to a category.

- Left pane lists all categories and portlets of each category.

- Breadcrumb bar is the path from a specific category to a specific portlet in that category.

- Right pane provides detailed information of a specific portlet.

## 5.1. Manage Categories

### 5.1.1. Add a new category

1. Click on the action bar to open the form to add a new category.

   Details:

   In theCategory Settingtab:

   Category name

     The category's name that you want to add. This field is required and its length must be between 3 and 30 characters.

   Display name

     The display name of the category and its length must be between 3 and 30 characters.

   Description

     A brief description of the category. Any length from 0 to 255 characters is allowed.

2. Enter values in the Category Setting tab.

3. Set access permission for your category. Accordingly, another users can only view and use portlets in your category to which they have access.

   For more details about how to set access permission, refer toSection 4.7, “Manage Permissions”.

4. Click Save to accept adding a new category to the categories list. Your newly created category will be added to the list in the left pane.

### 5.1.2. Edit a Category

1. Click the Edit icon located next to the title bar.

2. Update the category information.

3. Click the Save button to apply changes.

### 5.1.3. Delete a Category

1. Click the Trash can icon located next to the title bar.

2. Click OK to accept deleting in the confirmation message.

### 5.1.4. Add Portlets/Gadgets to a Category

This function helps you add portlets to a specific category easily as follows:

1. Click the icon located next to the category name to which you want to add portlets/gadgets.

   Display name

     The display name of a portlet/gadget.

   Application Type

     Either Portlet or Gadget.

2. Enter the display name and select an application type.

3. Select a portlet/gadget by checking the radio button.

4. Click the Save button to add the selected portlet/gadget to the category.

The selected portlet/gadget will be added to the category in the left pane.

## 5.2. Manage Portlets and Gadgets

### 5.2.1. Import portlets and gadgets

This feature enables you to import default portlets and gadgets into different categories as follows:

## Note

The Application Registry looks in all webapps of your application server for a file located at WEB-INF/portlet.xml and registers the portlets found there. When the user clicks on "Auto Import" the portlets of all webapps are imported. If there is a portlet.xml file in a webapp a new category is created whose name is the webapp war name (or the webapp folder name). All the portlets that are configured in the portlet.xml file are added to the new category.

1. Click at the right corner on the action bar.

2. Click OK to accept importing portlets and gadgets automatically in the confirmation window.

   All portlets and gadgets of all categories will be imported and listed on the left pane.

### 5.2.2. View/Edit detailed information of portlet/gadget

To view detailed information of portlet/gadget, simply select one portlet/gadget in the left pane. The detailed information of that portlet will be shown on the right pane.

Left pane

  All portlets and gadgets grouped by categories

Right pane

  shows detail information about a portlet: Name, Display name, Description and Portlet preferences.

To edit a portlet, click on the top corner of right pane. The form to edit will appear:

Make changes in fields, except Application Name.

### 5.2.3. Display Gadgets

You can change the number of columns available in the Dashboard Portlet.

1. Click Site Editor, then select Edit Page

2. Click Edit Portlet button (which is displayed a pencil icon when you mouse-over the portlet in edit mode). It will show a dialog to change the number of columns to display gadgets.

3. Change the number of columns and click the Save button to accept the changes.

### 5.2.4. Set Access Permission on Portlets

1. In the Group menu, select Administration and then Application Registry.

2. Select a category in the Category pane that includes the portlet you want to set permissions on. All portlets of that category will be listed underneath.

3. To set permission for a portlet:

   - Click the Add Permission button to add access permissions to more groups.

   - Or check Make it public to allow everyone to access.

   Whenever the user creates or modifies a page, he or she can only see and use gadgets/portlets that fulfill two conditions: the portlet is in a category which the user has access permission too and the user has access permission on the portlet

### 5.2.5. Edit a specific portlet

This section tells you how to access the edit mode of a portlet and edit it.

1. Create or edit a page as stated in Section 4.1.3, Edit a portal. In this step, there will be a container that contains and arranges portlets as contents of that page. You can add a portlet to that page by dragging it from the left pane and dropping it into this container space.

2. Open the form to edit a portlet by clicking at the upper left corner of that portlet:

3. Enter new values that you want to edit in this form, then click Save to save new values:

   Normally, a portlet has four tabs: Window Setting, Select Icon, Decoration Themes and Access Permission. In addition, some portlets may also have Edit Mode or Preferences. The administrator can change the interface of a portlet by changing values in the Edit Mode tab or in the Preferences Tab.

   The Portlet Setting tab includes:

   Display Name

     The display name of portlet.

   Window Title

     The window title with the length between 3 and 60 characters..

   Width

     The portlet's vertical size. The value of this field must be in numeric format.

   Height

     The portlet's horizontal size. The value of this field must be in numeric format.

   Show Info Bar

     The option enables the information bar to be shown or hidden.

   Show Portlet Mode

     The option enables the portlet mode to be shown or hidden.

   Show Window State

     The option enables the portlet's window state to be shown or not.

   Description

     The brief information about the portlet. The length must be between 0 and 255 characters.

   ## Note

   If Show Info Bar is not checked, portlet mode and window state will not be displayed in that portlet.

   The Select Icon tab enables you to select an icon for the portlet. By clicking Get Default, you do not have to choose any icon from the list, the suitable icon will be gotten automatically.

   The Decoration Themes tab enables you to select a theme for the portlet from the themes list. By clicking Get Default, you do not have to choose any theme, it will be automatically set.

   The Access Permission tab enables you to set the access permission on the portlet. The portlet can be made public to everyone or restricted to specific groups. See more details at Section 4.7, “Manage Permissions”.

## Note

Some portlets have Edit Mode and Preferences tabs.

The Mode tab where administrator can define the interface details.

### 5.2.6. Add a Gadget

In the Group menu, select Administration then Application Registry. Click the Gadget icon.

You may add a remote gadget using its URL or create a brand-new one:

Procedure 5.1. Add a remote Gadget

1. Click Add a remote gadget:

2. Enter the URL of the remote gadget in the URL field.

3. Click Add. The new remote gadget will be appear in gadget list on left pane of the Dashboard portlet.

Procedure 5.2. Create a new Gadget

1. Click Create a new gadget:

2. Populate the `Source` field with the XML code of the new gadget.

You can edit or refresh a gadget using the icons in the top right of the Gadget Details pane.

You can delete a local gadget using the trashcan icon to the right of the appropriate gadget in the gadget list.

### 5.2.7. Add a new Gadget to the Dashboard Portlet

See Section 3.3.3, “Add Gadgets” for instructions on how to add new gadgets to the dashboard.

### 5.2.8. Edit a Gadget

Click the Edit Gadget icon located in the header of the Gadget Details page to display the following window:

- PrevChapter 4. Portal Administration
- Top of page
- Front page