Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-661

Improve the @Listen annotation

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.0.0
    • Components
    • None

      The current syntax of the @Listen annotation is brittle: @Listen("onClick = button[label='Clear']")

      I suggest this new approach:

      1. Convert all events to an enum Events which implements the IEvent interface (with a single method String name()). This allows to create several such enums for custom events.
      2. Split the single parameter for @Listen into two: @Listen(event=Enum, selector=String

      Everywhere in the code, an IEvent should be preferred or required to avoid typos, String constants abused for value instances and similar problems.

            Unassigned Unassigned
            digulla digulla
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: