This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes dynamic Image in table: webuijsf:table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "dynamic Image in table: webuijsf:table" Watch "dynamic Image in table: webuijsf:table" New topic
Author

dynamic Image in table: webuijsf:table

Walter Krawiec
Greenhorn

Joined: Jan 13, 2009
Posts: 20
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

Joined: Jul 20, 2005
Posts: 9913
    
158

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

[My Blog] [JavaRanch Journal]
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic Image in table: webuijsf:table
 
Similar Threads
putting image files to Jar File in Swing application
Icons and a Label
need help to find the right path to images
inline image for email from relative path
relative URL in jar files