Tuesday, April 6, 2010

Executing actions declaratively

You have used pivoted property attribute to design custom analysis views like

 

image

and you want to navigate to that view from the navigation menu. You also want to execute automatically the Bind Action fro the view make it editable and hide the toolbar. You can of course use eXpand to make all that happen declaratively

Navigation

Create a read only parameter like

public class CurrentShellSiteOid : ReadOnlyParameter {

    public const string CurrentShellSiteOidParameterName = "CurrentShellSiteOid";

    public CurrentShellSiteOid()

        : base(CurrentShellSiteOidParameterName, typeof (Guid)) {

    }

 

    public override object CurrentValue {

        get {

            if (SecuritySystem.CurrentUser != null)

                return ((ShellSite) ((User) SecuritySystem.CurrentUser).GetMemberValue("ShellSite")).Oid;

            return null;

        }

    }

}

and use model editor like

image

Change View edit mode

Always using the model editor just set the require attribute that will open your view at edit mode

image

Execute Bind Action

Using ModelArtifactState module you can create a rule that will execute BindAction for you

image

and because when BindAction will be executed will enable the UnBindAction you can create a rule that will disable the UnBindAction a well

image

Subscribe to XAF feed
Subscribe to community feed

DiggIt!
blog comments powered by Disqus