Apply DelegatingVariableResolver to all ViewModels

asked 2020-08-30 16:23:44 +0800

Arsen gravatar image Arsen
384 5

To use Spring managed service in my ViewModel in MVVM I need to add annotation


to each ViewModel class. Can I somehow register it as default resolver for all ViewModels?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted

answered 2020-08-31 12:29:17 +0800

cor3000 gravatar image cor3000
6280 2 7

It is possible to configure a system-level variable resolver which will be used globally also for @WireVariable inside view models.

Add this to your zk.xml:



link publish delete flag offensive edit


thanks a lot

Arsen ( 2020-09-01 16:13:59 +0800 )edit

answered 2020-09-08 21:36:19 +0800

Jaksonjones gravatar image Jaksonjones

To wire the Spring-managed beans, you need to register the Spring variable resolver, DelegatingVariableResolver. Then, you could annotate @WireVariable for wiring a Spring-managed bean.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2020-08-30 16:23:44 +0800

Seen: 16 times

Last updated: Sep 08 '20

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More