Package systextil.nxj

Class FieldAdapter

java.lang.Object
systextil.nxj.FieldAdapter
All Implemented Interfaces:
FieldListener

public class FieldAdapter extends Object implements FieldListener
Conveniência para implementar somente os métodos de FieldListener que se desejar. Todos os métodos já estão implementados com base no listener informado. Se não for informado nenhum, é usado FieldListener.EMPTY.

É interessante para componentes do NXJ que desejem registrar seus eventos para uso pelas classes controller, com opção para sobrescrever eventos já existentes.

Se for usado o construtor padrão, não há necessidade dos métodos sobrescritos chamarem super, pois o listener usado não implementa nenhum evento.

Author:
sergio
  • Field Summary

    Fields inherited from interface systextil.nxj.FieldListener

    EMPTY
  • Constructor Summary

    Constructors
    Constructor
    Description
    Novo listener vazio.
    Novo listener baseado em outro listener.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.
    void
    The beforeField event is invoked each time the field becomes current (in add/update/delete mode).
    void
    The initField event section is invoked on each field when the form is activated.
    void
    The onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).
    void
    The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.
    void
    The validar event is invoked whenever input is accepted on the field (in add/update/delete mode).
    void
    The whenValueChanges event is invoked whenever the field is set to a new, different value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FieldAdapter

      public FieldAdapter()
      Novo listener vazio.
    • FieldAdapter

      public FieldAdapter(FieldListener listener)
      Novo listener baseado em outro listener.
  • Method Details

    • validar

      public void validar() throws Exception
      Description copied from interface: FieldListener
      The validar event is invoked whenever input is accepted on the field (in add/update/delete mode). Use this event to validate if the input is valid.
      Specified by:
      validar in interface FieldListener
      Throws:
      Exception - when the validation fails
    • afterField

      public void afterField() throws Exception
      Description copied from interface: FieldListener
      The afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.
      Specified by:
      afterField in interface FieldListener
      Throws:
      Exception
    • beforeField

      public void beforeField() throws Exception
      Description copied from interface: FieldListener
      The beforeField event is invoked each time the field becomes current (in add/update/delete mode).
      Specified by:
      beforeField in interface FieldListener
      Throws:
      Exception
    • initField

      public void initField() throws Exception
      Description copied from interface: FieldListener
      The initField event section is invoked on each field when the form is activated.
      Specified by:
      initField in interface FieldListener
      Throws:
      Exception
    • onDataAccept

      public void onDataAccept() throws Exception
      Description copied from interface: FieldListener
      The onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).
      Specified by:
      onDataAccept in interface FieldListener
      Throws:
      Exception
    • onSearchRangeAccept

      public void onSearchRangeAccept() throws Exception
      Description copied from interface: FieldListener
      The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.
      Specified by:
      onSearchRangeAccept in interface FieldListener
      Throws:
      Exception
    • whenValueChanges

      public void whenValueChanges() throws Exception
      Description copied from interface: FieldListener
      The whenValueChanges event is invoked whenever the field is set to a new, different value.
      Specified by:
      whenValueChanges in interface FieldListener
      Throws:
      Exception