I am quite new to ZK framework. I am confuse with difference between SelectorComposer
and GenericForwardComposer
.
Can somebody also define, when to use which Composer.
Thanks
In a nutshell, GenericForwardComposer
is the older of the two. It supports autowiring based on naming conventions. The approach proved to be brittle - typos here will ruin your day, trying to figure out why !/(รง&(% it doesn't work, DXXXX!
SelectorComposer
, on the other hand, uses Java annotations. In our shop, we have written code that validates all those annotations to make sure we don't have any typos in them, that the referenced elements exist, etc.
SelectorComposer
It supports the autowiring based on Java annotation and a CSS3-based selector. If you don't know which one to use, use SelectorComposer.
GenericForwardComposer
It supports the autowiring based on naming convention. You don't need to specify annotations explicitly, but it is error-prone if it is used improperly.