Data Form Specs
Wizards
In addition to schema, to assist with building specs, the Blackbaud Infinity SDK includes Add New Item wizards for each type and method of implementation. You can add these items to Blackbaud AppFx Catalog projects. These are:
-
Add Data Form Template Spec (CLR)
-
Add Data Form Template Spec (SP)
-
Add Data Form Template Spec (Wrapped SP)
-
Edit Data Form Template Spec (CLR)
-
Edit Data Form Template Spec (SP)
-
Edit Data Form Template Spec (Wrapped SP)
-
View Data Form Template Spec (CLR)
-
View Data Form Template Spec (SP)
-
View Data Form Template Spec (Wrapped SP)
Data form specs define how records are read, added, or updated and define information about form fields (form metadata). Each type of spec has a root element named according to the spec type:
-
AddDataFormTemplateSpec
-
EditDataFormTemplateSpec
-
ViewDataFormTemplateSpec
The rest of the spec is housed within the root element. Identifying and categorizing information is contained in attributes of the root element. Children of the root element include sections to define the read, load, and/or save implementations, context for the form, and the form metadata.
There are also optional sections to define dependencies, meta tags, a reference to a resources file, security lists, page alterations, whether the spec is a data form extension, server-side post-action events, and duplicate record checks.
Schema
Data form specs are XML documents. As such, a valid spec conforms to its schema. For Add Data Forms, the these schema are contained in CommonTypes.xsd and AddDataFormTemplateSpec.xsd with these namespaces: bb_appfx_adddataformtemplate and bb_appfx_commontypes. Edit Data Forms and View Data Forms also use bb_appfx_commontypes along with bb_appfx_editdataformtemplate and bb_appfx_viewdataformtemplate respectively.
CommonTypes.xsd and the other schema are located in the SDK\Schemas folder. You can view the schema in any XML editor such as the one in Visual Studio. Opening a schema in Visual Studio adds the benefits of the XML editor: code coloring, auto-completion, etc. Visual Studio also includes the XML Schema Explorer, which is a tree-structured interface.
Note: Most of the specs in SDK\Schemas correspond to feature types in Blackbaud Infinity. But the namespace in CommonTypes.xsd is imported by the specs for feature types.
Another useful feature of the XML functionality in Visual Studio is the ability to go to a definition for an item in an XML document. For example, you can right-click the CLRDataForm tag in a CLR Add Data Form spec and select Go to definition. AddDataFormTemplateSpec.xsd appears in an XML editor and the definition is illuminated.
Visual Studio and the Blackbaud Infinity SDK use XSD to create IntelliSense for feature specs. For example, as you begin to add a FormField element to a spec, acceptable XML nodes are presented to you as a floating menu along with ToolTips. The options at any given point in the spec are based on the schema for the spec and the ToolTips are based on annotations in the schema.
The schema for feature specs are registered in Visual Studio when the Blackbaud Infinity SDK is installed. When the XML menu is available such as when an XML document is open, you can select Schemas to see which schemas are available.
The schema for feature specs provide enough information to supply a list of possible values for many attributes. For example after you type the first quotation mark for the DataType attribute value on a FormField element, a list of values appears.