Accessing Spring Bean in the ZUML page
From Documentation
This documentation is for an older version of ZK. For the latest one, please click here.
Simply declare the variable-resolver for org.zkoss.zkplus.spring.DelegatingVariableResolver on top of your ZUML page, then, in the rest of your page, you can access any Spring-Managed beans directly using its bean-id.
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<window>
<grid>
<rows>
<row forEach="${DataSource.elementsList}">
<label value="${each}"/>
</row>
</rows>
</grid>
</window>
variable-resolver will look-up the bean named DataSource automatically for you, and returned a list to the forEach loop.