LookupAction ID changed from 7.2.5 to 7.2.7

when upgrade from framework version 7.2.5 to 7.2.7 pickerfield getLookupAction method search for action ID named “lookup” and then throw exception IllegalStateException “Unable to find action with id lookup”. the action ID changed to “picker_lookup”…

image

Hi.
The standard PickerField generated by Studio as following, the action’s id did not change:

<pickerField id="pickerField" caption="Choose a customer"
             dataContainer="orderDc"
             property="customer">
    <actions>
        <action id="lookup" type="picker_lookup"/>
        <action id="clear" type="picker_clear"/>
    </actions>
</pickerField>

Are you sure you haven’t made any changes of id by yourself?

getLookupAction() is a deprecated method returning the legacy action.
And nothing was changed in this area since CUBA 7.0.

1 Like

Hi, i use old screens and access picker field lookup action throught “getLookupAction” method… if i downgrade to 7.2.5 it works again… some changes between 7.2.5 and 7.2.7 were introduced that affect actions on old screens.

    @Named("fieldGroup_Suc.deposito")
    private PickerField<Deposito> deposito;
    @Override
    public void init(Map<String, Object> params) {

        super.init(params);

        /* Inicializa frame de items */
        deposito.getLookupAction().setLookupScreen("caerp$DepositoSuc.lookup");
        deposito.getLookupAction().setLookupScreenParamsSupplier(() -> ParamsMap.of("sucursal", sucursal.getValue()));
        deposito.addValueChangeListener((e) -> {
                    if ((e.getValue() != null) && (e.isUserOriginated())) {
                        AppBeans.get(CommonService.class).updateDepositoPorUser(
                                userSessionSource.getUserSession().getUser(), e.getValue());
                    }
                }
            );
    }

Screen XML:

                            <fieldGroup id="fieldGroup_Suc" datasource="comprobanteDs" fieldCaptionWidth="160px">
                                <column width="250px">
                                    <field property="sucursal"/>
                                </column>
                                <column width="250px">
                                    <field property="deposito" required="true"/>
                                </column>
                            </fieldGroup>

Thank you for reporting the problem. We have created a GitHub issue.