File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Problem using JSF and Tiles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem using JSF and Tiles" Watch "Problem using JSF and Tiles" New topic
Author

Problem using JSF and Tiles

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
In my tiles File I have

<h:graphicImage url="{0}">
<tiles:getAsString name="imageURL"/>
</h:graphicImage>

I am hoping to pass a image url parameter to my tiles file and have the graphicImage display the image, but its not really displaying the image, only outputting the url string, please how do i resolve this
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

My best suggestions is to get rid of Tiles and go with xhtml templating instead.

But Why not just have

<h:graphicImage url="${imageURL}"/>

In your tiles:insert add a <tiles:put name=imageURL value="someValueHere"/>

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
According to TLD or attribute directive in tag file, attribute url does not accept any expressions
Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I went by your suggestion and i got the following error

"According to TLD or attribute directive in tag file, attribute url does not accept any expressions"

Thus is the code used

Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

by any chances are you also working with jstl?

With jstl you could have their core package and use <c:url> to generate the Url and use expressions

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem using JSF and Tiles
 
Similar Threads
Several folders for JSP in JSF
h:selectOneRadio question
Not able to use action attribute in JSF graphicImage
Wildcard Actions
Any solution for h:graphicImage using rich:toolTip