Author: igorz
Date: 2007-12-27 08:39:56 -0500 (Thu, 27 Dec 2007)
New Revision: 91934

Added:
   trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/IExtendedViewHandler.cs
Modified:
   trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseFacesViewHandler.cs
   trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletFacesStateManager.cs
   trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.csproj
Log:
refactoring

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseFacesViewHandler.cs
===================================================================
--- trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseFacesViewHandler.cs   
2007-12-27 12:55:46 UTC (rev 91933)
+++ trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/BaseFacesViewHandler.cs   
2007-12-27 13:39:56 UTC (rev 91934)
@@ -12,7 +12,7 @@
 
 namespace Mainsoft.Web.Hosting
 {
-       public abstract class BaseFacesViewHandler : ViewHandler
+       public abstract class BaseFacesViewHandler : ViewHandler, 
IExtendedViewHandler
        {
                readonly ViewHandler _viewHandler;
                public static readonly string NAMESPACE = "__NAMESPACE";

Added: trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/IExtendedViewHandler.cs
===================================================================
--- trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/IExtendedViewHandler.cs   
2007-12-27 12:55:46 UTC (rev 91933)
+++ trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/IExtendedViewHandler.cs   
2007-12-27 13:39:56 UTC (rev 91934)
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using javax.faces.context;
+
+namespace Mainsoft.Web.Hosting
+{
+       public interface IExtendedViewHandler
+       {
+               string EncodeNamespace (FacesContext facesContext, string 
value);
+       }
+}

Modified: 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletFacesStateManager.cs
===================================================================
--- 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletFacesStateManager.cs   
    2007-12-27 12:55:46 UTC (rev 91933)
+++ 
trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.Hosting/ServletFacesStateManager.cs   
    2007-12-27 13:39:56 UTC (rev 91934)
@@ -33,7 +33,7 @@
                                }
                                else {
                                        HttpSession session = (HttpSession) 
facesContext.getExternalContext ().getSession (true);
-                                       string key = ((BaseFacesViewHandler) 
facesContext.getApplication ().getViewHandler ()).EncodeNamespace 
(facesContext, VIEWSTATE);
+                                       string key = ((IExtendedViewHandler) 
facesContext.getApplication ().getViewHandler ()).EncodeNamespace 
(facesContext, VIEWSTATE);
                                        session.setAttribute (key, 
serializedView);
                                }
                        }
@@ -58,7 +58,7 @@
                                if (session == null)
                                        serializedComponentStates = null;
                                else {
-                                       string key = ((BaseFacesViewHandler) 
facesContext.getApplication ().getViewHandler ()).EncodeNamespace 
(facesContext, VIEWSTATE);
+                                       string key = ((IExtendedViewHandler) 
facesContext.getApplication ().getViewHandler ()).EncodeNamespace 
(facesContext, VIEWSTATE);
                                        SerializedView serializedView = 
session.getAttribute (key) as SerializedView;
                                        if (serializedView == null)
                                                serializedComponentStates = 
null;

Modified: trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.csproj
===================================================================
--- trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.csproj       2007-12-27 
12:55:46 UTC (rev 91933)
+++ trunk/mcs/class/Mainsoft.Web/Mainsoft.Web.J2EE.csproj       2007-12-27 
13:39:56 UTC (rev 91934)
@@ -100,6 +100,7 @@
     <Compile Include="Mainsoft.Web.Hosting\AspNetFacesContext.cs" />
     <Compile Include="Mainsoft.Web.Hosting\BaseFacesStateManager.cs" />
     <Compile Include="Mainsoft.Web.Hosting\BaseFacesViewHandler.cs" />
+    <Compile Include="Mainsoft.Web.Hosting\IExtendedViewHandler.cs" />
     <Compile Include="Mainsoft.Web.Hosting\ServletFacesContext.cs" />
     <Compile Include="Mainsoft.Web.Hosting\ServletFacesStateManager.cs" />
     <Compile Include="Mainsoft.Web.Hosting\ServletFacesViewHandler.cs" />

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

Reply via email to