• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

dynamic Image in table: webuijsf:table

 
Walter Krawiec
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone !

I've question related with viewing images in table component, normally I was creating button and adding imgUrl= (file in resources folder), but right now i just bind this property with the String value but it's not working.

<webuijsf:button actionExpression="#{Client.bimage1_action}" id="bimage1" imageURL="#{currentRow.value['image']}" text="image"/>

where 'image' is a string with the path and file name to image (it's not even working for files from resource folder: /resources/sample.jpg).

Button with the image is working only when i'll type path by myself (example: imageURL="/resources/sample.jpg") but not from value.

Someone where doing customized images in table component?
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure which table component you are using, so let me move this to the JSP forum which is more appropriate than the EJB forum
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's part of Woodstock JSF component library, so the JSF forum would have been a more appropriate place.

Regarding to the actual problem, do you understand how relative paths work?

What's the absolute URL with which you call this page?
What's the absolute URL with which you can call the image independently?

Once you know that, you can extract the relative URL to the image from the absolute URL of the page. Check the <img> element in the generated HTML source if anything is right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic