November 08, 2022

“reloading” context

Welcome to Taipy Forums Taipy GUI “reloading” context

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #236871
    naelnael
    Participant

    Hi everyone,
    I was wondering what the best way to reload a context is.
    I load a context from a file when I start my application.
    When I reload some other data on the fly (using an upload button), most of the changes (if not all) can not be seen.
    I kown I could use a partial and reload everything but I was wondering if there was a better way to do it.
    On the page there is two drop list, a line chart and a gantt chart.

    Regards,
    Aurélien

    #236933
    Florian JactaFlorian Jacta
    Keymaster

    Hi Aurélien,

    Can you give us more explanation on what you want to do? Do you have a sample code to provide? Do you want to change charts/tables depending on the new unknown data you upload?

    Regards,
    Florian

    #236935
    naelnael
    Participant

    Hi Florian
    Yes that’s right, I’d like to change dropdown and charts content according to the upload.

    A pseudo code of what I’ve got is :

    data = load_file(local_sample_file)

    def onUpload(state):
    state.data = load_file(state.uploadedfile) <- the part that does nothing on its own

    launch_app

    I could put the entire gui content in a partial, but I was wondering if there was a more elegant way to do it.

    Regards,
    Aurélien

    • This reply was modified 4 months, 1 week ago by naelnael.
    #236973
    Florian JactaFlorian Jacta
    Keymaster

    Hi Aurélien,

    Like I have said in my mail, presently, you will not be able to change the structure of your data in real-time this way.

    You should use a Partial to do that and reload like this a segment of your Markdown (https://docs.taipy.io/en/latest/manuals/gui/pages/#partials).

    A GitHub issue concerns this improvement: https://github.com/Avaiga/taipy-gui/issues/443.

    Regards,
    Florian

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.