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 TypeMethodDescriptionvoidThe afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.voidThe beforeField event is invoked each time the field becomes current (in add/update/delete mode).voidThe initField event section is invoked on each field when the form is activated.voidThe onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).voidThe onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.voidvalidar()The validar event is invoked whenever input is accepted on the field (in add/update/delete mode).voidThe 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:FieldListenerThe 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:
validarin interfaceFieldListener- Throws:
Exception- when the validation fails
-
afterField
Description copied from interface:FieldListenerThe afterField event is invoked (in add/update/delete mode) after the field is current -- that is as some other field becomes current.- Specified by:
afterFieldin interfaceFieldListener- Throws:
Exception
-
beforeField
Description copied from interface:FieldListenerThe beforeField event is invoked each time the field becomes current (in add/update/delete mode).- Specified by:
beforeFieldin interfaceFieldListener- Throws:
Exception
-
initField
Description copied from interface:FieldListenerThe initField event section is invoked on each field when the form is activated.- Specified by:
initFieldin interfaceFieldListener- Throws:
Exception
-
onDataAccept
Description copied from interface:FieldListenerThe onDataAccept event is invoked whenever input is accepted on the field (in add/update/delete mode).- Specified by:
onDataAcceptin interfaceFieldListener- Throws:
Exception
-
onSearchRangeAccept
Description copied from interface:FieldListenerThe onSearchRangeAccept event is invoked whenever input is accepted on the field in FIND mode.- Specified by:
onSearchRangeAcceptin interfaceFieldListener- Throws:
Exception
-
whenValueChanges
Description copied from interface:FieldListenerThe whenValueChanges event is invoked whenever the field is set to a new, different value.- Specified by:
whenValueChangesin interfaceFieldListener- Throws:
Exception
-