wood burning stoves
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:write, with PRE in OPTION tag" Watch "bean:write, with PRE in OPTION tag" New topic

bean:write, with PRE in OPTION tag

Madhu panitini

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"/>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63837

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

[Asking smart questions] [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.

Consultant, Sima Solutions
Madhu panitini

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
It's not a secret anymore!