Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Dr. Lofi Dewanto
    @lofidewanto_twitter
    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
    Daniel Korbel
    @masterdany88
    @vegegoku what is Blob?
    is it import java.sql.Blob;
    ?
    Ahmad K. Bawaneh
    @vegegoku
    elemental2 and i think we should switch to domino channel
    Daniel Korbel
    @masterdany88
    ok
    Jonathan Fischer
    @_jlfischer_twitter

    Hi all: I'm trying to build my project this morning and suddenly the elemento-core jar we've been depending on is suddenly missing from the main Maven repository.

    [ivy:resolve] :: problems summary ::
    [ivy:resolve] :::: WARNINGS
    [ivy:resolve]         [NOT FOUND  ] org.jboss.gwt.elemento#elemento-core;0.8.2-gwt2!elemento-core.gwt-lib (387ms)
    [ivy:resolve]     ==== ibiblio: tried
    [ivy:resolve]       https://repo1.maven.org/maven2/org/jboss/gwt/elemento/elemento-core/0.8.2-gwt2/elemento-core-0.8.2-gwt2.gwt-lib

    Did something happen to the older artifacts?

    Colin Alworth
    @niloc132
    looks like you are trying to get .gwt-lib instead of .jar
    a packaging=gwt-lib is a jar
    (its like how a source jar is actually a .jar, not a .sources)
    Jonathan Fischer
    @_jlfischer_twitter
    Huh, right. It's worked for the last couple of years though.
    Colin Alworth
    @niloc132
    since maven central won't delete artifacts, best guess is that something changed in your project (or elemento in a way that confuses ivy, or in ivy)
    Jonathan Fischer
    @_jlfischer_twitter
    Huh, it ended up being an Ant issue. I did a Homebrew upgrade this weekend, it pulled in the latest Ant, and suddenly I can't resolve elemento-core. Switching back to Ant 1.9.x fixed it.