Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF dynamic image

 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone supply an example in JSF of how I'd code an image tage with a complex dynamic URL? I need to reference dynamically generated images and I'm going round and round with it.

The resulting URL should look something like:

<img src="http://relocated.url.com/mywebapp/image-generator?imagenumber=123">

where the "123" is a JSF property value and the URL as a whole is mapped a la the JSTL c:url tag.
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Crud. I posted this in the wrong browser frame. Mark, can you move this to the JSF forum? Thanks!
 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use h:graphicImage tag and map the url or value attribute to the backing bean's property.
Tag's specs.
 
Mark Herschberg
Sheriff
Posts: 6037
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So moved...
 
Tim Holloway
Saloon Keeper
Posts: 18304
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, That's not as convoluted as what I was thinking, but it works.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic