Package systextil.nxj
Class FieldAdapter
java.lang.Object
systextil.nxj.FieldAdapter
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionNovo listener vazio.FieldAdapter(FieldListener listener)
Novo listener baseado em outro listener. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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
validar()
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.
-
Constructor Details
-
FieldAdapter
public FieldAdapter()Novo listener vazio. -
FieldAdapter
Novo listener baseado em outro listener.
-
-
Method Details
-
validar
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 interfaceFieldListener
- Throws:
Exception
- when the validation fails
-
afterField
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 interfaceFieldListener
- Throws:
Exception
-
beforeField
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 interfaceFieldListener
- Throws:
Exception
-
initField
Description copied from interface:FieldListener
The initField event section is invoked on each field when the form is activated.- Specified by:
initField
in interfaceFieldListener
- Throws:
Exception
-
onDataAccept
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 interfaceFieldListener
- Throws:
Exception
-
onSearchRangeAccept
Description copied from interface:FieldListener
The onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.- Specified by:
onSearchRangeAccept
in interfaceFieldListener
- Throws:
Exception
-
whenValueChanges
Description copied from interface:FieldListener
The whenValueChanges event is invoked whenever the field is set to a new, different value.- Specified by:
whenValueChanges
in interfaceFieldListener
- Throws:
Exception
-