I'm trying to use the addDynamicDSGenerator API to generate a dynamic set of fields for a datasource a grid is attached to.
I was able to get the addDynamicDSGenerator() to load/register a new DynamicDSGenerator successfully by extending the DataSourceLoader class and having it add/register the generator following the instantiation of DataSourceLoader (super()).
In my client I am calling DataSource.load("myPrefix_mySuffix") and I see the DynamicDSGenerators's getDataSource() method being called.
My question is how can I get client context information to the DynamicDSGenerator's getDataSource() call?
I need to be able to filter/adjust the fields created for a DataSource using by a set of context-value pairs and a company ID. I was hoping to be able to somehow inject this information in the DSRequest which is a parameter to getDataSource() but am not sure how to do that.
I only see the getDataSource() being called when i call DataSource.load(myPrefix_mySuffix) in the client, calls to DataSource.get(myPrefix_mySuffix) do not trigger the call to getDataSource() for me. Should it?
Be sure your post includes:
1.SmartClient Version: v8.3p_2013-02-08/PowerEdition Deployment (built 2013-02-08)
2. not browser specific
3. Not a failing request issue.
6. sample code if applicable
Posts with incomplete information are much more likely to be ignored.
I was able to get the addDynamicDSGenerator() to load/register a new DynamicDSGenerator successfully by extending the DataSourceLoader class and having it add/register the generator following the instantiation of DataSourceLoader (super()).
In my client I am calling DataSource.load("myPrefix_mySuffix") and I see the DynamicDSGenerators's getDataSource() method being called.
My question is how can I get client context information to the DynamicDSGenerator's getDataSource() call?
I need to be able to filter/adjust the fields created for a DataSource using by a set of context-value pairs and a company ID. I was hoping to be able to somehow inject this information in the DSRequest which is a parameter to getDataSource() but am not sure how to do that.
I only see the getDataSource() being called when i call DataSource.load(myPrefix_mySuffix) in the client, calls to DataSource.get(myPrefix_mySuffix) do not trigger the call to getDataSource() for me. Should it?
Be sure your post includes:
1.SmartClient Version: v8.3p_2013-02-08/PowerEdition Deployment (built 2013-02-08)
2. not browser specific
3. Not a failing request issue.
6. sample code if applicable
Posts with incomplete information are much more likely to be ignored.
Comment