question

chin soon chong avatar image
2 Likes"
chin soon chong asked Jason Lightfoot commented

Dashboard widgets; listbox onselect to set text to edit box

Dear Sir/Madam,

I am trying to develop a simple dashboard GUI with a listbox and an edit box. When I select an item in the listbox, the selected item's name should be set to the edit box.

This work well within the simulation model environment, but when I ran the model on the webserver, the value on the edit box is not updated. Checking on the model ran by the webserver, the node that is linked to the edit box is updated correctly.

I tried using repaintview to repaint the edit box, but still not updated. I have also used setviewtext to set the text to the edit box directly, but still not updated.

Am I missing something in the code for the webserver version to work?

I am using the latest version of webserver

Thanks

Chong




FlexSim 23.0.14
webserver not workingwidgets dashboardlistbox
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

Hi @chin soon chong, was Jacob Gillespie's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jacob Gillespie avatar image
1 Like"
Jacob Gillespie answered

@chin soon chong

The webserver polls for the current value of dashboard widgets only when you press reset or when the model is running. If you want it to poll more often you can edit the javascript code.


The JavaScript code is located at:

C:\Program Files\FlexSim 2024\program\flexsimweb\server\server.js

If you change line 690 from:

if (!onlyOnce && running)

To:

if (!onlyOnce)

It will always poll for updates every 0.5 seconds.

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.