Themelia Pro A powerful new development platform built on ASP.NET.
 
Setup via Configuration
 
 

Sequences can be setup via either via declarative code as seen in Creating Sequences, but they can also be setup via configuration.

This type of configuration allows for easier configuration via 3rd party editors and provides non-developers (i.e. marketing team members) the ability to sequence views and versions (versions are discussed in Creating Multiple Views.

Before we look at configuration based, let's look at a controller setup via declarative code for reference and to set a baseline for our example:

<t:SequenceController SequenceName="Process" ID="Controller" runat="server">
    <Views>
        <t:SequenceView ID="Input" runat="server">
        <t:SequenceView ID="Saved" runat="server">
        <t:SequenceView ID="ComplexInput" ControlName="Input" runat="server">
        <t:SequenceView ID="ComplexSaved" ControlName="Saved" runat="server">
    </Views>
</t:SequenceController>

To setup a controller in configuration, you must first remove all views from the sequence controller. Here's an example of what it should look like:

<t:SequenceController SequenceName="Process" ID="Controller" runat="server" />

Next, add a "sequences" section in configuration and add sequences and views, using "controlUsed" as the as "ControlName" as the following example shows:

<themelia.web>
  <sequences>
    <add name="Process">
      <views>
        <add name="Input" />
        <add name="Saved" />
        <add name="ComplexInput" controlUsed="Input" />
        <add name="ComplexSaved" controlUsed="Saved" />
      </views>
    </add>
  </sequences>
</themelia.web>

At this point, the sequence is completely configuration based and will work the same way as the declarative version.

It's important to remember that if a sequence has any declarative code in it, the declarative code will take precidence. The purpose of this is to prevent non-developers from attempting to modify sequences that should only be controlled by developers, not management or marketing or other departments.