FlowUI: always text of action is used

Hello, in FlowUI the text of the action is always used even if there is a custom text provided for the button that uses the action.

I can provide more context if needed.

Hi, Klaus!
Loading actions in FlowUI is defined in such a way that some properties of the component are overwritten based on the properties of the action.

List of writable properties:

  • Enabled
  • Visible
  • Text
  • Title
  • Icon
  • ShortcutCombination
  • ThemeVariant

For components that implement the io.jmix.flowui.kit.component.HasAction interface, you can use the setAction(Action, ОverrideComponentProperties) method.
With this method, you can assign an action to a component without overriding its properties.

Regards,
Dmitriy

@d.kremnev Thank you, but I don’t think this is the way it is supposed to be - and it wasn’t in previous versions of Jmix and CUBA. It’s great that actions have default styles, texts and so on, but if I overwrite this in a view descriptor file the expected outcome is, that this text is used.

E.g.:
CURRENT: this prints out “OK” and not “Save” in the saveBtn:
EXPECTED: “Save” text on button

    <actions>
        <action id="saveAction" type="detail_saveClose"/>
        <action id="closeAction" type="detail_close"/>
    </actions>
...
                    <button text="msg://save"
                            id="saveBtn"
                            width="100%"
                            action="saveAction"/>

@klaus Thanks for reporting the problem. I created an issue to rework the loading action for a button.

1 Like