+1
Є відповідь
Assigning a source to a datasource
If I assign a source to a datasource when I define the datasource, it works. If I leave out the source and assign it in an action, it doesn't seem to work. Is there a standard method of loading datasources?
This works:
This doesn't:
This works:
<datasources>
<datasource name="RSSFeed" source="http://defensesystems.com/rss-feeds/all.aspx" query="//item" providertype="xml" parsenamespaces="yes" />
</datasources>
<action name="boot" oninit="yes">
<alert message="[datasource:RSSFeed.dataSourceResultCount]"></alert>
</action>
This doesn't:
<datasources>
<datasource name="RSSFeed" source="" query="//item" providertype="xml" parsenamespaces="yes" />
</datasources>
<action name="boot" oninit="yes">
<assign property="datasource:RSSFeed.source" value="http://defensesystems.com/rss-feeds/all.aspx" />
<alert message="[datasource:RSSFeed.dataSourceResultCount]"></alert>
</action>
Служба підтримки клієнтів працює на UserEcho
If you want to keep it like this, try putting the assign and alert in a sync block, so they will run in order.