The general idea is to mount a single handler, which takes the filename from the url.
There is no reason to mount all images by such a handler one-by-one.

Bas

Op 10-3-2011 23:01, Ladislav DANKO schreef:
Hi all,

what is the recommended way to mount huge amount of an images (thousands)
in app? Does mountSharedResource() has any bottleneck? Simplified code look
like:

Folder folder = ((Start) Application.get()).getUploadFolder();
File[] files = folder.getFiles();
List<File>  lList = Arrays.asList(files);
Collections.sort(lList);
int i = 0;
Iterator<File>  iterator = lList.iterator();
while(iterator.hasNext())
{
        iterator.next();
        String fileName = lList.get(i).getName();
        mountSharedResource("/images/" + fileName, new
ResourceReference(Images.class, fileName).getSharedResourceKey());
        i++;
}

But what if in folder is for example 100.000 photos?

Thanks for pointing,

--
Ladislav DANKO


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to