Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Anchor
top
top

In This Topic

Table of Contents
maxLevel2

...

Providing proper online help in your plugin is required for certain component types, as described in the guidelines G108 and G147.

Enabling Online Help in a Plugin

The online help plugin is a plugin that is part of the XperienCentral platform and is responsible for collecting and displaying the online help files provided by all plugins that provide help. The online help plugin consists of the online help panel, an OnlineHelpProvider service interface and a online help listener service. The listener service listens to all services being registered that implement the OnlineHelpProvider service interface. If a plugin containing a service that implements this interface becomes available, the listener will receive a notification and retrieve the online help file from that plugin.

...

Note

Since the OnlineHelpProvider interface does not define any methods, it is not necessary to define any methods in the implementation. The implementation of the service itself can be empty.

 

Back to Top

 

...

Providing the Online Help Files

The online help files should be written in XHTML format or in an XML JSP Document format that generates XHTML. Badly formed XHTML will cause the help to be undisplayable. You should always validate the XHTML using a validator such as http://validator.w3.org/. A stylesheet for rendering the online help file is contained in the online help plugin and cannot be customized. online help files are written in a particular locale. The online help framework supports providing online help in multiple locales.

...

Note

A plugin contains only one single help file for each locale. It is not possible to provide multiple separate help files for the individual components contained by the plugin.

 

Back to Top

 

...

Writing the Online Help Files

online help files should be written in XHTML or a XML JSP Document that generates XHTML. The online help plugin generates a table of contents from all online help files provided by all online help-enabled plugins. The table of contents offers the end-user a way to navigate through the available help topics.

...

The IDs in all translations of the help file should match. If anchor IDs are different per language, the context sensitive help will not work properly.

Including Images

Take the next steps to include an image to the help:

...

Note

If you don’t add the <p> … </p> around the image tag, the image will be placed inline with the text. If you want to add some whitespace above and underneath the image, use <p> … </p> around the image tag.

Creating a Reference to a Character in an Image

In some images a special arrow with a character inside it is used to point out the interesting part(s) within the image. In the text surrounding the image it’s useful to refer to this arrow by referring to this character. To add special formatting, do so using HTML tags. For example: <span class="imageletterreference">A</span>

Creating a Link to an External URL

When creating a link to an external website, use the externallink class to ensure the link opens in a new window:

<a href="http://en.wikipedia.org/wiki/Role-based_access_control" class="externallink">Wikipedia RBAC page</a>

Creating a Table

The following HTML shows how to create a table:

...

Code Block
themeEclipse
<dl>
	<dt>Permission category</dt>
	<dd>A permission category is a collection of permissions that belong to one and the same application component. For example:<p />
		<table>
			<tr>
				<th>Application component</th>
				<th>Permission category</th>
				<th>Permissions</th>
			</tr>
			<tr>
				<td>FAQ</td>
				<td>FAQ</td>
				<td>Maintain FAQ sets<br />
				Maintain FAQ questions<br />
				Insert, edit and delete FAQ elements
				</td>
			</tr>
		</table>
	</dd>
</dl>

 

Back to Top

 

...

Adding the Help Button to a Panel

By default, the online help is displayed in the online help panel, but there is no relation with the panel for which the online help was written. To do so a help button must be added to the panel. This must be done in the configurePanel() method of the panel implementation class. This class typically extends PanelBase.

...

Code Block
themeEclipse
public ModelAndView showForm(HttpServletRequest request, HttpServletResponse response, BindException errors, Map controlModel)
	throws Exception {
	ModelAndView modelAndView =  super.showForm(request, response, errors, controlModel);
     
	// Set the help context
	String selectedTabId = myPanel.getTabset().getSelectedTabId();
	if (selectedTabId == null || selectedTabId.equals(OVERVIEW_TAB_ID)) {
    	String action = Activator.WCB_BUNDLE_ID + "/overview"; myHelpButton().setAction(action);
	    }
	    else {
			String action = Activator.WCB_BUNDLE_ID + "/errorlog"; myHelpButton().setAction(action);
	    }
		return modelAndView;
}

 

Back to Top

 

...

Adding the Help Button to an Element

To add a help button to an element, simply implement the getHelpTopicsId method in the form backing object of the element. The method must return the ID of the help topic that has to be displayed when the help button is clicked. This is typically the class that extends ElementFBO. For example, to enable context sensitive help in a custom element plugin, add the following method to the implementation of the form backing object:

...

Code Block
themeEclipse
<h1><a name="introduction">Introduction</a></h1>

 

Back to Top

 

...

Adding the Help Button to a Custom Media Item

To add a help button to the custom metadata part of a custom media item, simply add the getHelpTopicsId method to the form backing object of the custom media item. The method must return the ID of the help topic that has to be displayed when the help button is clicked. This is typically the class that extends MediaItemVersionFBO. For example, to enable context sensitive help in a custom media item plugin, the following method is added to the implementation of the form backing object:

...