开发者

How to display image in jsf and onclick provide a file upload (to replace)

开发者 https://www.devze.com 2022-12-26 14:43 出处:网络
I would like to display an image on my web page and provide the user the ability to click it and upload anothe开发者_高级运维r image to replace it.

I would like to display an image on my web page and provide the user the ability to click it and upload anothe开发者_高级运维r image to replace it.

Either myfaces or Richfaces works.. (I know tomahawk has some solution but i'm wondering if that's the only solution. The least libraries I use the better..)

Thanks!


You can use something like rich:fileUpload (MyFaces has also got a component for that). Handle file upload on the server side and replace the target file. A more sofisticaded solution would be with saving images as blobs in a database.

0

精彩评论

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