Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem using JSF and Tiles

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to TLD or attribute directive in tag file, attribute url does not accept any expressions
 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic