Annotation Interface UI


@Documented @Retention(RUNTIME) @Target(TYPE) public @interface UI
Tags a POJO as being a UI class with event listeners, or, with refOnly = true, as a class that only uses a panel or context menu.

The constructor of a UI class must be public and cannot have any parameters: the server instantiates the class the panel's class reference names.

Example:

  @UI(ref="Proj:/panel/subFolder/MyPanel" [, refOnly = true])
  public class MyPanelListener
    {
    public MyPanelListener()
      {
      ...
      }
    }

Author:
Christopher Mindus
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The Full String Reference to the Panel property.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Option to use the annotation for referencing in the Java code only, together with @UIRef, and be able to use String refactoring.
  • Element Details

    • ref

      String ref
      The Full String Reference to the Panel property. This property must be of main type, i.e. being a Resource (.iiziPanel file).
      Returns:
      The Full String Reference to the Property (includes the Module Project and slashes).
    • refOnly

      boolean refOnly
      Option to use the annotation for referencing in the Java code only, together with @UIRef, and be able to use String refactoring.

      With the default false the class is the panel's or context menu's class: its class reference must name it (iiziGo checks both sides), the server instantiates it once per virtualized panel and invokes its @OnUI... event methods.

      When refOnly is true, the class only uses the panel or context menu: its @UIRef strings (fields, variables, casts and the annotated String parameters of the API such as UIContainer.getUIComponent) are checked against the panel and refactored when it changes, the panel or context menu does not have to have a back reference to the class and keeps its one class, the server never instantiates the class through the panel, and an event method annotated in it is never invoked (iiziGo reports such a method). A panel cannot name a reference-only class as its class.

      Default:
      false