User's Manual

Chapter 12. Presentation (Bebop) Tutorial 161
only certain components of PermissionsPane, you must subclass it and overwrite the following
public methods:
public void register(Page p),
public void showAdmin(PageState s),
public void showGrant(PageState s),
public void showNoResults(PageState s).
The register determines which and how many components you are going to use. The showFoo meth-
ods manage visibility of components. You can also write your own visibility manager in the subclass
in a similar way, and just use that. You could also overwrite the other public methods, for example, to
provide alternative or static components for faster testing, or to save a member variable in the subclass.
Also, consider the reset() function.
The components that can be extracted from PermissionsPane are:
public Party getRequestingUser(PageState s)
public ACSObject getObject(PageState s)
public Label getTitle()
public String[] getPrivileges()
private PermissionsTables getPermissionsTables()
public SimpleContainer getDirectPermissionsPanel()
public SimpleContainer getInheritedPermissionsPanel()
public Form getUserSearchForm()
public SimpleContainer getPermissionGrantPanel()
public SimpleContainer getPermissionsHeader()
public SimpleContainer getNoSearchResultPanel()
public SimpleComponent getContextPanel()
These functions all use lazy instantiators, meaning they are not constructed until they are needed.
Therefore instantiating PermissionsPane alone is not expensive, the components are computed
only once and on the fly.
Note, if you want the same HTML style as in the default implementation, you MUST import the
permissions.xsl stylesheet in the application’s stylesheet, for example:
xsl:import href="../../content-section/xsl/permissions.xsl"/
Otherwise the Bebop components are rendered in their default style.
12.7. Working With Formbuilder
The formbuilder service makes it possible for non-technical application administrators to build forms
(typically HTML forms). It has an API that lets developers mount those forms in an application. The
developer is responsible for the processing of the form whereas the administrator takes care of the
form elements and visual appearance.