Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Struts2-Jquery Dialog dynamic title with ampersand

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using displaytag and dialog tag. I'm trying to set the title of the dialog box dynamically to the book title. This works, BUT when there's an & in the title, it displays as & amp; .. ie. Cats&Dogs, Cats& amp;Dogs, can someone help on trying to escape the & in the dialog title? or any workarounds?

<div class="datagrid">
<display:table id="row" name="searcresultsDtl" sort="list" requestURI="SearchBook.action" pagesize="25" export="true" class="simple" defaultsort="2" defaultorder="descending" decorator="com.books.library.util.DisplayTagLink">
<display:column style="text-align:center; width:40px; vertical-align:middle;" title="Details" media="html" >
<sj:dialog id="%{#attr.row.BookId}" autoOpen="false" dataType="html" modal="false" title="%{#attr.row.bookTitle} Contractor Details" href="./bookTitle?BookId=%{#attr.row.BookId}" width="850" resizable="false" hideEffect="explode "/>
<sj:a openDialog="%{#attr.row.BookId}">View</sj:a>
<display:column property="bookTitle" title="Book Title" sortable="true" class="Title" style="vertical-align:middle;"></display:column>

Thank you!
Ranch Hand
Posts: 99
Tomcat Server Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You getting the title from request?

Some time ago I had an issue over the URL setting the amp, I used web encoding:

I did the following:

Hope this helps,
We cannot change unless we survive, but we will not survive unless we change. Evolving tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!