I followed the following tutorial : http://www.sdltridionworld.com/community/2011_extensions/itemselector.aspx to create a tree based on the one on administration panel with the structure groups, sites, pages, components, etc.
I can create the root with the websites but when I try to access to Building Blocks, Sites or Categories and Keywords I find an error, here is the code related:
case ItemType.StructureGroup:
using (var client = new TridionClient())
{
var items = client.Client.GetList(uri.ToString(),new OrganizationalItemItemsFilterData(){Recursive = false});
toReturn.AddRange(ConvertToListTreeNode(items));
}
break;
and the exception:
System.ServiceModel.FaultException'1 {"Unexpected list type: Tridion.ContentManager.Data.ContentManagement.OrganizationalItemItemsFilterData."}
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Tridion.ContentManager.CoreService.Client.ICoreService.GetList(String id, SubjectRelatedListFilterData filter)
at AdminPanel.TreeHelper.PopulateNode(String uri) in \\*\Visual Studio 2010\Projects\AdminPanel\AdminPanel\TreeHelper.cs:line 241
at AdminPanel.Controllers.HomeController.Node(String url) in \\*\Visual Studio 2010\Projects\AdminPanel\AdminPanel\Controllers\HomeController.cs:line 21
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
Any suggestion is welcome,
Thanks in advance.
GetList
with?