Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Monday, March 26, 2012

Access SiteMap via Web Service

This is not strictly an Atlas question, but it seems that someone here is most likely to be able to help.

To build an Atlas enabled menu control, I'd like to be able to get access to my sites SiteMap data via a web service. And ideally, I'd like to be able to access data from custom SiteMapProviders in this way.

Is this possible?

Thanks

Ok, so I don't know what I was doing wrong, but I was under the impression that I couldn't get to the SiteMap from the context of a web service. I was wrong.Smile

Saturday, March 24, 2012

ABCs of compiling the AtlasControlToolkit source

Hello,

I was able to successfully change a few small items in the July CTP, build and use the binaries in a web solution. Very nice!

But the latest Sept. AtlasToolKit has me stumped. First of all, there is one less DLL (microsoft.AtlasControlExtender.dll) after I build and I wonder how this effects my old code. Also, when I remove the reference to the old DLL in VS an unknown process retains a lock on some files from the old referenced Atlas.

After I build the AtlastToolKit solution and add a reference to the TWO generated DLL's in VS everything looks fine within VS, no errors or missing references there. But when I run the code the Atlas portion simply does not work giving a simple JavaScript error "object does not exist"

So, my question is: Is there an FAQ or basic run down of how to transition from one version of Atlas to another...especially if we have modified some of the older versions scripts and code?

Hi,

all the code in Microsoft.AtlasControlExtender was moved into the AtlasControlToolkit namespace (this means that the source is now public), thus a required step is to replace all the references to Microsoft.AtlasControlExtender into references to AtlasControlToolkit. This has to be applied also in the JavaScript behaviors (look at the registerClass() function at the end of the file) that must inherit from AtlasControlToolkit.BehaviorBase.


Great, that helps a bunch.

Another question then, if I wanted to compile the source and NOT have the JS files as an embedded resource but instead use something like the SCRIPTPATH= , how do I build the AtlasControlToolkit? Ideally, this would also allow me to have a directory of JS files to debug against as well.

thanks!


Hi,

I don't know if it is possible to compile the Control Toolkit to reference external files. What you can do is reference an external JavaScript file when declaring an extender, via the ScriptPath property of the extender control.

A widget framework

I am currently embarking on a project to deliver content via a mini portal for students at a community college.

What I would like to do is build a framework which works the same way as iGoogle, PageFlakes, Live.com or any other site which allows you to mash up your own start page.

Are there any frameworks or projects underdevelopment which will demonstrate the patterns involved in creating "Widgets" that you can include on a page just by adding a <script src="http://pics.10026.com/?src=APPLICATIONSRC"></script>

I have a couple working models where I use the external script to write innerHTML to a div where the script tag is included, but there is much more work to do and I was wondering if anyone has any ideas on the best / most resuable way to accomplish this.

For all backend data we will be using standard web services decorated with the [ScriptMethod] and [ScriptService] attributes.

Here is the code i've got working so far:

 initWidgetContainer(); initWidget(); function initWidgetContainer() { var wc = $get("WidgetContainer_1");if (wc ==null) { document.write("<div id='WidgetContainer_1' class='widgetcontainer'>Add widgets here</div>"); } } function initWidget() { SunGard.Public.Services.ERP.InitWidget(initComplete); } function initComplete(result) { Render(result); } function LoadData(widgetObj) { SunGard.Public.Services.ERP.LoadProfile(widgetObj,"lucasstark", Render); } function Render(result) {//Write the contanier to push the data into. var wc = $get("WidgetContainer_1"); wc.innerHTML = wc.innerHTML + result.WidgetContainer;//Now that we have our container set up for us, lets write some content into it; $get(result.WidgetID).innerHTML = result.WidgetContent; }
 
//Here is the asmx service
//Partial listing:
 
 [WebMethod]public Widget InitWidget() { Widget w =new Widget(); w.WidgetID = Guid.NewGuid().ToString(); w.LoadWidgetData();return w; }

// and finally partial of the widget

/// <summary>/// Summary description for Widget/// </summary>public class Widget{private string _widgetID;private string _widgetContent;public string WidgetID {get {return _widgetID; }set { _widgetID =value; } }public string WidgetContent {get {return _widgetContent; }set { _widgetContent =value; } }public string WidgetContainer {get {return"<div id = '" + WidgetID +"' class=\"widgetdata\"></div>"; } }public Widget(){ }private void SetOutput(string innerData) {this._widgetContent = innerData; }public void LoadWidgetData() {#region Datastring data = @." <h2>Lucas Stark</h2> <table> <tr> <td> Full Name: </td> <td> Lucas Stark </td> <td> </td> </tr> <tr> <td> Email Address: </td> <td> <a href='mailto:lucasstark@.delta.edu'>lucassatrk@.delta.edu</a> </td> <td> </td> </tr> <tr> <td> Phone Number: </td> <td> 9541 </td> <td> </td> </tr> </table>";#endregion SetOutput(data); }


Checkout this articlehttp://www.codeproject.com/Ajax/MakingGoogleIG.asp


Thanks for the link.

I've played around with and reviewed the code for that applicaiton before, but it seems WAY overly complex. I thought there used to be a slimmed down version of that which wasn't using DLINQ or workflow to acomplish the same things, but I can't seem to locate it..

Wednesday, March 21, 2012

A good performance Treeview using ajax

I have a requirement of a tree view with a very performance.i decided to build it with ajax so

What approach is better ie use a .net treeview control in updatepanel

OR


make a ajax call on clicking on each node

i know the 2nd oneis good but i need some more facts like if i used ist one and when anode clicked event is generated then whole tree view is posted but insecond one there is on demand loading

please send some more views

thanks

I have had some trouble with the treeview holding state inside an update panel, so if you can impliment it using ajax calls would be my recommendation.

-Alan