Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    AndreiF
    @andreififiita
    DomGlobal.window.addEventListener("beforeunload", new EventListener() {
    
            @Override
            public void handleEvent(Event evt) {
                evt.preventDefault();
                EVTUtils.set("returnValue", "", evt);
            }
        });
    i created a native method for it:
    public static native void set(String key, String value, Object object) /*-{
        object[key] = value;
    }-*/;
    But still, not completly correct
    is there a way in elemental2 to set evt.returnValue = ""?
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    If you need multiple handlers, use addEventListener - that also lets you use the other keys if you need
    But, gwts window has this addWindowClosingHandler
    Which does what you want already
    AndreiF
    @andreififiita
    dang
    thank you!
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    I’d have to check the history but I’m pretty sure that it’s just a case of “it’s been there for 17 years and sometimes browsers change things”
    AndreiF
    @andreififiita
    Of course. But now i need to find out what method to call on ClosingEvent
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    I think as soon as you look you’ll see it ;)
    AndreiF
    @andreififiita
    @niloc132:delightfullyoffto.pics Yes, the method was already there, just had another name. Tested in Chrome and Firefox and everything checks out
    @niloc132:delightfullyoffto.pics But it seems setMessage(null) does not work. The Reload popup is still being displayed
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    That’s not great - what if you don’t call it at all?
    AndreiF
    @andreififiita
    @niloc132:delightfullyoffto.pics there was some conflicts with the other tests. And for some reason, the chrome debugger does not break on points inside the handling method. I cleared everything up and now it works
    for some reason, any breakpoint set inside onWindowClosing() is not stopping on Reload button press. But at least the behavior is correct
    AndreiF
    @andreififiita
    Can a native object that is annotated with @JsType(isNative = true, namespace = JsPackage.GLOBAL) be casted to JavaScriptObject?
    AndreiF
    @andreififiita
    and second: can I retrieve the native event from a ValueChangeEvent ?
    AndreiF
    @andreififiita
    I am trying to obtain oldURL from a haschange event after using History.addValueChangeHandler() and i cannot manage to do it from the ValueChangeEvent
    Thomas Broyer
    @tbroyer
    This is not possible because historically not all browsers supported the hashchange event. If you need it then you'll have to use an explicit hashchange through other means (Elemental possibly).
    AndreiF
    @andreififiita
    @tbroyer ok got it!
    @tbroyer but regarding my first question? can it be done?
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    You can always freely cast js object to js object, either from jsinterop to JavaScriptObject or vice versa, but might need to lie to java to make it happen (that’s what Js.cast() is for)
    SimonHellbrueck
    @SimonHellbrueck
    Hi folks, is there any tool for GWT similar to https://demo.bpmn.io/?
    Colin Alworth
    @niloc132
    so i know redhat/jboss's jbpm and kogito projects use gwt heavily, so https://www.jbpm.org/ might be a starting point to learn more, but without knowing exactly what you want from that link it is hard to say how to help
    is that what you mean, just the modeling/drawing tools? if so, kogito uses lienzo to actually do the drawing
    (and, separately, just to show how simple it is to draw in a browser, i wrote a very simple tool a few years ago in gwt, kotlinjs, j2cl - demo at https://colinalworth.com/boxes-and-lines/, code at https://github.com/vertispan/connected )
    Dmitrii Tikhomirov
    @treblereel
    @SimonHellbrueck @niloc132 RedHat’s Kogito project is the tool for bpmn modeling based on gwt
    Dmitrii Tikhomirov
    @treblereel
    @SimonHellbrueck you can ping @mdproctor, he is a lead of bpmn in Redhat
    SimonHellbrueck
    @SimonHellbrueck
    @niloc132 @treblereel Thank you! And yes, for me it's just about the drawing. Will take a look at the links.
    mdproctor
    @mdproctor
    @SimonHellbrueck we have two efforts. Our BPMN and now our Serverless Workflow designer tools. All based on GWT and Lienzo. We are migrating to J2CL. But incremental dev mode is a requirement. I can't have engineers doing 40s+ refresh times, for each change.
    3 replies
    @SimonHellbrueck RHT itself is now focusing more on Serverless Workflow. the BPMN aspects, are moving to IBM. I don't yet know their plans.
    IBM is our parent organisation.
    Dr. Lofi Dewanto
    @lofidewanto_twitter

    @mdproctor : Is this what @treblereel means with Kogito Project?

    https://kogito.kie.org/

    Looks very interesting!

    Seems very similar to Camunda?
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    This is in the maven j2cl plugin, and is akin to gradle’s ability to incrementally run tasks
    Bazel does not incrementally run j2cl (nor does maven, yet - we will apply work already done by @treblereel and @mdproctor to achieve that, and try to make closure incremental too)
    Colin Alworth
    @niloc132:delightfullyoffto.pics
    [m]
    What bazel and gradle are very good at and encourage users to do is to break up projects to small source sets - maven is not good at this, but the j2cl maven plugin can do well if the user does it properly. The trick is that maven teams are often accustomed to leaving hundreds or thousands of classes in a single src/main/java, and this will aim to improve the experience in those cases
    Thomas Broyer
    @tbroyer
    Well, Gradle is very good at incrementally compile large source sets too, something it probably is the only one to do well (including incremental annotation processing, though that requires opt-in from the annotation processors)
    Colin Alworth
    @niloc132
    and someday we'll have a real gradle plugin for j2cl yes? in the absence of one, we've had to go it alone with defining conventions to solve a few problems we knew would come up, and a few more that surprised us along the way
    Thomas Broyer
    @tbroyer
    Totally unsure I'll ever finish the one I had started check notes 2.5 years ago, sorry.
    Colin Alworth
    @niloc132
    haha no worries - i have enough working knowledge to attempt one, but effectively no time to do so (esp when i could hack in calling out to maven, which, while gross, will likely be enough for the main gwt+gradle project i contribute to)
    while you're here for a moment, there is one code review i'd like to be sure you see (and several others that would be appreciated, but they aren't oneliners like this): gwtproject/gwt#9781
    Thomas Broyer
    @tbroyer
    Totally missed that one!
    Colin Alworth
    @niloc132
    there's a few others ranging from smallish (fixing Long.toBinaryString) to bureaucratic (merging to tools so we can merge to gwt so we can catch api breakage) to large and esoteric (rewriting doclets/taglets), but i'm content to wait for someone having time to stare at code for a while to nail those down
    oh i forgot "deleting almost 4k lines of long dead code" gwtproject/gwt#9777
    (these are open for anyone else in the channel too @/all - i'm looking for a critical eye to apply to these patches so we can land fixes, and consider a 2.10.1 or 2.11.0 in the nearish future)