<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="http://www.codeplex.com/rss.xsl"?><rss version="2.0"><channel><title>MForm webcontrols</title><link>http://mform.codeplex.com/project/feeds/rss</link><description>MForm is a set of webcontrols that can be used to create, modify and view typed Xml data.       Mform allows generating fully functional web forms from Xml Schema, WSDL or objects in a matter of seconds with the use of a designer, preserving both the structure and data restrictions</description><item><title>Source code checked in, #65704</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/65704</link><description>- fixed compare constraint when there is no value to compare&amp;#13;&amp;#10;- added compare constraint refresh after item to compare changes value&amp;#13;&amp;#10;- updated to the new version of BM.Tools.Xml.Schema&amp;#13;&amp;#10;- added IsDesignerGeneration property which allows differentiation between generation in designer mode and runtime form generation using the generator&amp;#13;&amp;#10;- added support for xml attributes with non-default namespace&amp;#13;&amp;#10;- added IsNullable property to Leaf. Leafs with the property IsNullable will generate an xml element with xsi&amp;#58;nil&amp;#61;&amp;#34;true&amp;#34; in xml output, when the leaf item has no value. Otherwise the xml element is not created at all.&amp;#13;&amp;#10;- controls highest indexes collection moved to root control&amp;#13;&amp;#10;- added ValueHandlerFooterTemplate property to allow defining template code after the value handler&amp;#13;&amp;#10;- added getCorrespondingKey method to BM.KeyRef js class&amp;#13;&amp;#10;- HorizontalTableDisplayModifier now needs Name property to be set&amp;#13;&amp;#10;- added raiseFocused on LeafItem focus function&amp;#13;&amp;#10;- default value will now be set not depending on the IsPostBack property&amp;#13;&amp;#10;- added OnClientTabCreated client side event handler&amp;#13;&amp;#10;- csproj updated to Visual Studio 2010</description><author>michalwozniak</author><pubDate>Tue, 26 Apr 2011 12:43:09 GMT</pubDate><guid isPermaLink="false">Source code checked in, #65704 20110426124309P</guid></item><item><title>Source code checked in, #65703</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/65703</link><description>- modified TraverseBaseType method to use XmlTypeCode enumeration</description><author>michalwozniak</author><pubDate>Tue, 26 Apr 2011 12:02:10 GMT</pubDate><guid isPermaLink="false">Source code checked in, #65703 20110426120210P</guid></item><item><title>Source code checked in, #61504</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/61504</link><description>- updated examples after bulk change in BM.Tools.WebControls.MForm</description><author>michalwozniak</author><pubDate>Wed, 26 Jan 2011 09:58:35 GMT</pubDate><guid isPermaLink="false">Source code checked in, #61504 20110126095835A</guid></item><item><title>Source code checked in, #61503</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/61503</link><description>Bulk changes&amp;#58;&amp;#13;&amp;#10;&amp;#13;&amp;#10;- added ShouldLoadJQuery property to Root control that decides whether the jQuery resource will be added automatically or if the user intends to add it manually&amp;#13;&amp;#10;- added ShouldAutomaticallyAddDataTypeConstraints property to Root control &amp;#40;by default set to true&amp;#41; that is responsible for automatic adding of the DataTypeConstraint to leafs&amp;#13;&amp;#10;- updated internal jquery version to 1.4.2&amp;#13;&amp;#10;- changed internal css classes of MForm html elements, that they not interfere with different controls&amp;#58; .In -&amp;#62; .MForm-In, .Lb -&amp;#62; .MForm-Lb, .El -&amp;#62; .MForm-El, .Rq -&amp;#62; .MForm-Rq, .Op -&amp;#62; .MForm-Op, etc.&amp;#13;&amp;#10;- added a possibility to define UriMappings at the level of every offspring, not only root. &amp;#13;&amp;#10;- added DescriptionInfo addition control so that additional textual information could be added to items&amp;#13;&amp;#10;- added a possibility to add object or enumerable of objects as a root data source. Now the Root.DataSource can be an object which will be automatically converted to xml&amp;#13;&amp;#10;- performance improvements on both client and server side&amp;#13;&amp;#10;&amp;#13;&amp;#10;- other improvements, fixes and better error handling&amp;#13;&amp;#10;</description><author>michalwozniak</author><pubDate>Wed, 26 Jan 2011 09:37:56 GMT</pubDate><guid isPermaLink="false">Source code checked in, #61503 20110126093756A</guid></item><item><title>New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=243237</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I have several questions to you, that will let me better understand the problem that you are facing:&lt;/p&gt;
&lt;p&gt;1) Which MForm version are you using? Is it the version taken from the downloads (the public beta 1 version) or did you download the latest source code version?&lt;/p&gt;
&lt;p&gt;2) Does your problem vanish when using standard inproc session?&lt;/p&gt;
&lt;p&gt;If you use the beta version and the problem does not exist when using InProc, then I suppose the problem is with the piece of code that I removed in revision 40533 -&amp;nbsp;http://mform.codeplex.com/SourceControl/changeset/changes/40533&lt;/p&gt;
&lt;p&gt;There was a pretty ugly piece of code that kept xml nodes not read into the form in the session so that after the postback they could be added back to the output from the form. The merged xml was then available using the OutputXmlWithLeftNodes property.
 This code however was not very safe and relied on using the session, thus it was removed.&lt;/p&gt;
&lt;p&gt;To fix your problem, you can download the last version of MForm source at https://mform.svn.codeplex.com/svn/trunk/Solutions/MForm . You can do it for example by using TortoiseSvn.&lt;/p&gt;
&lt;p&gt;I also have to admit that for quite a long time I did not commit any changes to the project, even though many critical improvements were added to and around the library. I did not have enough time to synchronize the public version with the version we use
 at work, but if you are interested, I believe I could find some time and update the sources at codeplex and also explain the changes.&lt;/p&gt;
&lt;/div&gt;</description><author>michalwozniak</author><pubDate>Tue, 25 Jan 2011 19:11:31 GMT</pubDate><guid isPermaLink="false">New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode 20110125071131P</guid></item><item><title>New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=243237</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;I have several questions to you, that will let me better understand the problem that you are facing:&lt;/p&gt;
&lt;p&gt;1) Which MForm version are you using? Is it the version taken from the downloads (the public beta 1 version) or did you download the latest source code version?&lt;/p&gt;
&lt;p&gt;2) Does your problem vanish when using standard inproc session?&lt;/p&gt;
&lt;p&gt;If you use the beta version and the problem does not exist when using InProc, then I suppose the problem is with the piece of code that I removed in revision 40533 -&amp;nbsp;http://mform.codeplex.com/SourceControl/changeset/changes/40533&lt;/p&gt;
&lt;p&gt;There was a pretty ugly piece of code that kept xml nodes not read into the form in the session so that after the postback they could be added back to the output from the form. The merged xml was then available using the OutputXmlWithLeftNodes property.
 This code however was not very safe and relied on using the session, thus it was removed.&lt;/p&gt;
&lt;p&gt;To fix your problem, you can download the last version of MForm source at https://mform.svn.codeplex.com/svn/trunk/Solutions/MForm . You can do it for example by using TortoiseSvn.&lt;/p&gt;
&lt;p&gt;I also have to admit that for quite a long time I did not commit any changes to the project, even though many critical improvements were added to and around the library. I did not have enough time to synchronize the public version with the version we use
 at work, but if you are interested, I believe I could find some time and update the sources at codeplex and also explain the changes.&lt;/p&gt;
&lt;/div&gt;</description><author>michalwozniak</author><pubDate>Tue, 25 Jan 2011 19:11:31 GMT</pubDate><guid isPermaLink="false">New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode 20110125071131P</guid></item><item><title>New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=243237</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;This&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;is&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;a great&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;contribution,&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;thank
 you very much&lt;/span&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;In an application with SQLServer Session,&amp;nbsp;I get error when provide mForm input&amp;nbsp;, the error is as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization
 is done by the custom session state store in 'Custom' mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;How can fix it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>pegg23</author><pubDate>Tue, 25 Jan 2011 17:27:38 GMT</pubDate><guid isPermaLink="false">New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode 20110125052738P</guid></item><item><title>New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=243237</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;This&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;is&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;a great&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;contribution,&lt;/span&gt;&amp;nbsp;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;thank
 you very much&lt;/span&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;In an application with SQLServer Session,&amp;nbsp;I get error when provide mForm input&amp;nbsp;, the error is as follows:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization
 is done by the custom session state store in 'Custom' mode.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;How can fix it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span title="Haz clic para obtener traducciones alternativas"&gt;Regards&lt;/span&gt;&lt;/p&gt;
&lt;/div&gt;</description><author>pegg23</author><pubDate>Tue, 25 Jan 2011 17:27:38 GMT</pubDate><guid isPermaLink="false">New Post: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode 20110125052738P</guid></item><item><title>Source code checked in, #49966</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/49966</link><description>Checked in by server upgrade</description><author>_TFSSERVICE</author><pubDate>Mon, 19 Jul 2010 20:19:27 GMT</pubDate><guid isPermaLink="false">Source code checked in, #49966 20100719081927P</guid></item><item><title>New Post: How to design MForm at run time?</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=218728</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;thank you for your response.&lt;br&gt;what i want is to generate MForm at runtime from a specific xml schema,&lt;br&gt;Could you give me a demo?&lt;/p&gt;
&lt;p&gt;thanks.&lt;/p&gt;&lt;/div&gt;</description><author>jack_fred</author><pubDate>Fri, 09 Jul 2010 01:29:57 GMT</pubDate><guid isPermaLink="false">New Post: How to design MForm at run time? 20100709012957A</guid></item><item><title>New Post: How to design MForm at run time?</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=218728</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;
MForm heavily uses the concept of ASP.NET templates. If you want to create an MForm at run time, you have to create the Root control and create a class that implements the ITemplate interface and than assign an instance of this class to root's content property. You could for example create such templates:
&lt;/p&gt;
&lt;p&gt;
&lt;pre&gt;
public class BranchTemplate : ITemplate 
{
   public string Name { get; set: }
   public ITemplate Contents { get; set: }

   public void InstantiateIn(Control control)
   {
      control.Controls.Add(new Branch{Name = Name, Contents = Contents});
   }
}

public class LeafTemplate : ITemplate 
{
   public string Name { get; set: }

   public void InstantiateIn(Control control)
   {
      control.Controls.Add(new Leaf{Name = Name});
   }
}

public class MergedTemplate : ITemplate
{        
   public IEnumerable&amp;lt;ITemplate&amp;gt; Templates { get; set;}

   public void InstantiateIn(Control container)
   {
      foreach (var template in Templates.Where(template =&amp;gt; template != null))
      {
         template.InstantiateIn(container);
      }
   }
}
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;

and then use these templates like this:
&lt;/p&gt;

&lt;p&gt;
&lt;pre&gt;
var root = new Root();
root.Contents = 
new BranchTemplate
   {
       Name = &amp;quot;Test&amp;quot;
       Contents = new MergedTemplate{
          Templates = new ITemplate[] 
          {
             new BranchTemplate
                {
                   Name = &amp;quot;Inner&amp;quot;
                },
              new LeafTemplate
                {
                   Name = &amp;quot;Leaf&amp;quot;
                }
          }
   }
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
(there might be some mistakes as I am writing everything from the top of my head)
&lt;/p&gt;
&lt;p&gt;
Now if you want to generate MForm at runtime from a specific xml schema, you might look into the BM.Tools.WebControls.MForm.Design and BM.Tools.WebControls.MForm.Generator namespaces. You might look especially into the GeneratorForm.cs class and try to understand the GetFormItem method (the output of this method is used by the method GetGeneratedData which further is used by the RootActionList class in the GenerateRootContentsAndUriMappings method). Here is a simplified excerpt from those classes:
&lt;/p&gt;

&lt;p&gt;
&lt;pre&gt;
// assume that we have an XmlSchemaSet &amp;quot;set&amp;quot; and the global element from this set has XmlQualifiedName &amp;quot;elementName&amp;quot;
var formBuilder = new FormBuilder(set);
// you might set some formBuilder seetings by specifying formBuilder.Settings
var element = (XmlSchemaElement)set.GlobalElements[elementName];

var rootItem = formBuilder.TraverseElement(element) as FormItem;
var root = new Root();
root.Contents = new ItemTemplate(rootItem);
root.Manager = rootItem.Builder.Manager;
&lt;/pre&gt;
&lt;/p&gt;
&lt;p&gt;
What is happening in here is that the xml schema is read using the FormBuilder class. The FormBuilder class inherits from the SchemaTraverser class which is a class that uses the visitor pattern on the Xml schema objects. The output of schema traversing is a FormItem object which essentially is an object that facilitates reading xml schema data (e.g. it is easy in the FormItem object to find what xml schema element children are in the xml schema element that the FormItem is bound to).
&lt;/p&gt;
&lt;p&gt;
Another useful feature of the FormItem object is the possibility to enable / disable a piece of the xml schema tree. Each of the FormItem objects has a &amp;quot;Enabled&amp;quot; property. If this property is set to false, the given FormItem is not rendered.
&lt;/p&gt;
&lt;p&gt;
Finally the FormItem object is consumed by the ItemTemplate template class, which reads data from the FormItem object and creates appropriate data in the template. You can think of the ItemTemplate class as something a little bit more complicated than the BranchTemplate / LeafTemplate classes that I have written in the beginning. 
&lt;/p&gt;
&lt;p&gt;
What is important is that:
&lt;ul&gt;
&lt;li&gt;
You are not forced to use the FormBuilder / ItemTemplate combo, although it will give you the same effect as generating forms in design time;
&lt;/li&gt;
&lt;li&gt;
When creating your own templates, you are not limited to MForm controls. You can for example create a System.Web.UI.WebControls.Table control and than inside place a branch, leaf or choice MForm controls;
&lt;/li&gt;
&lt;li&gt;
If you need MForm generated at runtime only for automatic webservice tests or something like that, then it is a good idea to do it (in fact in our company we use it as a simple web service web page entrypoint). But if you want to generate the forms at run time for well defined pages, because you want to save a little time on using the designer, then this might not be the best idea. First, when you generate the form at design time you are free to modify it later, specify display names, set css classes, move items, add constraints, set javascript events and so much more, but to have the same effect when generating at runtime, you will have to make tour template class complicated and bloated, adding another hack to meet the requirement. Second, reading the xml schema every time you want to generate the form, then visiting the xml schema using the FormBuilder and finally creating the template from the FormItem is quite a time consuming process. Of course you could do some caching but I am sure that eventually you will have more coding than using the design time approach in the first place. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;
&lt;p&gt;
If you have any more questions, please do not hesitate and drop me a line
&lt;/p&gt;
Kind regards,
Michal
&lt;/div&gt;</description><author>michalwozniak</author><pubDate>Thu, 08 Jul 2010 19:59:11 GMT</pubDate><guid isPermaLink="false">New Post: How to design MForm at run time? 20100708075911P</guid></item><item><title>New Post: How to design MForm at run time?</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=218728</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;How to design MForm control at run time?&lt;/p&gt;&lt;/div&gt;</description><author>jack_fred</author><pubDate>Thu, 08 Jul 2010 07:46:39 GMT</pubDate><guid isPermaLink="false">New Post: How to design MForm at run time? 20100708074639A</guid></item><item><title>Source code checked in, #43834</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/43834</link><description>- added RootValidator control to all the pages where previously RootValidator was created inside the Root control&amp;#13;&amp;#10;- fixes in the tests for IE browsers</description><author>michalwozniak</author><pubDate>Thu, 06 May 2010 11:48:51 GMT</pubDate><guid isPermaLink="false">Source code checked in, #43834 20100506114851A</guid></item><item><title>Source code checked in, #43830</title><link>http://mform.codeplex.com/SourceControl/changeset/changes/43830</link><description>- added client-side event handlers&amp;#58; OnClientLoadComplete, OnClientItemCreated, OnClientItemRemoved&amp;#13;&amp;#10;- the RootValidator is now a standalone validator control that needs to be defined separately from the Root control &amp;#40;they are bound using the ControlToValidate property&amp;#41;&amp;#13;&amp;#10;- added ViewModeControlValue property in ControlValueHandler class&amp;#58; this property allows modifying the view mode control value before displaying</description><author>michalwozniak</author><pubDate>Thu, 06 May 2010 11:40:33 GMT</pubDate><guid isPermaLink="false">Source code checked in, #43830 20100506114033A</guid></item><item><title>Source code checked in, #41316</title><link>http://mform.codeplex.com/SourceControl/changeset/view/41316</link><description>- fixed restriction constraint for total digits and fraction digits restriction type&amp;#13;&amp;#10;- fixed errors visibility of RootValidator &amp;#13;&amp;#10;</description><author>michalwozniak</author><pubDate>Wed, 31 Mar 2010 12:31:03 GMT</pubDate><guid isPermaLink="false">Source code checked in, #41316 20100331123103P</guid></item><item><title>Source code checked in, #41276</title><link>http://mform.codeplex.com/SourceControl/changeset/view/41276</link><description>- fixed problems with validating decimal values in non-english culture environment&amp;#13;&amp;#10;- fixed server side validation of invisible items or items in view mode</description><author>michalwozniak</author><pubDate>Tue, 30 Mar 2010 08:30:32 GMT</pubDate><guid isPermaLink="false">Source code checked in, #41276 20100330083032A</guid></item><item><title>New Post: Missing source code</title><link>http://mform.codeplex.com/Thread/View.aspx?ThreadId=79781</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;I finally found some time to clean up the code of the BM.Tools.Xml.Schema library and it is now available at https://mform.svn.codeplex.com/svn/trunk/Projects/BM.Tools.Xml.Schema&lt;/p&gt;
&lt;p&gt;The trunk version of MForm now uses this library.&lt;/p&gt;
&lt;p&gt;I hope the library will serve you well.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal Wozniak&lt;/p&gt;&lt;/div&gt;</description><author>michalwozniak</author><pubDate>Mon, 29 Mar 2010 10:30:20 GMT</pubDate><guid isPermaLink="false">New Post: Missing source code 20100329103020A</guid></item><item><title>Source code checked in, #41153</title><link>http://mform.codeplex.com/SourceControl/changeset/view/41153</link><description>- updated MForm project to use the fresh version of the BM.Tools.Xml.Schema project</description><author>michalwozniak</author><pubDate>Fri, 26 Mar 2010 13:54:16 GMT</pubDate><guid isPermaLink="false">Source code checked in, #41153 20100326015416P</guid></item><item><title>Source code checked in, #41149</title><link>http://mform.codeplex.com/SourceControl/changeset/view/41149</link><description>- initial version of the refactored version of the BM.Tools.Xml.Schema project</description><author>michalwozniak</author><pubDate>Fri, 26 Mar 2010 11:56:18 GMT</pubDate><guid isPermaLink="false">Source code checked in, #41149 20100326115618A</guid></item><item><title>Source code checked in, #41148</title><link>http://mform.codeplex.com/SourceControl/changeset/view/41148</link><description>-created folder for the refactored version of the BM.Tools.Xml.Schema project</description><author>michalwozniak</author><pubDate>Fri, 26 Mar 2010 11:38:33 GMT</pubDate><guid isPermaLink="false">Source code checked in, #41148 20100326113833A</guid></item></channel></rss>
