...
Model hooks are methods that is executed on specific model actions (defined in xml file). Model hook method has structure:
Code Block |
---|
public void modelHookMethodName(final DataDefinition dataDefinition, final Entity entity) {
// MODEL HOOK BODY
}
|
...
Anchor | ||||
---|---|---|---|---|
|
2.3. View hooks
TODO
public void changeQualityControlType(final ViewDefinitionState state, final Locale locale) {
View hooks are methods that is executed always where request is send to serwer. View hook method has structure:
Code Block |
---|
public void viewHookMethodName(final ViewDefinitionState state, final Locale locale) {
// VIEW HOOK BODY
}
|
Where
- viewHookMethodName - name of view hook method
- state - view state
- locale - users locale
To attach created view hook method to view xml file see 'view hooks' section.
Anchor | ||||
---|---|---|---|---|
|
...
public void generateTechnologyNumber(final ViewDefinitionState state, final ComponentState componentState, final String[] args) {
viewListeners
3. Example
TODO