Download

Get Loom

MultiUpload

Used to mark a property which will be used for multiple file upload using the <a:multiUpload> tag.

@MultiUpload(propertyPath="attachments")
private Leasing leasing;

The jsp page:

<l:form>
  <a:multiUpload id="multiupload" name="leasing.attachments"/>
</l:form>
<script>
  new loom.ui.MultiUpload($('multiupload'));
</script>

The property will be automatically merged using persisted contents. The annotated property will be automatically fetched from the database (like @RetrieveEntity) and the multiple file property will merge uploaded contents with current database contents.

This annotation requires some extra Spring config.