Closed djalfe closed 5 years ago
Is anybody alive on this Channel ... It would be nice with some kind of feedback. :-(
Below is a minimal working example, here the list of tree nodes come from an Inline C# Function (code below, registered as "Maw.GetSelectionTreeNode"). If you register your existing static function as a C# Function, you should have the same effect.
Widget markup:
<f:widgetfunction xmlns:f="http://www.composite.net/ns/function/1.0" name="Composite.Widgets.String.HierarchicalSelector">
<f:param name="TreeNodes">
<f:function name="Maw.GetSelectionTreeNode" />
</f:param>
</f:widgetfunction>
C# code:
using System.Collections.Generic;
using Composite.C1Console.Forms.CoreUiControls;
namespace Maw
{
public static class InlineMethodFunction
{
public static IEnumerable<SelectionTreeNode> GetSelectionTreeNode()
{
var child = new SelectionTreeNode
{
Label = "Child",
Key = "childKey",
Selectable = true,
Children = null
};
var root = new SelectionTreeNode
{
Label = "Root",
Key = "rootKey",
Selectable = true,
Children = new List<SelectionTreeNode>{ child }
};
return new List<SelectionTreeNode> { root };
}
}
}
I wan't to use the HierarchicalSelector as widget for one of my functions and i've configured it so the list of TreeNodes comes from a StaticMethodCal.
When invoking my function i alway get the error
System.NotImplementedException: The method or operation is not implemented.
and the stacktrace is as followsThis is my WidgetMarkup which i apply to a function parameter