Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean:write, with PRE in OPTION tag

 
Madhu panitini
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have tried to write a bean: write tag in the Option tag, I want preseve the spaces So I used the <PRE> tag before and after the <bean:write> tag , but it is working when it is used individually, its not working when It is used in Html Option tag, is there any other way to preseve the space and I can not change the tag source as I am using standard taglibs.


<select name="selectedItem" '>
<logic:iterate id="data1" name=" DATA" type="com.xxxx.xxx.xData">
<option value='<bean:write name="data1" property="nrr"/>'>
<bean:write name="data1" property="nrr"/>
</option>
</logic:iterate>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64967
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to post Struts questions in the Struts forum. I have moved this there for you.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using & n b s p ; (without the spaces) for each space you want inserted.
 
Madhu panitini
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
its not possible to use   as I am getting the data from the <bean:write name="data1" property="nrr"/> and I found some how bean:write tag is removing the spaces and I want the string data from bean to be written as it gets from data1 bean, as I mentioned in my earlier post, I even tried with the <pre> tag, but its not working
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic