开发者

Displaying images in the form of a grid using JSF

开发者 https://www.devze.com 2023-02-15 18:49 出处:网络
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 dir

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消