The menuBar() element is a hint to specify where on the application menu a domain service’s actions should be rendered.

For example:

@DomainService
@DomainServiceLayout(menuBar=MenuBar.PRIMARY)
public class ToDoItems {
    ...
}

In the Web UI (Wicket viewer), domain services placed:

  • on the PRIMARY menu bar appears to the left.

  • on the SECONDARY menu bar appear to the right:

  • on the TERTIARY appear in the menu bar associated with the user’s name (far top-right)

The grouping of multiple domain services actions within a single drop-down is managed by the @jakarta.annotation.Priority annotation.

The RestfulObjects viewer does not support this attribute.

Alternatives

Alternatively, use menubars.layout.xml layout file to organize menu action items arbitrarily.