Vue.js integration for GWT 2.8, Vue.js Components in Java
People
Repo info
Activity
thelsing
@thelsing
Now I'm a step further intellij compiles on save of the html or java file of a component. And sdm triggers a compile on refresh too. But intellij takes the old html file from build\classes instead of the changed one.
thelsing
@thelsing
I got the issue with the intellij plugin sorted out and submitted a PR for it.
@adrienbaron Do I have to use npm if I want to use Vuetify?
Payam Meyer
@payammeyer
Not sure you have to but overall if you're gonna do more web development, you'll find that your life will be much easier not resisting it, otherwise you have to manage everything manually, think about it like not having gradle.
thelsing
@thelsing
That's true. But I have to make sure that I don't get sidetracked too much. I wanted to test some cross plaform gui abstraction with libgdx, was ready to accept gwt templates, discovered vuegwt and fixed the intellij plugin. If I start to delve into npm, webpack & co now I will spend some days learning that.
Btw. In case somebody ask in the future: For superdevmode to get updates from changed html templates you have to set "Production sources directory" in intellij ("File"->"Settings"->"Build, Execute, Deployment"->"Compiler"->"Annotation Processors") to "."
Otherwise gradle and intellij generated code will end up in different directories.
Payam Meyer
@payammeyer
well you don't really need to "learn" much about npm or webpack, if you follow the example project and setup your project similarly, all you would really use it for is to add dependencies, like vuetify, when you need them.
otherwise I would imagine your option is to download the vuetify source and put it in your classpath and inject it manually
Colin Alworth
@niloc132
hard disagree about npm making life easier
Payam Meyer
@payammeyer
haha, it does in web dev, in my experience
Colin Alworth
@niloc132
mostly the untold number of bugs that have come from being "easy"
plus the fun of "well this config is js, and that config looks like json, but its actually js, and you can write arbitrary procedural js in it..."
Payam Meyer
@payammeyer
that's true
Adrien Baron
@adrienbaron
@thelsing thank you for your PR on the IntelliJ plugin πββοΈ! I've added a comment to the PR as it doesn't seem to manage to build the plugin with graddle in my IntelliJ. I've also merged the #5 PR and rebased develop, so you might have to get a clean version of develop and replay your commits on top of it, sorry about that π
thelsing
@thelsing
Ok will do.
thelsing
@thelsing
@adrienbaron I submitted #7 as a new PR. The commit log is a bit strange, but the changes fit.
I missed the "clean develop" I just merged your develop in mine.
Will try again.
thelsing
@thelsing
Fixed now.
thelsing
@thelsing
How can I do I18n with vue-gwt? Can I use my existing ResourceBundle somehow?
thelsing
@thelsing
Can I somehow influence the imports of the *ExposedType.java files?
thelsing
@thelsing
Static imports in particular. That way I could use something like {{ _t("Hello World") }} for translation.
Adrien Baron
@adrienbaron
You can have a method in your component with a JsMethod doing the bridge, and you can use inheritance to avoid having to declare it in all components π
thelsing
@thelsing
Thanks. I tried the same with an interface and a default method, but the parser doesn't find it.
You'd use JsInterop for any <script> related stuff
thelsing
@thelsing
Ok. Thanks. Makes sense.
v-on:mouseup.prevent.stop (without any handler) is supposed to work according to documentation. But it gives "Empty expression in template event binding. In expression: v-on:mouseup.prevent.stop" Is this a bug or did I misunderstand to doc?
Adrien Baron
@adrienbaron
I think you misunderstood, it expects a mouseup handler, the modifiers are just here to add default behaviour on top, like prevent default and stop propagation, so that you donβt have to add them to your handler
In my case its exactly what I want. But a little noop() methods doesn't hurt too.
thelsing
@thelsing
Is there any best practice on how to use constants int templates that are defined in the component class?
Adrien Baron
@adrienbaron
I think just use @Data for this π. If you donβt want it to be mutable do a @Computed function returning your constant value π
If itβs a static public value you can also use static imports in the template π
thelsing
@thelsing
I'll try the static import. Thanks.
thelsing
@thelsing
I have an private List<> in my model and a getter for it. Do I really need to have @JsProperty on the field?
Adrien Baron
@adrienbaron
Yes, otherwise the automated observability doesnβt work :(. When setting @JsProperty it tells GWT that this might get used in JS apps and forces it to expose some methods on it we use to get notified when the list is modified π
thelsing
@thelsing
Ok.
oedemis
@oedemis
Hello Have anyone experience with gwt-plugin https://marketplace.eclipse.org/content/gwt-eclipse-plugin for m1 mac ? I have a project where i must use the eclipse gwt-plugin for local development after installing it over marketplace its not available in debug window. I am using Spring Tool Suite 4 Version: 4.13.0.RELEASE Build Id: 202112031748