ZK - inject Spring beans directly into ZK beans

Is it possible to embed Spring beans directly in ZK beans support?

In textbooks such as this , I found only an example in which the application context was manually extracted from a complex of web applications, which is very unbalanced and unflexible.

+3
source share
3 answers

Actually VariableResolver works , however it is difficult to find how to use it correctly.

Firstly, I had to include the header in the .zul file:

<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>

Then use $ {controllerBeanName} in the apply attribute , fe

<window id="win" title="Typy mieszkań" width="750px" border="normal"
      apply="${appartmentTypeController}">

appartmentTypeController - bean, GeneralForwardComposer, spring.

+3

Can ZK-DL http://zk.datalite.cz/zk-dl help you? It uses its own approach to Spring integration, not the original ZK path.

0
source

Source: https://habr.com/ru/post/1790453/


All Articles