Appconnect 2 - dynamic attribute not updating after reloading data

Wappler Version :
Operating System : 6.3.3
Server Model: nodejs
Database Type: mysql

Appconnect 2 RC 4

Expected behavior

What do you think should happen?

Reloading a server action should make the dmx-bind / dynamic attribute update. But it doesn’t seem to do that.

How to reproduce

  1. I submit a form, this updates something in the database from 0 to 1.
  2. On succesful submit of the form, I reload the server connect which queries the database for the data that I use to ‘prefill the form’.

My input fields are 2 radio buttons looking like this:

 <input type="radio" class="btn-check" name="auto_add_customers" id="optionAutoAddCustomersFalse" autocomplete="off" data-lpignore="true" data-form-type="other" dmx-bind:checked="!affiliatesSettingsGeneralRetrieve.data.queryAffiliateSettings.auto_add_customers">
 <label class="ks-btn ks-btn-secondary-outline" for="optionAutoAddCustomersFalse">Nee</label>
<input type="radio" class="btn-check" name="auto_add_customers" id="optionAutoAddCustomersTrue" autocomplete="off" data-lpignore="true" data-form-type="other" dmx-bind:checked="affiliatesSettingsGeneralRetrieve.data.queryAffiliateSettings.auto_add_customers">
<label class="ks-btn ks-btn-secondary-outline" for="optionAutoAddCustomersTrue">Ja</label>
  1. So I set it up that they are checked when this auto_add_customers field is 0 or 1. For the first one I have this:
dmx-bind:checked="!affiliatesSettingsGeneralRetrieve.data.queryAffiliateSettings.auto_add_customers"
  1. This works fine when I do a fresh load of the page. The corrcet radio button is checked.

  2. But when I submit the form: currently the actual database update fails, as I haven’t finished that part of the code yet. So the result is that the database value is STILL 0. BUT the radio button’s don’t update their checked status.
    The wrong radio button is now checked.

  3. If I refresh the page, the correct radio button is checked again

1 Like

Thanks for that report, i have been battling with the side effect of this for ages, thought it was me!

2 Likes

Is it just with form elements or bindings in general?

Not sure haven’t tested with other elements. Just the form

Currently having to force page reload via browser component on form submission rather than just refreshing the data.

Same issue for me, what used to work fine now requires a page refresh. The page is entirely blank (data should all be coming in from server connects) until a refresh.

Do you reset the form before getting the new data? With the new signals it only updates when data was changed, in your example the property didn’t change so it didn’t trigger an update for the radio button.

Hmm no I don’t reset the form. Simply reloading the server connect that gets the data, that’s it

Can you check if the following update helps:

dmxAppConnect.zip (115.0 KB)

Yep, thanks Patrick. Fixed

Fixed in Wappler 6.4.0

This topic was automatically closed after 32 hours. New replies are no longer allowed.