Re: Cannot clear validation errors when form onSuccess returns a StreamResponse

2017-09-04 Thread Thiago H. de Paula Figueiredo
You could just have something like window.location = Pretty hacky, even working. On Mon, Sep 4, 2017 at 10:37 AM, Svein-Erik Løken wrote: > Just curious: How can you return javascript code? / Without > javaScriptSupport? > > > -- Thiago

RE: Cannot clear validation errors when form onSuccess returns a StreamResponse

2017-09-04 Thread Svein-Erik Løken
Just curious: How can you return javascript code? / Without javaScriptSupport?

Re: Cannot clear validation errors when form onSuccess returns a StreamResponse

2017-09-04 Thread Thiago H. de Paula Figueiredo
It looks better than mine, actually, since you're using JavaScriptSupport. :) On Mon, Sep 4, 2017 at 10:10 AM, Svein-Erik Løken wrote: > Thanks! > > I was able to make this work. Do you think my solution is too complex > Thiago? > > > /external/TrackSegmentsExport (the form): > =

RE: Cannot clear validation errors when form onSuccess returns a StreamResponse

2017-09-04 Thread Svein-Erik Løken
Thanks! I was able to make this work. Do you think my solution is too complex Thiago? /external/TrackSegmentsExport (the form): == @Persist(PersistenceConstants.FLASH) boolean download; @AfterRender void afterRender() { if (download) { javaS

Re: Cannot clear validation errors when form onSuccess returns a StreamResponse

2017-09-04 Thread Thiago H. de Paula Figueiredo
Hi! This is due to HTTP, not Tapestry itself: you cannot have two different responses to the same request. So, you either rerender the page to clear the errors (which calling form.clearErrors() is actually doing, even if you cannot see the results) or returns a binary download (StreamResponse), bu

Cannot clear validation errors when form onSuccess returns a StreamResponse

2017-09-04 Thread Svein-Erik Løken
If I record an error for my I cannot find out how to clear errors (tried form.clearErrors()). Because onSuccess returns a StreamResponse to download a file the form need to have async="false" The form should stay open so user can download several files with different parameters. Can anyone h