Enable/Disable fields in list view problem 2.0.4

Scenario. I have a list view with about 10 records. There is a radio button with 5 options. Depending on the options I want to enable/disable other fields.

I have written a metod called updateui to do this which contains code such as

elements.issue.enabled = (pagetype == 'booknews');

I attach this to the onshow event of the form and the ondatachange of the pagetype field.

When I load the form, or change the pagetype in one record, it updates the enabled of all records using the pagetype value of the current record.

:-(

OS X 10.3.4
Servoy 2.0.4

Yes this is how ListView works.
I can give you one tip, that i shouldn’t give you because we can’t support this!, but what you couls try is this

Give the form a rowBGColor calculation and in that calculation call youre updateuUi script.. I can’t be sure this works 100% because in calculations you shouldn’t call elements or form specific things.
You also should execute that method on onRecordEdit..

jcompagner:
Yes this is how ListView works.

This is very unexpected, unintuitive!
Any chance that you can change this behaviour in a future version?

No.

Of we have to give you something like the rowBGColorer calculation.
This is because there are no seperate UI components for every record!!!
There is only ONE set of ui components that are used to display every record. So if you are changing the UI componets for one record then every other record will also be in that state.
So if you want it right for every record you have to set the ui components in the right state everytime a record is rendered/displayed. Currently there is only one thing that is calculated on every paint and that is a row bg color calculation.

OK, I get it. I better move these fields onto a “Record View”!