Home
  What's News
    InfoJet Service
    InfoJet POM
  Overview
  Code Attributes
  Proxy Classes
  How to Use
    InfoJet Rules
    InfoJet EditPart
    InfoJet QuickFill
    Evaluate
  Download
  Java
    Buy
  Pricing
  How to Buy
    Support
  Contact Us
InfoJet POM Overview
To support InfoPath 2007 form codes, we provide Proxy Object Model(POM) to wrap a subset of InfoPath 2007 object model supported by InfoJet Service, so the form codes can run in them both.
Note:
InfoJet Service directly supports InfoPath 2003 compatible form code, no need to use InfoJet POM with them, please reference InfoJet Service Form Code Support for details.
How InfoJet POM works?
For example, we have the following form codes now:
public partial class FormCode
{
    public void InternalStartup()
    {
        EventManager.XmlEvents["/my:myFields/my:field1"].Changed
            += new XmlChangedEventHandler(field1_Changed);
    }
    public void field1_Changed(object sender, XmlEventArgs e)
    {
        e.Site.InnerXml = e.Site.InnerXml.ToUpper();
    }
}
Because InfoJet Service cannot instance the class "FormCode" directly, so we need to move the event handler codes to a public static method "On_field1_Changed", and wrap the event parameters with InfoJetSoft.POM.XmlFormProxy:
public void field1_Changed(object sender, XmlEventArgs e)
{
    XmlFormProxy formProxy = new XmlFormProxy( this, sender, e );
    On_field1_Changed( formProxy );
}
[System.ComponentModel.Description("InfoJet POM, EventType=Changed, MatchPath=/my:myFields/my:field1")]
public static void On_field1_Changed(XmlFormProxy formProxy)
{
    formProxy.XmlEventSite.InnerXml = formProxy.XmlEventSite.InnerXml.ToUpper();
}
The DescriptionAttribute attribute of On_field1_Changed() is required, so InfoJet Service can find out this method while the form event fired.
Note:
The method On_field1_Changed() must be a public static method.

For more information about the DescriptionAttribute attributes used by InfoJet POM, please reference Code Attributes for details. The page Proxy Classes lists the InfoPath object model API supported by the proxy object "XmlFormProxy".

Copyright © 2005 - 2010 InfoJetSoft all rights reserved