• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Replacing a space in each brand name

Dan Acuff
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to prepare the brand names to have an image associated with them.
In the example below done by another helpful consultant, I am using the encoding method to string the brand names together; getEncodedString(_brand)

That leaves me with image names like Bud+Light.jpg

<c:forEach items="#{customerSession.shopByBrand}" var="_brand"
<li style="#{_cnt.last ? 'border-bottom: 1px solid #7f7777;':''}">

<h:graphicImage value="#{customerSession.imageServer}/images/#{customerSession.getEncodedString(_brand)}.jpg"/> #{_brand}</a>


My designer would rather have an underscore. I have tested all of the major browsers and a + symbol seems to be fine. But HOW WOULD I replace the space with and UNDERSORE instead?

Thank you very much.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic