Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Loading a DataSource for component XML

    I have a number (about 70) of custom DataSources that we reference from screens declared in component XML.

    The pattern I've been using for many years is:
    Code:
    <DataSource>
        <loadID>MyDataSource</loadID>
    </DataSource>
    
    <ListGrid dataSource="MyDataSource" ...
    This is causing the ScreenLoader servlet to generate a warning:
    Code:
    Attempting to set default i18n resource bundle name, encountered an unexpected context fieldName property: DataSource
    although the ListGrid works without any problem.

    Searching the documentation, I can't find any mention of a "loadID" attribute for DataSource.

    I can make the warnings go away if I remove the DataSource declarations from the component XML and load them from JavaScript via "DataSource.load()", but then I have to load a list of 70 DataSources.

    Can you please advise me of the correct way to load my DataSources? Or is there something else I should be doing to avoid these warnings?


    Andrew

    #2
    The warning message is wrong, because it doesn't properly take account of the loadID property. What you are doing is correct. We have fixed the warning message in the current release (12.0); for this use case, which is valid and correct, please just ignore that message in older versions of SmartClient.

    Comment

    Working...
    X