Also... a "bulk download" actually doesn't (necessarily) have to relate to a collection of objects.. you can simply have an action that returns a Blob or a Clob.
A couple of good examples can be found in the devutils isisaddons module [1], eg [2] and [3] HTH Dan [1] https://github.com/isisaddons/isis-module-devutils [2] https://github.com/isisaddons/isis-module-devutils/blob/master/dom/src/main/java/org/isisaddons/module/devutils/dom/DeveloperUtilitiesServiceProgrammatic.java#L163 [3] https://github.com/isisaddons/isis-module-devutils/blob/master/dom/src/main/java/org/isisaddons/module/devutils/dom/DeveloperUtilitiesServiceProgrammatic.java#L178 On 15 March 2015 at 11:31, Dan Haywood <[email protected]> wrote: > IIRC, all results except the last are ignored. > > So I think this processing should be when isLast(), not isFirst(). > > Cheers, > Dan > On 15 Mar 2015 11:24, "Jeroen van der Wal" <[email protected]> wrote: > >> Hi Victor, >> >> You can take a look at Bulk Interaction [1]. This allows the user to >> invoke >> an action on selected entries. >> >> Something like this: >> >> @Action(invokeOn=InvokeOn.COLLECTION_ONLY) >> public Blob downloadAsZip() { >> if (actionInvocationContext.isFirst()){ >> for (Object party : >> actionInvocationContext.getDomainObjects()){ >> //put the stuff in a zip >> ... >> } >> } >> return new Blob("dowload.zip", "application/zip", ...) >> } >> >> Cheers, >> >> Jeroen >> >> [1] https://isis.apache.org/reference/services/bulk-interaction.html >> >> On 14 March 2015 at 15:20, Victor Oomens <[email protected]> wrote: >> >> > Hi all, >> > >> > Perhaps someone could give me a pointer on how to create a 'bulk >> download' >> > action button when listing records with attachments. I would like to >> create >> > a zip file of all the attachments of the listed records for the user to >> > download at once. >> > >> > TIA. >> > >> > Victor >> >
