wood burning stoves 2.0*
The moose likes Struts and the fly likes bean:write, with PRE in OPTION tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:write, with PRE in OPTION tag" Watch "bean:write, with PRE in OPTION tag" New topic
Author

bean:write, with PRE in OPTION tag

Madhu panitini
Greenhorn

Joined: Jan 15, 2009
Posts: 2
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

Joined: Jan 10, 2002
Posts: 61756
    
  67

Please be sure to post Struts questions in the Struts forum. I have moved this there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Try using & n b s p ; (without the spaces) for each space you want inserted.


Merrill
Consultant, Sima Solutions
Madhu panitini
Greenhorn

Joined: Jan 15, 2009
Posts: 2
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: bean:write, with PRE in OPTION tag