1
Vote

NavigationGraphConfigurationElement does not support "Constrained" attribute

description

The PageFlow Xml provider does not support a method to declaratively create an unconstrained PageFlow on a per-PageFlow basis. The XmlPageFlowDefinition uses the underlying NavigationGraph to determine its Constrained status, as:
 
    public bool Constrained
    {
        get { return !navigationGraph.Constrained; }
    }
 
 
I propose that NavigationGraphConfigurationElement.cs be modified by adding:
 
    public bool Constrained
        {
        get { return (string)base["constrained"]; }
        set { base["constrained"] = value; }
        }
 
And that WebConfigStore.cs be modified to use this Constrained value during NavigationGraph construction. This may be done by modifying the constructor (at about line 69) to read:
 
            NavigationGraph navigationGraph = new NavigationGraph(configNavGraph.Name,
                                                   xmlPageFlowInstanceStore,
                                                   temporalViews[configNavGraph.StartView],
                                                   configNavGraph.AbortUrl,
                                                   configNavGraph.Abandonable,
                                                   configNavGraph.NotRunningUrl,
                                                   configNavGraph.Constrained,
                                                   xmlPageFlowType);
 
Or by keeping the existing constructor and adding the following:
 
navigationGraph.Constrained = configNavGraph.Constrained;
 
I do note that the AllowBackButton property of the xmlPageFlowConfigurationSection does allow a master on/off for XML-based pageflows, but this needs to be configurable on a per-pageflow basis. Further, the use of the "AllowBackButton" property to indicate a PageFlow's constraint status is a bit confusing.

file attachments

comments

BrandonHaynes wrote Jun 6, 2008 at 6:02 PM

NavigationGraphConfigurationElement.cs

wrote Jun 6, 2008 at 6:02 PM

BrandonHaynes wrote Jun 6, 2008 at 6:03 PM

WebConfigStore.cs

wrote Jun 6, 2008 at 6:03 PM

BrandonHaynes wrote Jun 6, 2008 at 6:25 PM

Missed the following on the Constrained property definition. Oops!

[ConfigurationProperty("constrained", IsRequired = false)]
public bool Constrained
{
get { return (string)base["constrained"]; }
set { base["constrained"] = value; }
}

wrote Feb 13, 2013 at 11:14 PM