/// <summary> /// Constructor /// </summary> /// <param name="authenticationContext"></param> /// <param name="applicationApi"></param> public SaaSFramePageLayout(IAuthenticationContext authenticationContext, IApplicationApi applicationApi) { this.authenticationContext = authenticationContext; this.applicationApi = applicationApi; ApplicationObject application = this.applicationApi.Get(authenticationContext.ApplicationId); string framePageLayout = application["FramePageLayout"] as string; if (string.Equals(framePageLayout, "LeftNavigation", StringComparison.OrdinalIgnoreCase)) this.compositeFramePageLayout = new LeftNavigationBarFramePageLayout(); else if (string.Equals(framePageLayout, "TopNavigation", StringComparison.OrdinalIgnoreCase)) this.compositeFramePageLayout = new TopNavigationMenuFramePageLayout(); else this.compositeFramePageLayout = new LeftNavigationBarFramePageLayout(); }
/// <summary> /// Raises the System.Web.UI.Control.Init event to initialize the page. /// </summary> /// <param name="e">An System.EventArgs that contains the event data.</param> protected override void OnInit(EventArgs e) { base.OnInit(e); this.framePageLayout = SpringContext.Current.GetObject<IFramePageLayout>(); this.EnableViewState = false; this.Initialize(); HtmlGenericControl htmlTag = new HtmlGenericControl("html"); htmlTag.Attributes["xmlns"] = "http://www.w3.org/1999/xhtml"; this.Controls.Add(htmlTag); this.CreateHtmlHead(htmlTag); this.CreateHtmlBody(htmlTag); }