protected void EnsureGroup(string groupName, string titleSeed, string pageType, bool isReadOnly) { if (groupName != String.Empty) { GroupElement groupElement = _rootElement.FindElement(groupName) as GroupElement; if (groupElement == null) { ElaboratedGroup group = _derivationInfo.ElaboratedExpression.Groups[groupName]; groupElement = new GroupElement(groupName); MetaData groupMetaData = new MetaData(group.Properties); groupElement.ElementType = DerivationUtility.GetTag(groupMetaData, "ElementType", pageType, "Group"); groupElement.EliminateGroup = Boolean.Parse(DerivationUtility.GetTag(groupMetaData, "EliminateGroup", pageType, "True")); CreateContainerElement(groupElement, _derivationInfo.ElaboratedExpression.Groups[groupName], titleSeed, pageType, isReadOnly); AddElement(groupElement, GetParentGroupName(groupName), titleSeed, pageType, isReadOnly); } } }
protected virtual ContainerElement CreateContainerElement(ContainerElement element, ElaboratedGroup group, string titleSeed, string pageType, bool isReadOnly) { MetaData metaData = new MetaData(group.Properties); PrepareElement(element, metaData, null, titleSeed, pageType, isReadOnly); element.Title = DerivationUtility.GetTag(metaData, "Title", pageType, group.UnqualifiedName); if (!Boolean.Parse(DerivationUtility.GetTag(metaData, "Visible", pageType, "True"))) { element.Properties.AddOrUpdate("Visible", "False"); } return(element); }