Author: kostat Date: 2007-12-31 11:16:03 -0500 (Mon, 31 Dec 2007) New Revision: 92064
Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs Log: formatting; use mainsoft.web.portal.multiform for isMultiForm decision Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs =================================================================== --- trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs 2007-12-31 14:46:06 UTC (rev 92063) +++ trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs 2007-12-31 16:16:03 UTC (rev 92064) @@ -1,36 +1,36 @@ -// -// System.Web.UI.Page.jvm.cs -// -// Authors: -// Eyal Alaluf ([EMAIL PROTECTED]) -// -// (C) 2006 Mainsoft Co. (http://www.mainsoft.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using javax.servlet.http; -using System.Collections.Specialized; -using System.Globalization; -using System.Web.Hosting; -using System.Web.J2EE; +// +// System.Web.UI.Page.jvm.cs +// +// Authors: +// Eyal Alaluf ([EMAIL PROTECTED]) +// +// (C) 2006 Mainsoft Co. (http://www.mainsoft.com) +// +// Permission is hereby granted, free of charge, to any person obtaining +// a copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +using javax.servlet.http; +using System.Collections.Specialized; +using System.Globalization; +using System.Web.Hosting; +using System.Web.J2EE; using System.ComponentModel; using System.IO; using javax.faces.context; @@ -42,12 +42,13 @@ using javax.faces.el; using javax.faces.component; using System.Threading; - -namespace System.Web.UI -{ - public partial class Page +using System.Web.Configuration; + +namespace System.Web.UI +{ + public partial class Page { - string _namespace = null; + string _namespace = null; StateManager.SerializedView _facesSerializedView; MethodBinding _action; MethodBinding _actionListener; @@ -60,9 +61,9 @@ static readonly object CrossPagePostBack = new object (); bool _isMultiForm = false; - bool _isMultiFormInited = false; - - internal string Namespace + bool _isMultiFormInited = false; + + internal string Namespace { get { if (_namespace == null) { @@ -75,27 +76,26 @@ } return _namespace; } - } - - internal string theForm { - get { - return "theForm" + Namespace; - } - } - - internal bool IsMultiForm { - get { - if (!_isMultiFormInited) { - Mainsoft.Web.Configuration.PagesSection pageSection = (Mainsoft.Web.Configuration.PagesSection) System.Web.Configuration.WebConfigurationManager.GetSection ("mainsoft.web/pages"); - if (pageSection != null) - _isMultiForm = pageSection.MultiForm; - - _isMultiFormInited = true; - } - return _isMultiForm; - } } + internal string theForm { + get { + return "theForm" + Namespace; + } + } + + internal bool IsMultiForm { + get { + if (!_isMultiFormInited) { + string isMultiForm = WebConfigurationManager.AppSettings ["mainsoft.web.portal.multiform"]; + _isMultiForm = isMultiForm != null ? Boolean.Parse(isMultiForm) : false; + + _isMultiFormInited = true; + } + return _isMultiForm; + } + } + void EnterThread (HttpContext context) { _jsfHandler = context.CurrentHandler; @@ -426,5 +426,5 @@ } } #endregion - } -} + } +} _______________________________________________ Mono-patches maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-patches
