Where (enum)

Represents the location in the user interface where a class member is to be rendered.

Used to control visibility (eg using the PropertyLayout#hidden() annotation) and enablement (eg using the Property#editing() annotation) in different regions of the user interface.

The application programmer may use any of the values of this enum. Some represent concrete locations (eg #OBJECT_FORMS , #PARENTED_TABLES ), whereas some represent a combination of locations (eg #ALL_TABLES , #ANYWHERE ).

API

Where.java
enum Where {
  EVERYWHERE     (1)
  ANYWHERE     (2)
  OBJECT_FORMS     (3)
  REFERENCES_PARENT     (4)
  PARENTED_TABLES     (5)
  STANDALONE_TABLES     (6)
  ALL_TABLES     (7)
  ALL_EXCEPT_STANDALONE_TABLES     (8)
  NOWHERE     (9)
  NOT_SPECIFIED     (10)
  String getFriendlyName()
  boolean isAlways()
  boolean inParentedTable()
  boolean inStandaloneTable()
  boolean includes(Where context)     (11)
}
1 EVERYWHERE

The member should be disabled/hidden everywhere.

2 ANYWHERE

The member should be disabled/hidden everywhere.

3 OBJECT_FORMS

The member should be disabled/hidden when displayed within an object form.

4 REFERENCES_PARENT

The (property) member should be hidden when displayed as a column of a table within parent object’s collection, and when it references that parent.

5 PARENTED_TABLES

The member should be hidden when displayed as a column of a table within a parent object’s collection.

6 STANDALONE_TABLES

The member should be hidden when displayed as a column of a table showing a standalone list of objects, for example as returned by a repository query.

7 ALL_TABLES

The member should be disabled/hidden when displayed as a column of a table, either an object’s collection or a standalone list.

8 ALL_EXCEPT_STANDALONE_TABLES

The member should be disabled/hidden except when displayed as a column of a standalone table.

9 NOWHERE

To act as an override if a member would normally be hidden as a result of some other convention.

10 NOT_SPECIFIED

Acts as the default no-op value for PropertyLayout#hidden() , CollectionLayout#hidden() and ActionLayout#hidden() .

11 includes(Where)

Whether this Where is a superset of the context Where provided.

Members

EVERYWHERE

The member should be disabled/hidden everywhere.

Synonym for #ANYWHERE .

ANYWHERE

The member should be disabled/hidden everywhere.

Synonym for #EVERYWHERE .

OBJECT_FORMS

The member should be disabled/hidden when displayed within an object form.

For most viewers, this applies to property and collection members, not actions.

REFERENCES_PARENT

The (property) member should be hidden when displayed as a column of a table within parent object’s collection, and when it references that parent.

This has no meaning for collections; if set on a collection then it will just be ignored.

PARENTED_TABLES

The member should be hidden when displayed as a column of a table within a parent object’s collection.

An alternative to using annotations is using to use file based layout, which can be reloaded dynamically. One implementation that supports this is TableColumnOrderServiceUsingTxtFile service, that reads from files named ParentClass#collectionId.columnOrder.txt .

STANDALONE_TABLES

The member should be hidden when displayed as a column of a table showing a standalone list of objects, for example as returned by a repository query.

An alternative to using annotations is using to use file based layout, which can be reloaded dynamically. One implementation that supports this is TableColumnOrderServiceUsingTxtFile service, that reads from files named ClassName.columnOrder.txt .

ALL_TABLES

The member should be disabled/hidden when displayed as a column of a table, either an object’s collection or a standalone list.

This combines #PARENTED_TABLES and #STANDALONE_TABLES .

An alternative to using annotations is using to use file based layout, which can be reloaded dynamically. One implementation that supports this is TableColumnOrderServiceUsingTxtFile service, that reads from files named ParentClass#collectionId.columnOrder.txt (parented collections) and ClassName.columnOrder.txt (standalone collections).

ALL_EXCEPT_STANDALONE_TABLES

The member should be disabled/hidden except when displayed as a column of a standalone table.

This is the inverse of #STANDALONE_TABLES .

NOWHERE

To act as an override if a member would normally be hidden as a result of some other convention.

For example, if a property is annotated with @Title , then normally this should be hidden from all tables. Additionally annotating with @Hidden(where=Where.NOWHERE) overrides this.

NOT_SPECIFIED

Acts as the default no-op value for PropertyLayout#hidden() , CollectionLayout#hidden() and ActionLayout#hidden() .

includes(Where)

Whether this Where is a superset of the context Where provided.

For example, #ALL_TABLES includes #STANDALONE_TABLES ; #ANYWHERE includes all others.