VueGWT / vue-gwt

Vue.js Components/Custom Elements in Java with GWT. Developed at https://www.genmymodel.com.
https://vuegwt.github.io/vue-gwt/
MIT License
204 stars 46 forks source link

Add static import support in templates #39

Closed adrienbaron closed 6 years ago

adrienbaron commented 6 years ago

Static imports are supported in the Template Parser Context however there is no way for the user to use them for now (they are only used internally to expose various static java methods).

It would be nice to be able to do:

<vue-gwt:import static="com.axellience.MyClass.STATIC_FIELD"/>
<vue-gwt:import static="com.axellience.MyClass.staticMethod"/>

This would expose STATIC_FIELD and staticMethod in the template.

This could be useful when configuration static properties must be used in the template (dimensions, color values...), or to use static util methods in the templates.