Author: igorz
Date: 2008-02-05 07:50:22 -0500 (Tue, 05 Feb 2008)
New Revision: 94876

Modified:
   trunk/mcs/class/System.Web/System.Web.UI/Page.cs
   trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs
Log:
TARGET_J2EE:
consider 'mainsoft.render.body.content.only'
init parameter.

Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2008-02-05 12:38:15 UTC 
(rev 94875)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.cs    2008-02-05 12:50:22 UTC 
(rev 94876)
@@ -1081,6 +1081,17 @@
                        
                        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

Modified: trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs        2008-02-05 
12:38:15 UTC (rev 94875)
+++ trunk/mcs/class/System.Web/System.Web.UI/Page.jvm.cs        2008-02-05 
12:50:22 UTC (rev 94876)
@@ -59,6 +59,7 @@
                string _callbackEventError = String.Empty;
                static readonly object CrossPagePostBack = new object ();
                FacesContext _facesContext;
+               const string RenderBodyContentOnlyKey = 
"mainsoft.render.body.content.only";
 
                static readonly java.util.List emptyList = 
java.util.Collections.unmodifiableList (new java.util.ArrayList ());
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to