Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Component Overview

The PortletBrowser javascript component is a Fluid-based uPortal component designed to assist users in browsing their portlet registry. Examples of this component's use within uPortal include both the "add portlet" interface in the main user layout and the portlet listing table presented as the first screen in the Portlet Administration portlet.

Component Options

Subcomponents

The PortletBrowser delegates functionality to a number of uPortal-specific subcomponents. These subcomponents include the PortletRegistry, as well as three view components. These three views create the user-visible interface associated with the component; the top-level component has no associated markup and its configuration does not include any selectors. The markup for all three views is expected to be contained within the container provided during the top-level component initialization.

CategoryListView

PortletListView

SearchView

Component State

The PortletBrowser maintains a "state" property map capable of tracking information about the user's browsing and searching operations. These properties are visible to subcomponents and may be accessed by them, but should not be directly updated by the subcomponents themselves. Write operations to the state map are generally expected to be performed via configured event listeners.

State property

Description

currentCategory

Currently-browsed category. May be left null or set to a blank string to match all portlets (including those not in categories).

portletRegex

Javascript RegExp representing the current search request, if any. May be left null to match all portlets within the currently defined category

Supported Events

Event

Description

Parameters

Parameter Description

onCategorySelect

Fired whenever the user selects a category (or selects the null category). In the default event listener, the component state is updated with the newly selected category, after which the category and portlet views are refreshed.

that, category

that is the overall component that
category is the JSON representation of the selected category

onPortletSearch

Fired whenever the user updates the portlet search term or submits a search request. In the default event listener, the component state is updated with the new portlet search term, after which the portlet view is refreshed.

that, searchTerm, submitted

that is the overall component that
searchTerm is the new String-based portlet search term
submitted indicates whether this event represents a form submission (true) or simply an input field update (false)

onPortletSelect

Fired whenever the user selects a portlet. This event has no default listeners.

that, portlet

that is the overall component that
portlet is the JSON representation of the selected portlet

  • No labels