You receive the fields for only 1 of the datasources. This leads to the client having to add the previous fields to the new fields (this currently works). If you want to delete the previous fields when deselecting a datasource, it becomes a bit more tricky, because the client would need to keep track of which field belongs to which datasource. I think it would be better to fix this on the backend, so that when you do a FIELDS_REQUEST for 2 datasources, you get all the fields for those 2 datasources. Makes more sense.
When the backend is done I can update the frontend.
There's a problem with the backend.
If you send the following FIELDS_REQUEST message (for 2 datasources):
You receive the fields for only 1 of the datasources. This leads to the client having to add the previous fields to the new fields (this currently works). If you want to delete the previous fields when deselecting a datasource, it becomes a bit more tricky, because the client would need to keep track of which field belongs to which datasource. I think it would be better to fix this on the backend, so that when you do a FIELDS_REQUEST for 2 datasources, you get all the fields for those 2 datasources. Makes more sense.
When the backend is done I can update the frontend.