This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java and have Dr. Raoul-Gabriel Urma & Richard Warburton on-line!
See this thread for details.
Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
Sheriffs:
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
Bartenders:
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

dynamic Image in table: webuijsf:table

 
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?
 
Sheriff
Posts: 10445
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
 
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.
 
And tomorrow is the circus! We can go to the circus! I love the circus! We can take this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!