internal void AttachAndBuildJewelFromData(object jewelData) { if (!_hasJewel) { return; } _elmJewelPlaceholder.Style.Display = "block"; JewelBuildContext jbc = new JewelBuildContext(); jbc.JewelId = DataNodeWrapper.GetAttribute(jewelData, "Id"); // Build Jewel JewelBuildOptions options = new JewelBuildOptions(); options.TrimmedIds = _builder.Options.TrimmedIds; JewelBuilder builder = new JewelBuilder(options, _elmJewelPlaceholder, _builder.BuildClient); builder.BuildJewelFromData(jewelData, jbc); this.Jewel = builder.Jewel; }
internal void BuildAndSetJewel(string jewelId, bool attachToDOM, DataSource ds) { _elmJewelPlaceholder.Style.Display = "block"; // Build Jewel JewelBuildOptions options = new JewelBuildOptions(); options.AttachToDOM = attachToDOM; options.TrimmedIds = RibbonBuilder.Options.TrimmedIds; JewelBuilder builder = new JewelBuilder(options, _elmJewelPlaceholder, RibbonBuilder.BuildClient); builder.DataSource = ds; if (!builder.BuildJewel(jewelId)) throw new InvalidOperationException("Jewel could not be built"); Jewel = builder.Jewel; }