Hi Armando,
Since the Onload Event of the Application is returning the Default Value (Not the DS value).
Iv'e made local onload script event for the component which will load when the application is loaded.So you can write all the script function in the onload Script function.
However this is not a solution but this be a workaround.
Thanks,
Naveen