Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Replacing a space in each brand name  RSS feed

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.
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!