NG onDataChange Problem (8.3.2)

Forum to discuss the new web client version of Servoy.

NG onDataChange Problem (8.3.2)

Postby bcusick » Fri Sep 14, 2018 5:40 pm

Hey Guys,

I think I've come across a pretty nasty bug:

When you have a onDataChange() event on a field (just normal, servoy text field - or a bootstrap text field) and that field is bound to a scope variable, it doesn't update.

I've attached a small sample file to demonstrate... but basically:

    1. Create a form variable (text)
    2. Create a scoped variable (text)
    3. Place two fields on your form - one with the form variable as the dataprovider and the other with the scoped variable
    4. Create the following method:
    Code: Select all
    function onDataChange(oldValue, newValue, event) {
       
       var sFldName = event.getElementName(),
          sFrm = event.getFormName();
       
       newValue += "ing";
       
       forms[sFrm][forms[sFrm].elements[sFldName].getDataProviderID()] = newValue;
       
       return true
    }

    5. Attach the SAME method to the onDataChange event of both fields

What you'll see is - the field with the FORM variable updates, the field with the scoped variable DOES NOT.

onChangeBug.png


dataChangeBug.servoy
You do not have the required permissions to view the files attached to this post.
Bob Cusick
bcusick
 
Posts: 1224
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 2 guests