I want to customize captions of the “Ok”, “Save”, “Cancel”, “Save and close” buttons on the editor screen.
By viewing the CUBA source code I discovered that these captions are defined in the message.properties of the com.haulmont.cuba.gui
actions.Ok=OK
actions.OkClose=Save and close
actions.Save=Save
actions.Cancel=Cancel
To redefine that properties for my project I have added them to message.properties of the com.company.myproject.web
actions.Ok=Apply and Close
actions.OkClose=SAVE and CLOSE
actions.Save=OK
actions.Cancel=Close without saving
As the result, editor screens of all entities have been modified.
That screen could be extended in the project. To do this:
Open the SCREENS tab of the navigation panel in Studio
Press the ‘NEW’ button
Choose “Extend an existing screen from the base project” and “edit-window.actions.xml” (or “extended-edit-window.actions.xml” ) from the dropdown.
After that we should manually modify the screen controller via the IDE: created class should extend the AbstractFrame ([url=https://doc.cuba-platform.com/manual-6.2/frame.html]https://doc.cuba-platform.com/manual-6.2/frame.html[/url])
package com.company.myproject.web.editwindow.actions;
import com.haulmont.cuba.gui.components.AbstractFrame;
public class ExtEditWindow extends AbstractFrame {
}
Now it is possible to edit the screen in the Studio.
And as in previous example, modifications are applied to all the editor screens of the application.
Other screens from base projects could also be customized by the similar way.
It helped me in changing the Label(caption),but could you please help me in setting the icon for (Save and Close,Save etc.) other than customizing buttons method?