Displaying images in the form of a grid using JSF
I have a requirement where in I need to display images present in a directory as thumbnails in my JSP page. The page will be divided into a left panel and a right panel. Left panel, displaying the directories in the form of a tre开发者_高级运维e structure. On click of a folder, images present in that particular folder need to be displayed as thumbnails in the form of a grid.
The tag <h:graphicImage>
will not work in this case since my images are present outside the context root of my application.
If you can use a component library I would propose p:dataGrid
of Primefaces library. An example is given in the Primefaces Showcase.
You have to prepare the list of images in the backing bean.
精彩评论