Actions in Arms

StatusIDPriorityType
Closed23091MajorQuestion
ProfileReply
lucas.swapiClient

Hello Sasha!

I want to know why my actions created in controller don't appear in selection of the arms.

Thanks in advanced!

Attached files:

Replies

UserDescriptionPosted On
Sasha (Xafari Support)Client

Hello Lucas,

 

Thanks, we are already researching your issue. It will take some additional time.

 

Regards, Sasha.

 

Sasha (Xafari Support)Client

Hi Lucas,

 

I can’t to reproduce your issue.

 

My steps to create project and to add action for ARMs:

 

1. Create blank xaf cross-platform project
(New Project -> DevExpress v14.2 XAF Solution Wizard ->
Choose Target Platforms: Windows + Web -> Choose ORM: eXpress Persistent Object)

 

2. You have to read ticket Missing Link in Xafari Documentation and documentation  GettingStarted for ARM.

 

Module Project:

add modules XafariModule, XafariArmsModule;
add interface IModelYourAppName and controller EnableARMsViewController.

 

Windows Forms Application Project:

add modules XafariWinModule, XafariArmsWinModule;
add and realise CreateCustomTemplate event.

 

Web Application Project:

add modules XafariWebModule, XafariArmsWebModule;
add XafariDefaultTemplateContent;
implement the ISupportArms interface in the Default class.

 

3. Add controller with actions.

…Controller.Designer.cs:

public partial class TestWindowController : WindowController
    {
        public TestWindowController()
        {
            InitializeComponent();
        }
private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            this.simpleAction1 = new DevExpress.ExpressApp.Actions.SimpleAction(this.components);
            this.popupWindowShowAction1 = new DevExpress.ExpressApp.Actions.PopupWindowShowAction(this.components);
            // 
            // simpleAction1
            // 
            this.simpleAction1.Caption = "MySimpleAction23091";
            this.simpleAction1.ConfirmationMessage = null;
            this.simpleAction1.Id = "MySimpleAction23091";
            this.simpleAction1.ToolTip = null;
            this.simpleAction1.Category = "About";
            this.simpleAction1.Execute += simpleAction1_Execute;            
            // 
            // popupWindowShowAction1
            // 
            this.popupWindowShowAction1.AcceptButtonCaption = null;
            this.popupWindowShowAction1.CancelButtonCaption = null;
            this.popupWindowShowAction1.Caption = "MyPopupWindowShowAction23091";
            this.popupWindowShowAction1.ConfirmationMessage = null;
            this.popupWindowShowAction1.Id = "MyPopupWindowShowAction23091";
            this.popupWindowShowAction1.ToolTip = null;
            this.popupWindowShowAction1.Category = "About";
            this.popupWindowShowAction1.Execute += popupWindowShowAction1_Execute;
            // 
            // TestWindowController
            // 
            this.Actions.Add(this.simpleAction1);
            this.Actions.Add(this.popupWindowShowAction1);
        }
        private DevExpress.ExpressApp.Actions.SimpleAction simpleAction1;
        private DevExpress.ExpressApp.Actions.PopupWindowShowAction popupWindowShowAction1;
   }
}

 

…Controller.cs:

private void simpleAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            MessageObject.CreateMessageInfo(e.ShowViewParameters, ((ActionBase)(sender)).Application, "Info", "MySimpleAction23091");
        }
        private void popupWindowShowAction1_Execute(object sender, SimpleActionExecuteEventArgs e)
        {
            MessageObject.CreateMessageInfo(e.ShowViewParameters, ((ActionBase)(sender)).Application, "Info", "MyPopupWindowShowAction23091");
        }

 

4. Build the application.
5. Open Model.DesignedDiffs.xafml and add action for Arms:

ActionsForArm
Please, try this solution.
Regareds, Sasha.

lucas.swapi

Hello Sasha!
Thanks for your help! I already got it.
I discovered that the actions were not showing up in the selection had been created in a ViewController. Then, I created the actions in a WindowController and solve it.

× This ticket is closed.

Write US