2/19/2025 6:59:05 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
|
|
|
|
Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 06 Dec 07 9:47 AM
|
I added an UpdatePanel to a custom smart part but I either get null reference errors, or the page still undergoes a full refresh. Would anybody have a working example of this by chance? I hate troubleshooting MS Ajax.
Thanks |
|
|
|
Re: Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 07 Dec 07 7:42 AM
|
Hey Nicolas,
I have not specifically used the Update Manager but have done WS calls. Is it possible that you are not binding to the ScriptManager that is part of the page and that may be why you are getting the null reference errors.
Mark |
|
|
|
Re: Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 07 Dec 07 3:59 PM
|
Well I found out the null references came because the AddEntityBinding event sometimes fire before the controls are initialized, when those controls are on an update panel. I may have to do the binding manually for those - no big deal (in the research process I documented the lifecycle for smartparts here if you are interested http://chivinou.blogspot.com/2007/12/slx-entityboundsmartpart-lifecycle.html). The darn thing still grays out and refreshes the whole page though... aaarg! I am desperate to find a way to make the UI more responsive - the 2+ seconds to react to clicks are killing me. |
|
|
|
Re: Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 08 Dec 07 8:36 AM
|
Very Cool, Really appreciate it.
Ya, timing is a harsh reality. Problem with the Update panel is that is still has to marshal the whole page contents back and forth. It does not actually get just the section, but the whole page and then does a replacement of the targeted area. Really if you want to get the fastest perf you would need to write scripts that returned only the section that was required and place it. Update panel is great from removing the flicker, not so great on the performance side as is still has to render the page fully on the server to ensure that all of the changes are contained within. The other problem at least with this incarnation is that I do not believe that UpdatePanel is history button aware. This will not be so until the next version of the ajax controls comes out, at least I believe this to be true.
Mark |
|
|
|
Re: Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 08 Dec 07 8:46 AM
|
Mark, you are right - I did find one way to skip the full dialog refresh by doing ((UpdatePanel)Page.Master.FindControl("DialogUpdatePanel")).ChildrenAsTriggers = false from the smart part, but it is still transferring close to 100K of view state so the performance gain, while noticeable, wasn't anything to jump about.
|
|
|
|
Re: Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 08 Dec 07 8:52 AM
|
I am looking forward to some of the downstream technologies becomming mainstream. I can see when Silverlight 2.0 comes out, I will be building embeddable widgets that will allow for a more rich user experience better responsiveness. Just bough 2 1.0 books, but they are not terribly great in their content.
I am still more of a fan of desktop development (just can do so much more) in .net then web, but the right tool for the right job is the right way to go. Probably why I am looking forward to 2.0 of silverlight. I am thinking something like a SilverLight mainview to handle something like chat, support, client portal with downloadable modules ... Who knows. With it being able to target windows on IE and Firefox and Mac .. Wait and see on moonlight it seems promising.
Mark |
|
|
| |
|
Re: Using Ajax in Custom Smartparts![Your last visit to this thread was on 1/1/1970 12:00:00 AM](/images/forumimages/new.gif)
Posted: 08 Dec 07 1:59 PM
|
Well I'm happy to report that all this research did lead to a positive result - I reduced the size of the downloads for async postbacks from 130k (wait, actually before I put the first panel it was over 200k!) down to 35k. Response time went from "Agonizingly slow" down to "Barely tolerable". It could be reduced much further with some fixes from Sage but until now I have had to implement those by hand-editing the IL code which is no fun so I stopped after I got the proof I was looking for. It won't ever beat hand-rolled javascript (or the rich client-side technologies like silverlight) but for a quickie it's hard to beat the convenience of tossing a few updatepanels here and there.
Anyway, I need to write this into a bug report, but in the meantime just in case you are interested: 1. All of the SLX controls (Lookup, Picklist, DatePicker) etc will resend a gigantic chunk of JavaScript on every asynchronous postback. There are 2 parts to this problem: a. The scripts should only be sent on async postbacks that are refreshing a panel on which there is one such control - this means calls like this: ScriptManager.RegisterClientScriptBlock(Page, ...) needs to be changed to this: ScriptManager.RegisterClientScriptBlock(this, ...) b. The scripts should be registered as included scripts so that they can be cached by the browser
2. The "DialogUpdatePanel" has ChildrenAsTriggers = true, this prevents the use of UpdatePanel within smartparts. This can be changed to false from within the smart part. I am not sure of the implication of changing it to false globally.
3. SLX is using the debug libraries of YUI... probably not a very big deal because these are downloaded only once then cached, but still.
Well, I've had my share of SLX for the w-e, I need to go put up my xmas lights. I just wanted to share the joy that we may not have to put up much longer with the dialup-like unresponsiveness of the web client. |
|
|
| |
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|