Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Ahmad K. Bawaneh
    @vegegoku
    @DavidWilla use ` not '
    DavidWilla
    @DavidWilla
    The fork one works fine and the original version doesn't work. The fork one just added the following code:
        public void setFocus(final boolean focused)
        {
            if (focused)
            {
                nativeFocus(getElement());
            }
            else
            {
                super.setFocus(false);
            }
        }
    
        // IE11/Ege specific check - The "setActive" method does not cause scrolling on parent element, as setFocus does, and
        // it results in the same behavior.
        public static native void nativeFocus(final Element element)
        /*-{
            if (element.setActive)
            {
                element.setActive();
            }
            else
            {
                element.focus();
            }
        }-*/;
    Colin Alworth
    @niloc132
    doesnt sound like that should make a difference. either there is another change somewhere, or an error you aren't seeing, etc
    Harald Pehl
    @hpehl

    @/all There's an issue in Elemento with Widgets.asElement(): hal/elemento#82

    Before trying to fix this, I'd like to get feedback from you. Please read and comment on hal/elemento#82

    Harald Pehl
    @hpehl

    @/all
    Just released Elemento 1.0.1 which updates Elemental2 to 1.1.0 and sets the minimal Java version back to 1.8.

    For all details see: https://github.com/hal/elemento/releases/tag/1.0.1

    The new version should be available in Maven Central in a few hours.

    Frank Hossfeld
    @FrankHossfeld
    :+1:
    Dr. Lofi Dewanto
    @lofidewanto_twitter

    Hi Elemento experts, I'm trying to upgrade my GWT Boot stuffs to GWT 2.9 and also to use Elemento 1.0.0 but I got wyrd error on elemento-template-api?

    Failed to collect dependencies at org.jboss.elemento:elemento-template-api:jar:1.0.0: Failed to read artifact descriptor for org.jboss.elemento:elemento-template-api:jar:1.0.0: Could not transfer artifact org.jboss.elemento:elemento-template-api:pom:1.0.0 from/to vertispan-snapshots (https://repo.vertispan.com/gwt-snapshot/): Failed to transfer https://repo.vertispan.com/gwt-snapshot/org/jboss/elemento/elemento-template-api/1.0.0/elemento-template-api-1.0.0.pom. Error code 409, Conflict -> [Help 1]

    I'm using additionally following repos:

    <repository>
    <id>rxjava-gwt-repo</id>
    <name>RX Java GWT</name>
    <url>https://raw.githubusercontent.com/intendia-oss/rxjava-gwt/mvn-repo/</url>
    </repository>
    <repository>
    <id>vertispan-snapshots</id>
    <name>Vertispan Snapshots</name>
    <url>https://repo.vertispan.com/gwt-snapshot/</url>
    </repository>
    <repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    <snapshots>
    <enabled>true</enabled>
    <updatePolicy>always</updatePolicy>
    <checksumPolicy>fail</checksumPolicy>
    </snapshots>
    </repository>

    Any ideas? Thanks a lot

    Dr. Lofi Dewanto
    @lofidewanto_twitter
    Are these libs elemento-template-api and elemento-template-processor not available anymore for elemento-core 1.0.0?
    Dmitrii Tikhomirov
    @treblereel
    yeap, ant what is bad i am not able to update crysknife tempale support because i am waiting for updated gwt-safe*
    i need it coz template must support gwt2 widgets and gwt-widgets as well
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    So should I use elemento-template-api and elemento-template-processor 0.9.6?
    Or it won't be supported anymore? Because I cannot find an example of them at the start page of Elemento? In the older version I could find them as "Template" example...
    Dmitrii Tikhomirov
    @treblereel
    yeap, try to use 0.9.6 at this moment
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    OK, I'll try
    Dmitrii Tikhomirov
    @treblereel
    @lofidewanto_twitter plz let me know your results
    Dr. Lofi Dewanto
    @lofidewanto_twitter

    Hmm now I got following error:

    [ERROR] Failed to execute goal on project gwt-boot-starter-elemento-template: Could not resolve dependencies for project com.github.gwtboot:gwt-boot-starter-elemento-template:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at org.jboss.elemento:elemento-template-api:jar:0.9.6: Failed to read artifact descriptor for org.jboss.elemento:elemento-template-api:jar:0.9.6: Could not transfer artifact org.jboss.elemento:elemento-template-api:pom:0.9.6 from/to vertispan-snapshots (https://repo.vertispan.com/gwt-snapshot/): Failed to transfer https://repo.vertispan.com/gwt-snapshot/org/jboss/elemento/elemento-template-api/0.9.6/elemento-template-api-0.9.6.pom. Error code 409, Conflict -> [Help 1]

    Dmitrii Tikhomirov
    @treblereel
    yeap, coz there are no elemental jars at vertispan repo
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    wait I need to restore the package name to elemento.gwt.*

    OK, so org.jboss.elemento for elemento-core 1.0.0

    and

    org.jboss.gwt.elemento for elemento-template-api and elemento-template-processor 0.9.6....

    At least now my build is green for the modules... now I will try to compile the examples...

    Dr. Lofi Dewanto
    @lofidewanto_twitter

    In the example it seems it is not enough to change the import from:

    import static org.jboss.gwt.elemento.core.Elements.*;
    import static org.jboss.gwt.elemento.core.EventType.click;

    to

    import static org.jboss.elemento.core.Elements.*;
    import static org.jboss.elemento.core.EventType.click;

    Harald Pehl
    @hpehl
    @lofidewanto_twitter Try to go through the releases at https://github.com/hal/elemento/releases
    I try to sum up all changes there.
    The most breaking changes are between 0.9.x and 1.0.x. See also https://github.com/hal/elemento/blob/develop/CHANGES.md
    Rob Newton
    @rob5n

    @treblereel

    yeap, and what is bad i am not able to update crysknife tempale support because i am waiting for updated gwt-safe*. I need it coz template must support gwt2 widgets and gwt-widgets as well

    I can understand the elemento template code using SafeHtml and such, but did it really deal with widgets? I thought the widget stuff was partitioned into elemento-widget, and elemento-template-* did not depend on it?

    Dr. Lofi Dewanto
    @lofidewanto_twitter

    @hpehl Thanks a lot, I'm updating my GWT Boot stuffs to work with all the newest versions...

    Question: elemento-template-api and elemento-template-processor are still in the version 0.9.6? Is this compatible with elemento-core 1.0.0?

    Dr. Lofi Dewanto
    @lofidewanto_twitter
    Or are they deprecated and instead we should use crysknife?
    Harald Pehl
    @hpehl

    Or are they deprecated and instead we should use crysknife?

    Yes that's the plan.

    Dmitrii Tikhomirov
    @treblereel
    yeap, looks like gwt-* modules porting takes too long, i going to drop gwt-modules support
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    @hpehl ok, I will move with a new starter for crysknife... In the meantime I updated the elemento template only with GWT 2.9 and Java 11 ... Everything works as expected but I will delete the example with elemento template...
    Daniel Korbel
    @masterdany88
    Hi guys. I have XMLHttpRequest object. I wanna download file from server and save it with web browser.
    I've prepared everything. Requests work, but I do not know how to pass it to browser. Can You help?
    Or is there any change to add http header to such request?
            DomGlobal.window.open();
    Ahmad K. Bawaneh
    @vegegoku

    i normally do this with domino-rest, i use a custom reader, e.g for pdf :

    public class PDFReader implements ResponseReader<Blob> {
        @Override
        public Blob read(Response response) {
            JsResponse jsResponse = (JsResponse) response;
            Uint8Array buffer = new Uint8Array(jsResponse.getResponseArrayBuffer());
            BlobPropertyBag options = BlobPropertyBag.create();
            options.setType("application/pdf, application/octet-stream");
            return new Blob(new Blob.ConstructorBlobPartsArrayUnionType[]{
                    Blob.ConstructorBlobPartsArrayUnionType.of(buffer)
            }, options);
        }
    }

    and the service is defined like this

        @Path("{uuid}/report/{type}")
        @GET
        @Produces(MediaType.APPLICATION_OCTET_STREAM)
        @Reader(PDFReader.class)
        Blob printReport(@PathParam("uuid") String uuid, @PathParam("type") String type);

    and i call it using

    ReportServiceFactory.INSTANCE
                    .printReport(message.getUuid(), "PDF")
                    .setResponseType("arraybuffer")
                    .onSuccess(onEntriesLoaded::accept)
                    .onFailed(failedResponseBean -> {
                        LOGGER.error("failed to download entries " + failedResponseBean);
                    })
                    .send();
    Daniel Korbel
    @masterdany88

    For now I found out such solution:

            Request request = new Request(DominoRestConfig.getInstance().getDefaultServiceRoot() + API_ROOT + SupportPackageRestResource.URL +  "/" + packageName);
            request.headers.append(AUTHORIZATION, context.getAuthorizationHeader());
            DomGlobal.window.fetch(request2);

    but not tested yet

    In case of domino my rest resource use Response object :(
    
        @GET
        @Path("{fileName}")
        @Produces("application/zip")
        @JWTTokenNeeded
        public Response get(@PathParam("fileName") String fileName) {
            return Response.ok(
                    new File(Paths.get(System.getProperty("java.io.tmpdir"), fileName).toString() + ".zip"),
                    MediaType.APPLICATION_OCTET_STREAM)
                    .header("Content-Disposition", "attachment; filename=\"" + fileName + ".zip\"")
                    .build();
        }
    Ahmad K. Bawaneh
    @vegegoku
    Avoid Response if you expect a body or use a different interface
    Response is just too ambiguous
    Daniel Korbel
    @masterdany88
    is @Reader comes from domino?
    Ahmad K. Bawaneh
    @vegegoku
    yes, you can configure it without the annotation though
    check the wiki
    for example you can set it right before you do the call using .setReader
    Daniel Korbel
    @masterdany88
    I deploy my app to OSGI container which so demanding. I would guess that any domino dep will brake it
    I am waiting for domino rest to support Response somehow :D :P :D
    Daniel Korbel
    @masterdany88
    Unfortunatelly my solutions doesnt work
    it just download file
    but it doesnt opent web browser window to save it
    :(
    image.png
    Daniel Korbel
    @masterdany88
    @vegegoku I will try Your solution