Data Import Add-On Question

@mario

Quick question. I’m testing this add-on, while looking for a current need of users of an application to upload files within the normal browse/edit app screens that would upload the data to the database. What I can’t quite figure out yet, is if this add-on is meant for admins only, or if there is a way to add this method of data import to an edit/browse screen. So far, it seems to me like it is meant for admin only. Is this correct? Or is there a way to implement it for local user usage of data import?

Thanks in advance!

Hi,

The data import addon supports both use cases. Using the import wizard is more used by the administrator / tech savy business people.

For regular business users, the import configuration is pre-defined and stored.

Then it can be automatically triggered via any browse screen (see cuba-component-data-import/README.md at master · mariodavid/cuba-component-data-import · GitHub)

Uaing the DataImportAPI you can hide away the data impprt addon completely and programatically trigger an import. In the dem app there a various examples for end users. E.g. cuba-example-using-data-import/MlbTeamBrowse.java at master · mariodavid/cuba-example-using-data-import · GitHub

Cheers
Mario

1 Like

Thanks @mario. I have a quick follow-up question for you, though. The instructions say to add a custom application component, but I’m not finding information on how to do this within the project. Is there further information somewhere that I’m not able to find that gives more instruction regarding how to do this?

Thanks again!

Hi,

Not sure what you mean. If it is about installing the addon, please see this further information:
https://doc.cuba-platform.com/studio/#add_ons

Cheers
Mario

Hey @mario

The instructions say the following:

Add custom application component to your project:

  • Artifact group: de.diedavids.cuba.dataimport
  • Artifact name: dataimport-global
  • Version: add-on version
    dependencies { appComponent(“de.diedavids.cuba.dataimport:dataimport-global:addon-version”) }

I was under the impression this was further action needed after installing the Add-On, but perhaps I’m mistaken.

Thanks