Hi Isomorphic,
thanks for the hint on this correct way to get the dsName. I adjusted my code accordingly.
Also again thanks for implementing this feature - as it turns out this is also useful to add default values that are not present in the CSV file to the data returned to the client.
Like you already write:
For anyone finding this thread via search:
Best regards
Blama
thanks for the hint on this correct way to get the dsName. I adjusted my code accordingly.
Also again thanks for implementing this feature - as it turns out this is also useful to add default values that are not present in the CSV file to the data returned to the client.
Like you already write:
There are scenarios when mentioned earlier pre- and post-processing approach is not enough. For example if uploaded data needs to be transformed in a certain way before initial validation.
- My usecase is that I have required fields that are not necessarily included in the CSV data.
- Normally, an user would then have to edit every row and enter/select a value. Very time consuming for CSVs with many rows.
- Using myBatchUploader.setUploadFormFields() it is possible to have a FormItem on top, select a value there, which then is sent to the server as well. On the server one can add this as default value to the data that later is returned to the client. This way an requiredField-error that would have to be removed manually in every row can be mitigated by including the selected value as default value.
- (If you are using this lookup feature you'll most likely also use a SelectItem or ComboBoxItem as editor in the upload grid - in this case you need to include another HiddenItem in setUploadFormFields() for the displayValue in the grid data. Store the displayValue in the HiddenItem with an onChange Handler in the SelectItem and set the data for both fields during server processing.)
Best regards
Blama
Comment