London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Commerce Manager interfaces contain lists, toolbars and custom user controls. To customize these UI types, use the special XmlFormBuilder control. In the XmlFormBuilder XML, you can define layouts and predefined properties for controls.
The following examples show complex layouts and their components.
Example 1
Example 2
Example 3
The current view is defined in two XMLs: PurchaseOrder-ObjectView.xml section View/Layout, and in PurchaseOrder.[MC_BaseForm].xml section in View/FormDocument.
In the following examples, you modify tabs in Views for XmlFormBuilder, and create a file with the name PurchaseOrder-ObjectView.xml in the ~/%AppName%/Config/View.
Add a new tab with the name NewBlock and add a control ~/Apps/TestApp/TestControl.ascx with one pre-defined property.
<?xml version="1.0" encoding="utf-8" ?>
<View xmlns="http://schemas.mediachase.com/ecf/view">
<Form>
<Layout>
<add>
<Block id="test" name="NewBlock">
<Placeholder id="Placeholder_1">
<Control id="testControl" path="~/Apps/TestApp/TestControl.ascx">
<Property name="Property1" value="Value1" />
</Control>
</Placeholder>
<Placeholder id="Placeholder_2">
</Placeholder>
<Placeholder id="Placeholder_3" />
<Placeholder id="Placeholder_4" />
</Block>
</add>
</Layout>
</Form>
</View>
Replace the control /Apps/Order/Modules/ShortInfo.ascx with the user control from our /Apps/TestApp/NewShortInfo.ascx application.
<?xml version="1.0" encoding="utf-8" ?>
<View xmlns="http://schemas.mediachase.com/ecf/view">
<Form>
<Layout>
<Block id="Null" name="">
<Placeholder id="Placeholder_1">
<Control id="GeneralInfoCtrl1" path="~/Apps/Order/Modules/ShortInfo.ascx">
<setAttributes path="~/Apps/TestApp/NewShortInfo.ascx" />
</Control>
</Placeholder>
<Placeholder id="Placeholder_2">
</Placeholder>
<Placeholder id="Placeholder_3" />
<Placeholder id="Placeholder_4" />
</Block>
</Layout>
</Form>
</View>
Delete the last tab Notes from OrderView.
<?xml version="1.0" encoding="utf-8" ?>
<View xmlns="http://schemas.mediachase.com/ecf/view">
<Form>
<Layout>
<remove nodeId="notes"/>
</Layout>
</Form>
</View>
LayoutMode describes how to display blocks:
Last updated: Oct 12, 2015