Bulk Insert Entity

Hi,

I was wondering how can I achieve bulk insert table similar to the order lines table shown in many example but not linked to a single entity like where in the example the order lines are linked to the order table. so based on the example I would like to bulk insert orders not order lines.

Thanks

Hi,

  • Create a browser screen
  • Remove readOnly="true" from the data element in screen’s XML
  • Make the table and its columns editable
  • Inject DataContext to the controller
  • Add a button and in its click handler invoke dataContext.commit()
    @Inject
    private DataContext dataContext;

    @Subscribe("commitBtn")
    private void onCommitBtnClick(Button.ClickEvent event) {
        dataContext.commit();
    }

Hi

Is there a way to start with empty data as I want to insert bulk data which is all new and is makes it more difficult with all the data existing in the same table

Thanks

Just remove the <loader> element from the screen XML.

Thank you it worked