Hello,
I am new to cuba.platform and currently try my first steps. From the developer manual, I see that an edit screen’s id should be {entity_name}.edit (see § 4.5.1.1.4) for standard actions to work correctly. I want to have 2 edit screens for the same entity in my application. Which id should I give to the second edit screen so that standard actions in this screen still work correctly?
I tried to implement the solution that Konstantin proposed. I do not succeed to get this done. To inject a standard action in the controller class, some source code like the following is necessary (taken from the forum topic in Konstantin’s comment):
I want to inject the window commit action. I do not find the name string I have to specify for the Named-attribute and the class name of the window commit action. Can anybody help me with this?
By standard actions we assume actions that invoke other screens (such as Create, Edit, Lookup, etc.). The editor’s commit action is not in this category and we do not recommend injecting this action. If you want to intercept the screen commit, override postValidate(), preCommit() or postCommit() methods in your screen controller. See JavaDocs on AbstractEditor and the documentation.
thank you for your reply. I just only want the commit action to work properly. I thought that this is not the case when I create a second edit screen having an id xyz instead of {entity_name}.edit. So this will work with the commit action without injecting it and setting the window id?
Sure, the screen behavior does not depend on what ID you have assigned to the screen. The ID is only for invoking the screen from other screens or menu.