I noticed that Microsoft disabled most of my links to Atlas documentation, in particular the excellent Client Class Library Browser athttp://atlas.asp.net/docs/Client/Browser/jsBrowser.aspx that was invaluable to me in figuring out all the undocumented bits in the CTP release. So I figured I would bite the bullet and upgrade to my web app to the AJAX 1 beta... based on the 'Migration Guide' document it looked pretty painless.
Big, big mistake. It appears that the syntax of virtually every client-side AJAX call I was making has changed radically, and I can't find adequate documentation on the new syntax. I've read the white paper entitled "Changes between the ASP.NET AJAX CTP and the V1.0 Beta/RTM Release" and did not get much help from it. The excellent set of online examples for the CTP do not seem to be present for the Beta version, so I'm fishing around for help to get my app working again.
But enough whining. I'll start with my first issue and maybe I'll stumble into a epiphany moment at some point.
In my CTP app, I instantiated a AJAX 'Select' control and tied it to its associated HTML element by doing this:
uiCompanySelect =new Sys.UI.Select($get('SelectCompany')); uiCompanySelect.initialize(); uiCompanySelect.set_textProperty('Name'); uiCompanySelect.set_valueProperty('ID'); uiCompanySelect.selectionChanged.add(OnSelectCompany);
Based on my reading of the white paper, I'm guessing that the equivalent code in the Beta release would look like this:
$create(Sys.UI.Select, {}, {'selectionChanged':'OnSelectCompany'}, {}, $get('SelectCompany')); $get('SelectCompany').control.set_textProperty('Name'); $get('SelectCompany').control.set_valueProperty('ID');
But apparently I would be wrong... The first line ($create...) fails with "Sys.ArgumentUndefinedException. Value cannot be undefined. Parameter name:Type". Possibly it is complaining about one of the sets of empty braces in this statement... but I can't find any documentation for the '$create' command, or the Select control (assuming it still exists), or an example using the Select control, or the client class browser (which I really miss!).
Can anyone point out the error in my code, and/or point me towards any online reference for these things so I can figure them out?
Much thanks to any who respond!
John Bendiksen
JohnBen:
I noticed that Microsoft disabled most of my links to Atlas documentation, in particular the excellent Client Class Library Browser athttp://atlas.asp.net/docs/Client/Browser/jsBrowser.aspx that was invaluable to me in figuring out all the undocumented bits in the CTP release. So I figured I would bite the bullet and upgrade to my web app to the AJAX 1 beta... based on the 'Migration Guide' document it looked pretty painless.
Big, big mistake. It appears that the syntax of virtually every client-side AJAX call I was making has changed radically, and I can't find adequate documentation on the new syntax. I've read the white paper entitled "Changes between the ASP.NET AJAX CTP and the V1.0 Beta/RTM Release" and did not get much help from it. The excellent set of online examples for the CTP do not seem to be present for the Beta version, so I'm fishing around for help to get my app working again.
Totally agreed. I was spened many hours on reading and debuging Client FX, googling and talking with MVPs, to port old projects on "new" library.
Not so long away i found very funny phrase in download section:
While prompt migration to an ASP.NET AJAX Beta or later release is highly encouraged, this installer is provided for projects that cannot bemigrated immediately and that still require access to ASP.NET AJAX technology in its pre-Beta form.
JohnBen:
But enough whining. I'll start with my first issue and maybe I'll stumble into a epiphany moment at some point.
In my CTP app, I instantiated a AJAX 'Select' control and tied it to its associated HTML element by doing this:
uiCompanySelect =new Sys.UI.Select($get('SelectCompany')); uiCompanySelect.initialize(); uiCompanySelect.set_textProperty('Name'); uiCompanySelect.set_valueProperty('ID'); uiCompanySelect.selectionChanged.add(OnSelectCompany);
Based on my reading of the white paper, I'm guessing that the equivalent code in the Beta release would look like this:
$create(Sys.UI.Select, {}, {'selectionChanged':'OnSelectCompany'}, {}, $get('SelectCompany')); $get('SelectCompany').control.set_textProperty('Name'); $get('SelectCompany').control.set_valueProperty('ID');
First of all you need replace references on Sys.UI toSys.Preview.UI, then you shoud use Selector (new name of Select wrapper), so client wrapper shoud look like this:
uiCompanySelect = new
Sys.Preview.UI.Selector($get('SelectCompany'));and now you dont need to initialize component i think.
And one more thing:
eventhandler now binds byadd_selectionChanged methodm but not by selectionChanged.add
No comments:
Post a Comment