Giter Club home page Giter Club logo

Comments (1)

jonesde avatar jonesde commented on July 29, 2024

Thanks for reporting this. Here are some notes on my findings so far, don't have an answer yet so these are partially notes for myself (or others who might look into this).

The Entity/DataExport screen has a bit of a different sort of form in that when submitted it can result in a download (for Out to Browser) or server side for the other two Output options. That makes a difference for client rendered HTML with Quasar which is designed for client side processing and programmatic interaction with the server rather than the simple HTML form submit.

Most of the macros for the qvt render mode have variations in them for client side forms with data going to a JavaScript object (plain JS object, ie a map) with a m-form or m-form-link Vue component wrapper around them to handle the submit (for data submission or navigation), but in this case it generates a plain HTML form element with no Vue component wrapper. That's a problem because the Quasar q-radio Vue component does generate a input with type="radio" but does not maintain state in the DOM, it only maintains state via JavaScript (using Vue form functionality with v-model, etc) so a plain browser form submit won't work as it won't pick up those values. That is an issue in addition to it not maintaining state for the user to see, which is the symptom that is described here.

It might be possible to handle the download in JavaScript without relying on how browsers handle form submits using either a hidden iframe or createObjectURL() as described here:

https://stackoverflow.com/questions/3749231/download-file-using-javascript-jquery

This is a bit more of a pain for this particular form because the client doesn't know if it is a file to download or a response that tells the client to navigate to a screen (the same screen in this case). That might be possible with the hidden iframe approach but would be easier with the createObjectURL() approach. The downside to createObjectURL() is that it pulls the data into memory and might not work for large files (client memory limits). The hidden iframe would trigger the normal browser streaming download if the response is for a download, and for a JSON response telling the client to navigate it might work to look at the contents of the iframe after the data is downloaded to see if it contains such JSON.

from moqui-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.