TARGET_J2EE:
authorIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Tue, 5 Feb 2008 12:50:22 +0000 (12:50 -0000)
committerIgor Zelmanovich <igorz@mono-cvs.ximian.com>
Tue, 5 Feb 2008 12:50:22 +0000 (12:50 -0000)
consider 'mainsoft.render.body.content.only'
init parameter.

svn path=/trunk/mcs/; revision=94876

mcs/class/System.Web/System.Web.UI/Page.cs
mcs/class/System.Web/System.Web.UI/Page.jvm.cs

index 2bbc92cf1cd5f8c89c6853722d4da394edcbf118..6396c2f1dd546cc5a4d63f4cdfb31995e9ea25a0 100644 (file)
@@ -1081,6 +1081,17 @@ public partial class Page : TemplateControl, IHttpHandler
                        
                        ClientScript.RegisterStartupScript (typeof (Page), "MaintainScrollPositionOnPostBackStartup", script.ToString());
                }
+#if TARGET_J2EE
+               if (bool.Parse (WebConfigurationManager.AppSettings [RenderBodyContentOnlyKey] ?? "false")) {
+                       for (Control c = this.Form; c != null; c = c.Parent) {
+                               HtmlGenericControl ch = (c as HtmlGenericControl);
+                               if (ch != null && ch.TagName == "body") {
+                                       ch.RenderChildren (writer);
+                                       return;
+                               }
+                       }
+               }
+#endif
                base.Render (writer);
        }
 #endif
index d1e9730a8f287c3aedd03216cb64432784b6026d..404a88f58a03be96f3b5614f776033171ad73097 100644 (file)
@@ -59,6 +59,7 @@ namespace System.Web.UI
                string _callbackEventError = String.Empty;\r
                static readonly object CrossPagePostBack = new object ();\r
                FacesContext _facesContext;\r
+               const string RenderBodyContentOnlyKey = "mainsoft.render.body.content.only";\r
 \r
                static readonly java.util.List emptyList = java.util.Collections.unmodifiableList (new java.util.ArrayList ());\r
 \r