aspose file tools*
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
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: 10266
    
168

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: dynamic Image in table: webuijsf:table