Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: for the plan.

Jump to: navigation, search

Scout/Concepts/Page Detail Form

Wiki Home

A page detail form is an ordinary Form which is attached to a Page. This form migth be opened in a view.


A page detail form is typically created and started when the page gets activated. With the function IPage#setDetailForm() it can be attached to the page. Until now the page resp. the desktop takes care of showing and hiding the form on page activation and deactivation.

The following code shows an example how to create and attach a detail form.

protected void execPageActivated() throws ProcessingException {
  if (getDetailForm() == null) {
    PersonDetailForm form = new PersonDetailForm();

As already said, attaching a detail form to a page means the detail form will automatically be hidden when the page gets deactivated and shown when the page gets activated (see PageDetailFormChanged on Desktop). So the detail form actually gets cached and does not need to be started more than once per page. This requires that the form does not get closed.

Start vs Show
Note the difference between starting and showing a form. Starting means executing the form handler which normally loads the data and fills the fields. Showing the form means displaying it. This is normally automatically done after the form has been started. In case of the detail form it's not because the property autoAddRemoveOnDesktop is set to false by the method setDetailForm(). Now the form explicitly needs to be added to the desktop which will tell the UI to display it.

This is how it is done mostly. If you have a special kind of detail form which requires explicit closing, you could do this on page deactivation. But remember: This will break the caching and the form always needs to be started again on page activation.

protected void execPageDeactivated() throws ProcessingException {
  if (getDetailForm() != null) {

If you would like to hide the page table and only show the detail form instead, you can set the property tableVisible to false.

protected boolean getConfiguredTableVisible() {
  return false;

See also

Back to the top