Designing and Implementing Composite Applications : webMethods CAF and OpenCAF Development Help : Working with Portlet Preferences : Exposing Portlet Preferences in My webMethods Server
Exposing Portlet Preferences in My webMethods Server
When you create preferences for a JSR 168-compliant portlet, the best practice for viewing and updating those preferences in My webMethods Server is to provide a user interface for portlet preferences. Typically, the solution is to provide an implementation of the edit portlet mode. With the portlet edit mode, you can provide whatever user interface elements you would like to display the portlet preferences and enable the user to modify them.
You can investigate an implementation of this by looking into the Search Results portlet contained within a standard task application created in Designer. The portlet contains a default.view and an edit.view file. In this case, the edit view provides controls to enable the user to set various preferences such as number of rows to display and sort order. The values for these controls are set by hidden preferences created within the portlet (initialPageSize and initialSortAscending, for example).
The controls on the edit view are bound to the preferences through a binding expression, displayed in the Value field in the control’s properties, for example:
#{activePreferencesBean.initialSortAscending}
The edit view is then implemented to appear as the Preferences tab in the Properties page of the Search Results portlet.
Because task portlets are prepackaged within Designer, you cannot easily modify them if you want to experiment further with this approach. However, you can create a new portlet application project and then create a new Search Results portlet within it. For more information about how to create a portlet, see Creating a Portlet.
In the Portlet Type field, select Search Results. The new Search Results portlet contains a default.view and an edit.view, which you can further investigate and experiment with.
Copyright © 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback