| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width,initial-scale=1"> |
| <title>@DomainObjectLayout :: Apache Isis</title> |
| <link rel="canonical" href="https://isis.apache.org/refguide/2.0.0-M3/applib-ant/DomainObjectLayout.html"> |
| <meta name="generator" content="Antora 2.2.0"> |
| <link rel="stylesheet" href="../../../_/css/site.css"> |
| <link rel="stylesheet" href="../../../_/css/site-custom.css"> |
| <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet"> |
| <link rel="home" href="https://isis.apache.org" title="Apache Isis"> |
| <link rel="next" href="DomainService.html" title="DomainService"> |
| <link rel="prev" href="DomainObject.html" title="DomainObject"> |
| </head> |
| <body class="article"> |
| <header class="header"> |
| <nav class="navbar"> |
| <div class="navbar-brand"> |
| <a class="navbar-item" href="https://isis.apache.org"> |
| <span class="icon"> |
| <img src="../../../_/img/isis-logo-48x48.png"></img> |
| </span> |
| <span>Apache Isis</span> |
| </a> |
| <button class="navbar-burger" data-target="topbar-nav"> |
| <span></span> |
| <span></span> |
| <span></span> |
| </button> |
| </div> |
| <div id="topbar-nav" class="navbar-menu"> |
| <a class="navbar-end"> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a class="navbar-link" href="#">Quick Start</a> |
| <div class="navbar-dropdown"> |
| <span class="navbar-item navbar-heading">Starter Apps</span> |
| <a class="navbar-item" href="../../../docs/latest/starters/helloworld.html">Hello World</a> |
| <a class="navbar-item" href="../../../docs/latest/starters/simpleapp.html">Simple App</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Demos & Tutorials</span> |
| <a class="navbar-item" href="../../../docs/latest/demo/about.html">Demo App</a> |
| <a class="navbar-item" href="https://danhaywood.gitlab.io/isis-petclinic-tutorial-docs/petclinic/1.16.2/intro.html">Petclinic (tutorial)</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Resources</span> |
| <a class="navbar-item" href="../../../docs/latest/resources/cheatsheet.html">Cheatsheet</a> |
| <a class="navbar-item" href="../../../docs/latest/resources/icons.html">Icons</a> |
| </div> |
| </div> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a class="navbar-link" href="#">Guides</a> |
| <div class="navbar-dropdown"> |
| <span class="navbar-item navbar-heading">Development</span> |
| <a class="navbar-item" href="../../../setupguide/latest/about.html">Setup Guide</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Core</span> |
| <a class="navbar-item" href="../../../userguide/latest/about.html">User Guide</a> |
| <a class="navbar-item" href="../../../refguide/latest/about.html">Reference Guide</a> |
| <a class="navbar-item" href="../../../testing/latest/about.html">Testing Guide</a> |
| </div> |
| </div> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a class="navbar-link" href="#">Libraries</a> |
| <div class="navbar-dropdown"> |
| <span class="navbar-item navbar-heading">For Use in Apps</span> |
| <a class="navbar-item" href="../../../subdomains/latest/about.html">Subdomain Libraries</a> |
| <a class="navbar-item" href="../../../valuetypes/latest/about.html">Value Types</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Integrate between Apps</span> |
| <a class="navbar-item" href="../../../mappings/latest/about.html">Bounded Context Mapping Libraries</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Other</span> |
| <a class="navbar-item" href="../../../incubator/latest/about.html">Incubator</a> |
| <a class="navbar-item" href="../../../legacy/latest/about.html">Legacy</a> |
| </div> |
| </div> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a class="navbar-link" href="#">Components</a> |
| <div class="navbar-dropdown"> |
| <span class="navbar-item navbar-heading">Viewers</span> |
| <a class="navbar-item" href="../../../vw/latest/about.html">Wicket UI</a> |
| <a class="navbar-item" href="../../../vro/latest/about.html">Restful Objects (REST)</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Security</span> |
| <a class="navbar-item" href="../../../security/latest/about.html">Security Guide</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Persistence</span> |
| <a class="navbar-item" href="../../../pjdo/latest/about.html">DataNucleus (JDO)</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Extensions</span> |
| <a class="navbar-item" href="../../../extensions/latest/about.html">Extensions Catalog</a> |
| </div> |
| </div> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a class="navbar-link" href="#">Support</a> |
| <div class="navbar-dropdown"> |
| <span class="navbar-item navbar-heading">Contact</span> |
| <a class="navbar-item" href="../../../docs/latest/support/slack-channel.html">Slack</a> |
| <a class="navbar-item" href="../../../docs/latest/support/mailing-list.html">Mailing Lists</a> |
| <a class="navbar-item" href="https://issues.apache.org/jira/browse/ISIS">JIRA</a> |
| <a class="navbar-item" href="https://stackoverflow.com/questions/tagged/isis">Stack Overflow</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Releases</span> |
| <a class="navbar-item" href="../../../docs/latest/downloads/how-to.html">Downloads</a> |
| <a class="navbar-item" href="../../../relnotes/latest/about.html">Release Notes</a> |
| <a class="navbar-item" href="../../../docs/latest/archive/1-x.html">Archive (1.x)</a> |
| <hr class="navbar-divider"/> |
| <span class="navbar-item navbar-heading">Framework</span> |
| <a class="navbar-item" href="../../../conguide/latest/about.html">Contributors' Guide</a> |
| <a class="navbar-item" href="../../../comguide/latest/about.html">Committers' Guide</a> |
| <a class="navbar-item" href="../../../core/latest/about.html">Core Design</a> |
| </div> |
| </div> |
| <div class="navbar-item has-dropdown is-hoverable"> |
| <a class="navbar-link" href="#">ASF</a> |
| <div class="navbar-dropdown"> |
| <a class="navbar-item" href="http://www.apache.org/">Apache Homepage</a> |
| <a class="navbar-item" href="https://www.apache.org/events/current-event">Events</a> |
| <a class="navbar-item" href="https://www.apache.org/licenses/">Licenses</a> |
| <a class="navbar-item" href="https://www.apache.org/security/">Security</a> |
| <a class="navbar-item" href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a> |
| <a class="navbar-item" href="https://www.apache.org/foundation/thanks.html">Thanks</a> |
| <hr class="navbar-divider"/> |
| <a class="navbar-item" href="https://whimsy.apache.org/board/minutes/Isis.html">PMC board minutes</a> |
| </div> |
| </div> |
| <a class="navbar-item" href="../../../docs/latest/about.html"> |
| <span class="icon"> |
| <img src="../../../_/img/home.png"></img> |
| </span> |
| </a> |
| </div> |
| </div> |
| </nav> |
| </header> |
| <div class="body "> |
| <div class="nav-container" data-component="refguide" data-version="2.0.0-M3"> |
| <aside class="nav"> |
| <div class="panels"> |
| <div class="nav-panel-pagination"> |
| <a class="page-previous" rel="prev" href="DomainObject.html" title="DomainObject"><span></span></a> |
| <a class="page-next" rel="next" |
| href="DomainService.html" title="DomainService"><span></span></a> |
| <!-- |
| page.parent doesn't seem to be set... |
| <a class="page-parent" rel="prev" href="about.html" title="DomainObject"><span></span></a> |
| --> |
| </div> |
| <div class="nav-panel-menu is-active" data-panel="menu"> |
| <nav class="nav-menu"> |
| <h3 class="title"><a href="../about.html">Reference Guide</a></h3> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="0"> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="1"> |
| <button class="nav-item-toggle"></button> |
| <a class="nav-link" href="about.html">Annotations</a> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Action.html">Action</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="ActionLayout.html">ActionLayout</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Collection.html">Collection</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="CollectionLayout.html">CollectionLayout</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Column.html">Column</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Digits.html">Digits</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Discriminator.html">Discriminator</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="DomainObject.html">DomainObject</a> |
| </li> |
| <li class="nav-item is-current-page" data-depth="2"> |
| <a class="nav-link" href="DomainObjectLayout.html">DomainObjectLayout</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="DomainService.html">DomainService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="DomainServiceLayout.html">DomainServiceLayout</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Facets.html">Facets</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="HomePage.html">HomePage</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="MemberOrder.html">MemberOrder</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Mixin.html">Mixin</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="NotPersistent.html">NotPersistent.</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Nullable.html">Nullable</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="MinLength.html">MinLength</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Parameter.html">Parameter</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="ParameterLayout.html">ParameterLayout</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Pattern.html">Pattern</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="PersistenceCapable.html">PersistenceCapable</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="PrimaryKey.html">PrimaryKey</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Programmatic.html">Programmatic</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Property.html">Property</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="PropertyLayout.html">PropertyLayout</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="IsisSessionScope.html">RequestScoped</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="Title.html">Title</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="ViewModel.html">ViewModel</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="XmlJavaTypeAdapter.html">XmlJavaTypeAdapter</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="XmlRootElement.html">XmlRootElement</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-item" data-depth="1"> |
| <button class="nav-item-toggle"></button> |
| <a class="nav-link" href="../applib-methods/about.html">Methods</a> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-methods/prefixes.html">Supporting Method Prefixes</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-methods/reserved.html">Reserved Methods</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-methods/lifecycle.html">Lifecycle Methods</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-item" data-depth="1"> |
| <button class="nav-item-toggle"></button> |
| <a class="nav-link" href="../applib-classes/about.html">Classes</a> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/events.html">Events</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/ViewModel.html"><code>ViewModel</code></a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/value-types.html">Value Types</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/spec.html">Specification pattern</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/i18n.html">i18n support</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/roles-mixins-contributees.html">Roles, Mixins and Contributees</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/utility.html">Utility Classes</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-classes/layout.html">Layout</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-item" data-depth="1"> |
| <button class="nav-item-toggle"></button> |
| <a class="nav-link" href="../applib-svc/about.html">Domain Services</a> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/AcceptHeaderService.html">AcceptHeaderService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ApplicationFeatureRepository.html">ApplicationFeatureRepository</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/AuditerService.html">AuditerService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/BookmarkService.html">BookmarkService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/BookmarkUiService.html">BookmarkUiService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ClockService.html">ClockService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/CommandContext.html">CommandContext</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/CommandDtoProcessorService.html">CommandDtoProcessorService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/CommandExecutorService.html">CommandExecutorService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/CommandService.html">CommandService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ConfigurationMenu.html">ConfigurationMenu</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ConfigurationViewService.html">ConfigurationViewService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ContentMappingService.html">ContentMappingService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/DeepLinkService.html">DeepLinkService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/EmailNotificationService.html">EmailNotificationService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/EmailService.html">EmailService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ErrorReportingService.html">ErrorReportingService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/EventBusService.html">EventBusService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ExceptionRecognizerService.html">ExceptionRecognizerService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/FactoryService.html">FactoryService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/GridLoaderService.html">GridLoaderService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/GridService.html">GridService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/GridSystemService.html">GridSystemService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/HealthCheckService.html">HealthCheckService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/HintStore.html">HintStore</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/HomePageResolverService.html">HomePageResolverService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/InteractionContext.html">InteractionContext</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/JaxbService.html">JaxbService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/LayoutService.html">LayoutService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/LayoutServiceMenu.html">LayoutServiceMenu</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/LocaleProvider.html">LocaleProvider</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/MenuBarsLoaderService.html">MenuBarsLoaderService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/MenuBarsService.html">MenuBarsService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/MessageService.html">MessageService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/MetaModelService.html">MetamodelService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/MetaModelServiceMenu.html">MetamodelServiceMenu</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/MetricsService.html">MetricsService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/PublisherService.html">PublisherService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/QueryResultsCache.html">QueryResultsCache</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/RepositoryService.html">RepositoryService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/RoutingService.html">RoutingService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/Scratchpad.html">Scratchpad</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ServiceInjector.html">ServiceInjector</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/ServiceRegistry.html">ServiceRegistry</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/SessionLoggingService.html">SessionLoggingService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/SudoService.html">SudoService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/SwaggerService.html">SwaggerService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/TableColumnOrderService.html">TableColumnOrderService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/TitleService.html">TitleService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/TranslationService.html">TranslationService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/TranslationsResolver.html">TranslationsResolver</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/TransactionService.html">TransactionService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/UrlEncodingService.html">UrlEncodingService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/UserProfileService.html">UserProfileService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/UserRegistrationService.html">UserRegistrationService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/UserService.html">UserService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/WrapperFactory.html">WrapperFactory</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/XmlService.html">XmlService</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../applib-svc/XmlSnapshotService.html">XmlSnapshotService</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-item" data-depth="1"> |
| <button class="nav-item-toggle"></button> |
| <a class="nav-link" href="../config/about.html">Configuration</a> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.applib.html">Applib</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.core.meta-model.html">Core MetaModel</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.core.meta-model.introspector.html">Core MetaModel Introspection</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.core.meta-model.validator.html">MetaModel Validator</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.core.runtime.html">Core Runtime Services configurations</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.core.runtime-services.html">Core Runtime Services configurations</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.security.shiro.html">Shiro Security Implementation</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.persistence.jdo-datanucleus.html">JDO DataNucleus</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.persistence.jdo-datanucleus.impl.html">DataNucleus Configuration</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.viewer.restfulobjects.html">Restful Objects Viewer</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.viewer.wicket.html">Wicket Viewer</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.extensions.html">Extensions</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.value-types.html">Value types</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.testing.html">Testing</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/isis.legacy.html">Legacy</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/resteasy.html">RestEasy Configuration</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../config/sections/Other.html">Other</a> |
| </li> |
| </ul> |
| </li> |
| <li class="nav-item" data-depth="1"> |
| <button class="nav-item-toggle"></button> |
| <a class="nav-link" href="../schema/about.html">Schema</a> |
| <ul class="nav-list"> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../schema/mml.html">MetaModel</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../schema/cmd.html">Command</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../schema/ixn.html">Interaction</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../schema/chg.html">Changes</a> |
| </li> |
| <li class="nav-item" data-depth="2"> |
| <a class="nav-link" href="../schema/common.html">Common</a> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </nav> |
| </div> |
| <div class="nav-panel-explore" data-panel="explore"> |
| <div class="context"> |
| <span class="title">Reference Guide</span> |
| <span class="version">2.0.0-M3</span> |
| </div> |
| <ul class="components"> |
| <li class="component"> |
| <span class="title"> </span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../docs/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">BC Mappings Catalog</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../mappings/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Committers' Guide</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../comguide/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Contributors' Guide</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../conguide/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Design Docs</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../core/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Extensions Catalog</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../extensions/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Incubator Catalog</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../incubator/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">JDO/DataNucleus</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../pjdo/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Legacy Catalog</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../legacy/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component is-current"> |
| <span class="title">Reference Guide</span> |
| <ul class="versions"> |
| <li class="version is-current is-latest"> |
| <a href="../about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Release Notes</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../relnotes/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Restful Objects Viewer</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../vro/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Security Guide</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../security/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Setup Guide</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../setupguide/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Subdomains Catalog</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../subdomains/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Testing Guide</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../testing/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">User Guide</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../userguide/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Value Types Catalog</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../valuetypes/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| <li class="component"> |
| <span class="title">Wicket Viewer</span> |
| <ul class="versions"> |
| <li class="version is-latest"> |
| <a href="../../../vw/2.0.0-M3/about.html">2.0.0-M3</a> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </aside> |
| </div> |
| <main role="main"> |
| <div class="toolbar" role="navigation"> |
| <button class="nav-toggle"></button> |
| <a href="../../../docs/2.0.0-M3/about.html" class="home-link"></a> |
| <nav class="breadcrumbs" aria-label="breadcrumbs"> |
| <ul> |
| <li><a href="../about.html">Reference Guide</a></li> |
| <li><a href="about.html">Annotations</a></li> |
| <li><a href="DomainObjectLayout.html">DomainObjectLayout</a></li> |
| </ul> |
| </nav> |
| <div class="edit-this-page"><a href="https://github.com/apache/isis/edit/2.0.0-M3/api/applib/src/main/adoc/modules/applib-ant/pages/DomainObjectLayout.adoc">Edit</a></div> |
| </div> |
| <article class="doc"> |
| <a name="section-top"></a> |
| <h1 class="page"><code>@DomainObjectLayout</code></h1> |
| <div id="preamble"> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The <code>@DomainObjectLayout</code> annotation applies to domain classes, collecting together all UI hints within a single annotation.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="main-api"><a class="anchor" href="#main-api"></a>Main API</h2> |
| <div class="sectionbody"> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@Inherited |
| @Target({ |
| ElementType.TYPE, |
| ElementType.ANNOTATION_TYPE |
| }) |
| @Retention(RetentionPolicy.RUNTIME) |
| public @interface DomainObjectLayout { |
| |
| BookmarkPolicy bookmarking() <i class="conum" data-value="1"></i><b>(1)</b> |
| default BookmarkPolicy.NOT_SPECIFIED; |
| |
| String cssClass() <i class="conum" data-value="2"></i><b>(2)</b> |
| default ""; |
| |
| String cssClassFa() <i class="conum" data-value="3"></i><b>(3)</b> |
| default ""; |
| |
| CssClassFaPosition cssClassFaPosition() <i class="conum" data-value="4"></i><b>(4)</b> |
| default CssClassFaPosition.LEFT; |
| |
| String describedAs() <i class="conum" data-value="5"></i><b>(5)</b> |
| default ""; |
| |
| String named() <i class="conum" data-value="6"></i><b>(6)</b> |
| default ""; |
| |
| int paged() <i class="conum" data-value="7"></i><b>(7)</b> |
| default -1; |
| |
| String plural() <i class="conum" data-value="8"></i><b>(8)</b> |
| default ""; |
| |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="colist arabic"> |
| <table> |
| <tr> |
| <td><i class="conum" data-value="1"></i><b>1</b></td> |
| <td><a href="#bookmarking"><code>bookmarking</code></a> |
| <div class="paragraph"> |
| <p>Whether (and how) this domain object should be automatically bookmarked</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="2"></i><b>2</b></td> |
| <td><a href="#cssClass"><code>cssClass</code></a> |
| <div class="paragraph"> |
| <p>The css class that a domain class (type) should have, to allow more targetted styling in <a href="../config/application-specific/application-css.html" class="page"><code>application.css</code></a></p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="3"></i><b>3</b></td> |
| <td><a href="#cssClassFa"><code>cssClassFa</code></a> |
| <div class="paragraph"> |
| <p>Any valid <a href="http://fortawesome.github.io/Font-Awesome/">Font awesome</a> icon name for the domain object’s menu link or icon.<br></p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="4"></i><b>4</b></td> |
| <td><code>cssClassFaPosition()</code> |
| <div class="paragraph"> |
| <p>Currently unused.</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="5"></i><b>5</b></td> |
| <td><a href="#describedAs"><code>describedAs</code></a> |
| <div class="paragraph"> |
| <p>Description of this class, eg to be rendered in a tooltip.</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="6"></i><b>6</b></td> |
| <td><a href="#named"><code>named</code></a> |
| <div class="paragraph"> |
| <p>To override the name inferred from the action’s name in code.<br></p> |
| </div> |
| <div class="paragraph"> |
| <p>A typical use case is if the desired name is a reserved Java keyword, such as <code>default</code> or <code>package</code>.</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="7"></i><b>7</b></td> |
| <td><a href="#paged"><code>paged</code></a> |
| <div class="paragraph"> |
| <p>The page size for instances of this class when rendered within a table (as returned from an action invocation)</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="8"></i><b>8</b></td> |
| <td><a href="#plural"><code>plural</code></a> |
| <div class="paragraph"> |
| <p>The plural name of the class</p> |
| </div></td> |
| </tr> |
| </table> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| cssClass="x-key", |
| cssClassFa="fa-checklist", |
| describedAs="Capture a task that you need to do", |
| named="ToDo", |
| paged=30, |
| plural="ToDo List") |
| ) |
| public class ToDoItem { |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="admonitionblock note"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-note" title="Note"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>Note that there is (currently) no support for specifying UI hints for domain objects through the dynamic <a href="../../../userguide/2.0.0-M3/fun/ui.html#object-layout" class="page"><code>.layout.xml</code></a> file (only for properties, collections and actions are supported).</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="ui-events-api"><a class="anchor" href="#ui-events-api"></a>UI Events API</h2> |
| <div class="sectionbody"> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">public @interface DomainObjectLayout { |
| |
| // ... |
| Class<? extends CssClassUiEvent<?>> |
| cssClassUiEvent() <i class="conum" data-value="1"></i><b>(1)</b> |
| default CssClassUiEvent.Default.class; |
| |
| Class<? extends IconUiEvent<?>> |
| iconUiEvent() <i class="conum" data-value="2"></i><b>(2)</b> |
| default IconUiEvent.Default.class; |
| |
| Class<? extends LayoutUiEvent<?>> |
| layoutUiEvent() <i class="conum" data-value="3"></i><b>(3)</b> |
| default LayoutUiEvent.Default.class; |
| |
| Class<? extends TitleUiEvent<?>> |
| titleUiEvent() <i class="conum" data-value="4"></i><b>(4)</b> |
| default TitleUiEvent.Default.class; |
| |
| }</code></pre> |
| </div> |
| </div> |
| <div class="colist arabic"> |
| <table> |
| <tr> |
| <td><i class="conum" data-value="1"></i><b>1</b></td> |
| <td><a href="#cssClassUiEvent"><code>cssClassUiEvent</code></a> |
| <div class="paragraph"> |
| <p>The event type to be posted to the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> to obtain a CSS class for the domain object.</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="2"></i><b>2</b></td> |
| <td><a href="#iconUiEvent"><code>iconUiEvent</code></a> |
| <div class="paragraph"> |
| <p>The event type to be posted to obtain the icon (name) for the domain object.</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="3"></i><b>3</b></td> |
| <td><a href="#layoutUiEvent"><code>layoutUiEvent</code></a> |
| <div class="paragraph"> |
| <p>The event type to be posted to obtain the layout (name) for the domain object.</p> |
| </div></td> |
| </tr> |
| <tr> |
| <td><i class="conum" data-value="4"></i><b>4</b></td> |
| <td><a href="#titleUiEvent"><code>titleUiEvent</code></a> |
| <div class="paragraph"> |
| <p>The event type to be posted to obtain the title for the domain object.</p> |
| </div></td> |
| </tr> |
| </table> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="bookmarking"><a class="anchor" href="#bookmarking"></a><code>bookmarking()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The <code>bookmarking</code> attribute indicates that an entity is automatically bookmarked. |
| This attribute is also supported for <a href="ActionLayout.html#bookmarking" class="page">domain objects</a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>In the <a href="../../../vw/2.0.0-M3/about.html" class="page">Wicket Viewer</a>, a link to a bookmarked object is shown in the bookmarks panel:</p> |
| </div> |
| <div class="imageblock"> |
| <div class="content"> |
| <a class="image" href="_images/reference-annotations/DomainObjectLayout/bookmarking.png"><img src="_images/reference-annotations/DomainObjectLayout/bookmarking.png" alt="bookmarking" width="720px"></a> |
| </div> |
| </div> |
| <div class="admonitionblock note"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-note" title="Note"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>Note that this screenshot shows an earlier version of the <a href="../../../vw/2.0.0-M3/about.html" class="page">Wicket viewer</a> UI (specifically, pre 1.8.0).</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObject(bookmarking=BookmarkPolicy.AS_ROOT) |
| public class ToDoItem ... { |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>indicates that the <code>ToDoItem</code> class is bookmarkable:</p> |
| </div> |
| <div class="paragraph"> |
| <p>It is also possible to nest bookmarkable entities. |
| For example:</p> |
| </div> |
| <div class="imageblock"> |
| <div class="content"> |
| <a class="image" href="_images/reference-annotations/DomainObjectLayout/bookmarking-nested.png"><img src="_images/reference-annotations/DomainObjectLayout/bookmarking-nested.png" alt="bookmarking nested" width="720px"></a> |
| </div> |
| </div> |
| <div class="admonitionblock note"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-note" title="Note"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>Note that this screenshot shows an earlier version of the <a href="../../../vw/2.0.0-M3/about.html" class="page">Wicket viewer</a> UI (specifically, pre 1.8.0).</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="paragraph"> |
| <p>For example, the <code>Property</code> entity "[OXF] Oxford Super Mall" is a root bookmark, but the <code>Unit</code> child entity "[OXF-001] Unit 1" only appears as a bookmark <em>but only if</em> its parent <code>Property</code> has already been bookmarked.</p> |
| </div> |
| <div class="paragraph"> |
| <p>This is accomplished with the following annotations:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObject(bookmarking=BookmarkPolicy.AS_ROOT) |
| public class Property { |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>and</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObject(bookmarking=BookmarkPolicy.AS_CHILD) |
| public abstract class Unit { |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The nesting can be done to any level.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="cssClass"><a class="anchor" href="#cssClass"></a><code>cssClass()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The <code>cssClass</code> attribute can be used to render additional CSS classes in the HTML (a wrapping <code><div></code>) that represents the domain object. |
| <a href="../config/application-specific/application-css.html" class="page">Application-specific CSS</a> can then be used to target and adjust the UI representation of that particular element.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObject |
| @DomainObjectLayout( |
| cssClass="x-core-entity" |
| ) |
| public class ToDoItem { /* ... */ }</code></pre> |
| </div> |
| </div> |
| <div class="admonitionblock note"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-note" title="Note"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>The similar <a href="#cssClassFa"><code>@DomainObjectLayout#cssClassFa()</code></a> annotation attribute is also used as a hint to apply CSS, but in particular to allow <a href="http://fortawesome.github.io/Font-Awesome/icons/">Font Awesome icons</a> to be rendered as the icon for classes.</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="sect2"> |
| <h3 id="see-also"><a class="anchor" href="#see-also"></a>See also</h3> |
| <div class="paragraph"> |
| <p>This attribute can also be applied to:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><a href="ActionLayout.html#cssClass" class="page">actions</a></p> |
| </li> |
| <li> |
| <p><a href="PropertyLayout.html#cssClass" class="page">properties</a>,</p> |
| </li> |
| <li> |
| <p><a href="CollectionLayout.html#cssClass" class="page">collections</a></p> |
| </li> |
| <li> |
| <p><a href="ParameterLayout.html#cssClass" class="page">parameters</a>.</p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="cssClassFa"><a class="anchor" href="#cssClassFa"></a><code>cssClassFa()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>r |
| :Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. <a href="http://www.apache.org/licenses/LICENSE-2.0" class="bare">http://www.apache.org/licenses/LICENSE-2.0</a> . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. |
| :page-partial:</p> |
| </div> |
| <div class="paragraph"> |
| <p>The <code>cssClassFa</code> attribute is used to specify the name of a <a href="http://fortawesome.github.io/Font-Awesome/icons/">Font Awesome icon</a> name, to be rendered as the domain object’s icon.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If necessary the icon specified can be overridden by a particular object instance using the <a href="../applib-methods/reserved.html#iconName" class="page"><code>iconName()</code></a> method.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| cssClassFa="fa-check-circle" |
| ) |
| public class ToDoItem { |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>There can be multiple "fa-" classes, eg to mirror or rotate the icon. |
| There is no need to include the mandatory <code>fa</code> "marker" CSS class; it will be automatically added to the list. |
| The <code>fa-</code> prefix can also be omitted from the class names; it will be prepended to each if required.</p> |
| </div> |
| <div class="paragraph"> |
| <p>The related <code>cssClassFaPosition</code> attribute is currently unused for domain objects; the icon is always rendered to the left.</p> |
| </div> |
| <div class="admonitionblock tip"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-tip" title="Tip"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>The similar <a href="#cssClass"><code>@DomainObjectLayout#cssClass()</code></a> annotation attribute is also used as a hint to apply CSS, but for wrapping the representation of an object or object member so that it can be styled in an application-specific way.</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="sect2"> |
| <h3 id="see-also-2"><a class="anchor" href="#see-also-2"></a>See also</h3> |
| <div class="paragraph"> |
| <p>These attributes can also be applied to:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><a href="ActionLayout.html#cssClassFa" class="page">actions</a> to specify an icon for the action’s representation as a button or menu item.</p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="cssClassUiEvent"><a class="anchor" href="#cssClassUiEvent"></a><code>cssClassUiEvent()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Whenever a domain object is to be rendered, the framework fires off an CSS class UI event to obtain a CSS class to use in any wrapping <code><div></code>s and <code><span></code>s that render the domain object. |
| This is as an alternative to implementing <a href="../applib-methods/reserved.html#cssClass" class="page"><code>cssClass()</code></a> reserved method. |
| (If <code>cssClass()</code> is present, then it will take precedence).</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers subscribe through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> and can use obtain a reference to the domain object from the event. |
| From this they can, if they wish, specify a CSS class for the domain object using the event’s API.</p> |
| </div> |
| <div class="paragraph"> |
| <p>By default the event raised is <code>CssClassUiEvent.Default</code>. |
| For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout |
| public class ToDoItemDto { |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The purpose of the <code>cssClassUiEvent</code> attribute is to allows a custom subclass to be emitted instead. |
| A similar attribute is available for titles and icons.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| iconUiEvent=ToDoItemDto.CssClassUiEvent.class |
| ) |
| public class ToDoItemDto { |
| public static class CssClassUiEvent |
| extends org.apache.isis.applib.events.ui.CssClassUiEvent<ToDoItemDto> { } |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The benefit is that subscribers can be more targeted as to the events that they subscribe to.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="subscribers"><a class="anchor" href="#subscribers"></a>Subscribers</h3> |
| <div class="paragraph"> |
| <p>Subscribers (which must be domain services) subscribe to events posted through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers can be either coarse-grained (if they subscribe to the top-level event type):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(CssClassUiEvent.class) |
| public void on(CssClassUiEvent ev) { |
| if(ev.getSource() instanceof ToDoItemDto) { |
| ... |
| } |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>or can be fine-grained (by subscribing to specific event subtypes):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(ToDoItemDto.CssClassUiEvent.class) |
| public void on(ToDoItemDto.CssClassUiEvent ev) { |
| ... |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The subscriber should then use <code>CssClassUiEvent#setCssClass(…​)</code> to actually specify the CSS class to be used.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="default-doop-and-noop-events"><a class="anchor" href="#default-doop-and-noop-events"></a>Default, Doop and Noop events</h3> |
| <div class="paragraph"> |
| <p>If the <code>cssClassUiEvent</code> attribute is not explicitly specified (is left as its default value, <code>CssClassUiEvent.Default</code>), then the framework will, by default, post an event.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If this is not required, then the <code>isis.reflector.facet.domainObjectLayoutAnnotation.cssClassUiEvent.postForDefault</code> configuration property can be set to "false"; this will disable posting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>On the other hand, if the <code>cssClassUiEvent</code> has been explicitly specified to some subclass, then an event will be posted. |
| The framework provides <code>CssClassUiEvent.Doop</code> as such a subclass, so setting the <code>cssClassUiEvent</code> attribute to this class will ensure that the event to be posted, irrespective of the configuration property setting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>And, conversely, the framework also provides <code>CssClassUiEvent.Noop</code>; if <code>cssClassUiEvent</code> attribute is set to this class, then no event will be posted.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="raising-events-programmatically"><a class="anchor" href="#raising-events-programmatically"></a>Raising events programmatically</h3> |
| <div class="paragraph"> |
| <p>Normally events are only raised for interactions through the UI. |
| However, events can be raised programmatically either by calling the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> API directly.</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="describedAs"><a class="anchor" href="#describedAs"></a><code>describedAs()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The <code>describedAs</code> attribute is used to provide a short description of the domain object to the user. |
| In the <a href="../../../vw/2.0.0-M3/about.html" class="page">Wicket viewer</a> it is displayed as a 'tool tip'.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| describedAs = "A customer who may have originally become" |
| + " known to us via the marketing system or who may" |
| + " have contacted us directly." |
| ) |
| public class ProspectiveSale { |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="see-also-3"><a class="anchor" href="#see-also-3"></a>See also</h3> |
| <div class="paragraph"> |
| <p>The attribute can also be specified for:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><a href="CollectionLayout.html#describedAs" class="page">collections</a></p> |
| </li> |
| <li> |
| <p><a href="PropertyLayout.html#describedAs" class="page">properties</a></p> |
| </li> |
| <li> |
| <p><a href="ActionLayout.html#describedAs" class="page">actions</a></p> |
| </li> |
| <li> |
| <p><a href="ParameterLayout.html#describedAs" class="page">parameters</a> and</p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="iconUiEvent"><a class="anchor" href="#iconUiEvent"></a><code>iconUiEvent()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Whenever a domain object is to be rendered, the framework fires off an icon UI event to obtain an icon (name) for the object (if possible). |
| This is as an alternative to implementing <a href="../applib-methods/reserved.html#iconName" class="page"><code>iconName()</code></a> reserved method. |
| (If <code>iconName()</code> is present, then it will take precedence).</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers subscribe through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> and can use obtain a reference to the domain object from the event. |
| From this they can, if they wish, specify an icon name for the domain object using the event’s API.</p> |
| </div> |
| <div class="paragraph"> |
| <p>By default the event raised is <code>IconUiEvent.Default</code>. |
| For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout |
| public class ToDoItemDto { |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The purpose of the <code>iconUiEvent</code> attribute is to allows a custom subclass to be emitted instead. |
| A similar attribute is available for titles and CSS classes.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| iconUiEvent=ToDoItemDto.IconUiEvent.class |
| ) |
| public class ToDoItemDto { |
| public static class IconUiEvent |
| extends org.apache.isis.applib.events.ui.IconUiEvent<ToDoItemDto> { } |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The benefit is that subscribers can be more targeted as to the events that they subscribe to.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="subscribers-2"><a class="anchor" href="#subscribers-2"></a>Subscribers</h3> |
| <div class="paragraph"> |
| <p>Subscribers (which must be domain services) subscribe to events posted through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers can be either coarse-grained (if they subscribe to the top-level event type):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(IconUiEvent.class) |
| public void on(IconUiEvent ev) { |
| if(ev.getSource() instanceof ToDoItemDto) { |
| ... |
| } |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>or can be fine-grained (by subscribing to specific event subtypes):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(ToDoItemDto.IconUiEvent.class) |
| public void on(ToDoItemDto.IconUiEvent ev) { |
| ... |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The subscriber should then use <code>IconUiEvent#setIconName(…​)</code> to actually specify the icon name to be used.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="default-doop-and-noop-events-2"><a class="anchor" href="#default-doop-and-noop-events-2"></a>Default, Doop and Noop events</h3> |
| <div class="paragraph"> |
| <p>If the <code>iconUiEvent</code> attribute is not explicitly specified (is left as its default value, <code>IconUiEvent.Default</code>), then the framework will, by default, post an event.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If this is not required, then the <code>isis.reflector.facet.domainObjectLayoutAnnotation.iconUiEvent.postForDefault</code> configuration property can be set to "false"; this will disable posting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>On the other hand, if the <code>iconUiEvent</code> has been explicitly specified to some subclass, then an event will be posted. |
| The framework provides <code>IconUiEvent.Doop</code> as such a subclass, so setting the <code>iconUiEvent</code> attribute to this class will ensure that the event to be posted, irrespective of the configuration property setting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>And, conversely, the framework also provides <code>IconUiEvent.Noop</code>; if <code>iconUiEvent</code> attribute is set to this class, then no event will be posted.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="raising-events-programmatically-2"><a class="anchor" href="#raising-events-programmatically-2"></a>Raising events programmatically</h3> |
| <div class="paragraph"> |
| <p>Normally events are only raised for interactions through the UI. |
| However, events can be raised programmatically by calling the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> API directly.</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="layoutUiEvent"><a class="anchor" href="#layoutUiEvent"></a><code>layoutUiEvent()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Whenever a domain object is to be rendered, the framework fires off an layout UI event to obtain an alternative layout name with which to render the domain object. |
| This is as an alternative to implementing <a href="../applib-methods/reserved.html#layout" class="page"><code>layout()</code></a> reserved method. |
| (If <code>layout()</code> is present, then it will take precedence).</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers subscribe through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> and can use obtain a reference to the domain object from the event. |
| From this they can, if they wish, specify a CSS class for the domain object using the event’s API.</p> |
| </div> |
| <div class="paragraph"> |
| <p>By default the event raised is <code>LayoutUiEvent.Default</code>. |
| For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout |
| public class ToDoItemDto { |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The purpose of the <code>layoutUiEvent</code> attribute is to allows a custom subclass to be emitted instead. |
| A similar attribute is available for titles and icons.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| iconUiEvent=ToDoItemDto.LayoutUiEvent.class |
| ) |
| public class ToDoItemDto { |
| |
| public static class LayoutUiEvent extends |
| org.apache.isis.applib.events.ui.LayoutUiEvent<ToDoItemDto> { } |
| |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The benefit is that subscribers can be more targeted as to the events that they subscribe to.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="subscribers-3"><a class="anchor" href="#subscribers-3"></a>Subscribers</h3> |
| <div class="paragraph"> |
| <p>Subscribers (which must be domain services) subscribe to events posted through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers can be either coarse-grained (if they subscribe to the top-level event type):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(LayoutUiEvent.class) |
| public void on(LayoutUiEvent ev) { |
| if(ev.getSource() instanceof ToDoItemDto) { |
| ... |
| } |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>or can be fine-grained (by subscribing to specific event subtypes):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListner(ToDoItemDto.LayoutUiEvent.class) |
| public void on(ToDoItemDto.LayoutUiEvent ev) { |
| ... |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The subscriber should then use <code>LayoutUiEvent#setLayout(…​)</code> to actually specify the CSS class to be used.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="default-doop-and-noop-events-3"><a class="anchor" href="#default-doop-and-noop-events-3"></a>Default, Doop and Noop events</h3> |
| <div class="paragraph"> |
| <p>If the <code>layoutUiEvent</code> attribute is not explicitly specified (is left as its default value, <code>LayoutUiEvent.Default</code>), then the framework will, by default, post an event.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If this is not required, then the <code>isis.reflector.facet.domainObjectLayoutAnnotation.layoutUiEvent.postForDefault</code> configuration property can be set to "false"; this will disable posting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>On the other hand, if the <code>layoutUiEvent</code> has been explicitly specified to some subclass, then an event will be posted. |
| The framework provides <code>LayoutUiEvent.Doop</code> as such a subclass, so setting the <code>layoutUiEvent</code> attribute to this class will ensure that the event to be posted, irrespective of the configuration property setting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>And, conversely, the framework also provides <code>LayoutUiEvent.Noop</code>; if <code>layoutUiEvent</code> attribute is set to this class, then no event will be posted.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="raising-events-programmatically-3"><a class="anchor" href="#raising-events-programmatically-3"></a>Raising events programmatically</h3> |
| <div class="paragraph"> |
| <p>Normally events are only raised for interactions through the UI. |
| However, events can be raised programmatically by calling the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> API directly.</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="named"><a class="anchor" href="#named"></a><code>named()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The <code>named</code> attribute explicitly specifies the domain object’s name, overriding the name that would normally be inferred from the Java source code.</p> |
| </div> |
| <div class="admonitionblock tip"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-tip" title="Tip"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>We recommend that you only use this attribute when the desired name cannot be used in Java source code. |
| Examples of that include a name that would be a reserved Java keyword (eg "package"), or a name that has punctuation, eg apostrophes.</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| named="Customer" |
| ) |
| public class CustomerImpl implements Customer{ |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>It’s also possible to specify a <a href="#plural">plural form</a> of the name, used by the framework when rendering a standalone collection of the domain object.</p> |
| </div> |
| <div class="admonitionblock tip"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-tip" title="Tip"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>The framework also provides a separate, powerful mechanism for <a href="../../../userguide/2.0.0-M3/btb/i18n.html" class="page">internationalization</a>.</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="sect2"> |
| <h3 id="see-also-4"><a class="anchor" href="#see-also-4"></a>See also</h3> |
| <div class="paragraph"> |
| <p>The attribute can also be specified for:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><a href="ActionLayout.html#named" class="page">actions</a></p> |
| </li> |
| <li> |
| <p><a href="CollectionLayout.html#named" class="page">collections</a></p> |
| </li> |
| <li> |
| <p><a href="PropertyLayout.html#named" class="page">properties</a></p> |
| </li> |
| <li> |
| <p><a href="ParameterLayout.html#named" class="page">parameters</a></p> |
| </li> |
| <li> |
| <p><a href="DomainServiceLayout.html#named" class="page">domain services</a>.</p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="paged"><a class="anchor" href="#paged"></a><code>paged()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>The <code>paged</code> attribute specifies the number of rows to display in a standalone collection, as returned from an action invocation.</p> |
| </div> |
| <div class="admonitionblock warning"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <i class="fa icon-warning" title="Warning"></i> |
| </td> |
| <td class="content"> |
| <div class="paragraph"> |
| <p>The <a href="../../../vro/2.0.0-M3/about.html" class="page">RestfulObjects viewer</a> currently does not support paging. |
| The <a href="../../../vw/2.0.0-M3/about.html" class="page">Wicket viewer</a> <em>does</em> support paging, but note that the paging is performed client-side rather than server-side.</p> |
| </div> |
| <div class="paragraph"> |
| <p>We therefore recommend that large collections should instead be modelled as actions (to allow filtering to be applied to limit the number of rows).</p> |
| </div> |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout(paged=15) |
| public class Order { |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>It is also possible to specify a global default for the page size of standalone collections, using the <a href="../config/sections/isis.applib.html#isis.applib.annotation.domain-object-layout.paged" class="page"><code>isis.applib.annotation.domain-object-layout.paged</code></a> configuration property.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="see-also-5"><a class="anchor" href="#see-also-5"></a>See also</h3> |
| <div class="paragraph"> |
| <p>This attribute can also be applied to:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><a href="CollectionLayout.html#paged" class="page">collections</a></p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="plural"><a class="anchor" href="#plural"></a><code>plural()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>When Apache Isis displays a standalone collection of several objects, it will label the collection using the plural form of the object type. |
| By default the plural name will be derived from the end of the singular name, with support for some basic English language defaults (eg using "ies" for names ending with a "y"). |
| The <code>plural</code> attribute allows the plural form of the class name to be specified explicitly.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout(plural="Children") |
| public class Child { |
| // ... |
| }</code></pre> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="titleUiEvent"><a class="anchor" href="#titleUiEvent"></a><code>titleUiEvent()</code></h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>Whenever a domain object is to be rendered, the framework fires off a title UI event to obtain a title for the object. |
| This is as an alternative to implementing <a href="../applib-methods/reserved.html#title" class="page"><code>title()</code></a> reserved method, or using the <a href="Title.html" class="page"><code>@Title</code></a> annotation, within the class itself. |
| (If either <code>title()</code> or <code>@Title</code> are present, then they will take precedence).</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers subscribe through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> and can use obtain a reference to the domain object from the event. |
| From this they can, if they wish, specify a title for the domain object using the event’s API.</p> |
| </div> |
| <div class="paragraph"> |
| <p>By default the event raised is <code>TitleUiEvent.Default</code>. |
| For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout |
| public class ToDoItemDto { |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The purpose of the <code>titleUiEvent</code> attribute is to allows a custom subclass to be emitted instead. |
| A similar attribute is available for icon names and CSS classes.</p> |
| </div> |
| <div class="paragraph"> |
| <p>For example:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">@DomainObjectLayout( |
| titleUiEvent=ToDoItemDto.TitleUiEvent.class |
| ) |
| public class ToDoItemDto { |
| public static class TitleUiEvent |
| extends org.apache.isis.applib.events.ui.TitleUiEvent<ToDoItemDto> { } |
| ... |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The benefit is that subscribers can be more targeted as to the events that they subscribe to.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="subscribers-4"><a class="anchor" href="#subscribers-4"></a>Subscribers</h3> |
| <div class="paragraph"> |
| <p>Subscribers (which must be domain services) subscribe to events posted through the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Subscribers can be either coarse-grained (if they subscribe to the top-level event type):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(TitleUiEvent.class) |
| public void on(TitleUiEvent ev) { |
| if(ev.getSource() instanceof ToDoItemDto) { |
| ... |
| } |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>or can be fine-grained (by subscribing to specific event subtypes):</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">import org.springframework.context.event.EventListener; |
| import org.springframework.stereotype.Service; |
| |
| @Service |
| public class SomeSubscriber { |
| @EventListener(ToDoItemDto.TitleUiEvent.class) |
| public void on(ToDoItemDto.TitleUiEvent ev) { |
| ... |
| } |
| }</code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>The subscriber should then use either <code>TitleUiEvent#setTranslatableTitle(…​)</code> or <code>TitleUiEvent#setTitle(…​)</code> to actually specify the title to be used.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="default-doop-and-noop-events-4"><a class="anchor" href="#default-doop-and-noop-events-4"></a>Default, Doop and Noop events</h3> |
| <div class="paragraph"> |
| <p>If the <code>titleUiEvent</code> attribute is not explicitly specified (is left as its default value, <code>TitleUiEvent.Default</code>), then the framework will, by default, post an event.</p> |
| </div> |
| <div class="paragraph"> |
| <p>If this is not required, then the <code>isis.reflector.facet.domainObjectLayoutAnnotation.titleUiEvent.postForDefault</code> configuration property can be set to "false"; this will disable posting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>On the other hand, if the <code>titleUiEvent</code> has been explicitly specified to some subclass, then an event will be posted. |
| The framework provides <code>TitleUiEvent.Doop</code> as such a subclass, so setting the <code>titleUiEvent</code> attribute to this class will ensure that the event to be posted, irrespective of the configuration property setting.</p> |
| </div> |
| <div class="paragraph"> |
| <p>And, conversely, the framework also provides <code>TitleUiEvent.Noop</code>; if <code>titleUiEvent</code> attribute is set to this class, thn no event will be posted.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="raising-events-programmatically-4"><a class="anchor" href="#raising-events-programmatically-4"></a>Raising events programmatically</h3> |
| <div class="paragraph"> |
| <p>Normally events are only raised for interactions through the UI. |
| However, events can be raised programmatically either by calling the <a href="../applib-svc/EventBusService.html" class="page"><code>EventBusService</code></a> API directly, or as a result of calling the <a href="../applib-svc/TitleService.html" class="page"><code>TitleService</code></a>'s <code>titleOf(…​)</code> method.</p> |
| </div> |
| </div> |
| </div> |
| </div> |
| </article> |
| <aside class="article-aside toc" role="navigation"> |
| <p class="toc-title">On this page</p> |
| <div id="article-toc"></div> |
| </aside> |
| </main> |
| </div> |
| <footer class="footer"> |
| <div class="content"> |
| <div class="copyright"> |
| <p> |
| Copyright © 2010~2020 The Apache Software Foundation, licensed under the Apache License, v2.0. |
| <br/> |
| Apache, the Apache feather logo, Apache Isis, and the Apache Isis project logo are all trademarks of The Apache Software Foundation. |
| </p> |
| </div> |
| <div class="revision"> |
| <p>Revision: SNAPSHOT</p> |
| </div> |
| </div> |
| </footer> |
| <script src="../../../_/js/site.js"></script> |
| <script async src="../../../_/js/vendor/highlight.js"></script> |
| <script src="../../../_/js/vendor/jquery-3.4.1.min.js"></script> |
| <script src="../../../_/js/vendor/jquery-ui-1.12.1.custom.widget-only.min.js"></script> |
| <script src="../../../_/js/vendor/jquery.tocify.min.js"></script> |
| |
| <script> |
| $(function() { |
| $("#article-toc").tocify( { |
| showEffect: "slideDown", |
| hashGenerator: "pretty", |
| hideEffect: "slideUp", |
| selectors: "h2, h3", |
| scrollTo: 120, |
| smoothScroll: true, |
| theme: "jqueryui", |
| highlightOnScroll: true |
| } ); |
| }); |
| </script> |
| </body> |
| </html> |