Page 1 of 1

[INFO REQ] Get value from complex type field

Posted: Thu Jan 13, 2022 8:09 pm
by henrique

I need to implement a more complex control field type with the data than simply storing a converted value. The conversion function that exists in DataField works perfectly, but what I need is to handle the data load.

The field I'm creating is a late load control, so I need to handle the data load.

At that point I implemented the "defineAccessor" function to allow you to insert a load function.

The problem occurs when the container fetches the data, in the Model.js, 1281 line, it fetches the complex data, from the "data" property, and not from the object itself, so it does not use the property schema to load the data. With this it does not call the function "get" implemented in the function "defineAncestor".

If you modify the line to "return ObjectHelper.getPath(this, dataSource);", everything works as expected.

I can't tell if it's the best implementation, but that's how I found the solution.

Is there any other way to solve this?


Re: [INFO REQ] Get value from complex type field

Posted: Fri Jan 14, 2022 4:04 pm
by Animal

We need to have calculated field values. This should not be too hard to add to the data subsystem. Here's a ticket: https://github.com/bryntum/support/issues/4025


Re: [INFO REQ] Get value from complex type field

Posted: Fri Feb 18, 2022 3:44 pm
by henrique

Any news about this?


Re: [INFO REQ] Get value from complex type field

Posted: Mon Feb 21, 2022 9:45 am
by alex.l

Not yet, the ticket will get a milestone when we plan to implement it in nearest releases.