I would like to know how to create a custom datasource configuration that is built on the fly at request time. LEt me explain the use case and my current architecture:
Each user has a different configuration in our application (which fields are visible for example) We create a base .ds.xml config for all the fields for a particular grid, and then customize that for each user. When the user requests a datasource, the client sends a list of fields to ignore to the loader servlet, opens the XML, sets the ignore attribute to true, and then parses the XML to a datasource using the SmartCLient API. THis works.
However, when a user fetches data, the DataSource config that is used in the default one with all the fields, as we do not write the changes back out to the base XML file. This again works, however the DSResponse contains the fields that we ignored. The grid, which was built on the modified config, ignores the fields so the data is not displayed to the user.
This isn't the best design in my opinion, but I am not sure how to get around it. I don't want to cache each modified config, as we have tons of users and that would be a resource hog.
Do see any problems with this approach?
Each user has a different configuration in our application (which fields are visible for example) We create a base .ds.xml config for all the fields for a particular grid, and then customize that for each user. When the user requests a datasource, the client sends a list of fields to ignore to the loader servlet, opens the XML, sets the ignore attribute to true, and then parses the XML to a datasource using the SmartCLient API. THis works.
However, when a user fetches data, the DataSource config that is used in the default one with all the fields, as we do not write the changes back out to the base XML file. This again works, however the DSResponse contains the fields that we ignored. The grid, which was built on the modified config, ignores the fields so the data is not displayed to the user.
This isn't the best design in my opinion, but I am not sure how to get around it. I don't want to cache each modified config, as we have tons of users and that would be a resource hog.
Do see any problems with this approach?