Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

6. Hooks and Listeners

You can create custom hooks or listeners and attach it to defined view. Using this elements, you can connect defined in xml view to JAVA code.

...

Hooks have to be grouped in tag:

Code Block
themeEclipse
languagexml
themeEclipse
linenumberstrue

<hooks>

     // HOOK DEFINITIONS

</hooks>

Every hook has structure:

Code Block
themeEclipse
languagexml
themeEclipse
linenumberstrue

<hookType class="className" method="beanMethod" />

...

Listeners are methods that will be executed when specified event is fired. Every listener has structure:

Code Block
themeEclipse
languagexmlthemeEclipse
linenumberstrue

<listener event="eventname" class="className" method="beanMethod" />

...

For more informations about listeners see 'view listeners section'

Anchor
rowStyleResolvers
rowStyleResolvers

6.3. row style resolvers

Grid's row style resolvers returns set of CSS clas names for given row entity. You can use them to mark specified grid rows, e.g. whith negative balance of some arbitrary values. 
Resolver method is invoked for each of grid's entity.

Info

Currently row style resolvers can be used only with grid or lookup component.

Every resolver has structure:

Code Block
themeEclipse
languagexml
linenumberstrue
<rowStyleResolver class="className" method="beanMethod" />

Where:

  • className - class (path + name) which contains resolver method
  • beanMethod - name of resolver method that should be executed for each of row entity

For more informations about row style resolvers see 'row style resolvers section'.