dreams4ever
asked on
<bean:write> inside <html:textarea> tag
Hi
I need to display text in the text area which is stored as property of bean. The text can be in decimal/hexadecimal/normal text.
The below code isnt working for me:
<html:textarea property="sTranslatedText" style="width:300px" name="SessionDataBean"/>
The text is displayed as is.....i.e. if itz in decimal..then decimal...so on
<html:textarea property="phraseTranslated Text" style="width:300px">
<bean:write property="sTranslatedText" name="SessionDataBean" filter="false" />
</html:textarea>
It doesn't display anything in the text area.
Can anyone tell me how to go abt it??
Thanks a lot!!!
Regards,
I need to display text in the text area which is stored as property of bean. The text can be in decimal/hexadecimal/normal
The below code isnt working for me:
<html:textarea property="sTranslatedText"
The text is displayed as is.....i.e. if itz in decimal..then decimal...so on
<html:textarea property="phraseTranslated
<bean:write property="sTranslatedText"
</html:textarea>
It doesn't display anything in the text area.
Can anyone tell me how to go abt it??
Thanks a lot!!!
Regards,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Other way to do it (might be better) is that in your reset(..) function of your form bean:
You add:
phraseTranslatedText = sTranslatedText;
and in your jsp, simply write:
<html:textarea property="phraseTranslated Text" style="width:300px" />
Enjoy :)
Acton
You add:
phraseTranslatedText = sTranslatedText;
and in your jsp, simply write:
<html:textarea property="phraseTranslated
Enjoy :)
Acton
set what ever you want to display set it to var variable.
<html:textarea property='<% var %>' style="width:300px" name="SessionDataBean"/>
try out.
i am sorry tht was.
<html:textarea property='<%= var %>' style="width:300px" name="SessionDataBean"/>
<html:textarea property='<%= var %>' style="width:300px" name="SessionDataBean"/>
>><html:textarea property='<%= var %>' style="width:300px" name="SessionDataBean"/>
??
phraseTranslatedText is already there, why var? not necessary. ..
??
phraseTranslatedText is already there, why var? not necessary. ..
ASKER
Hey
I know that I can go with html tag textarea, but I was in the assumption that it can be done thru struts tag. I dont see any of the above will help me to go with struts tag.
Thanks a lot!!
Regards,
I know that I can go with html tag textarea, but I was in the assumption that it can be done thru struts tag. I dont see any of the above will help me to go with struts tag.
Thanks a lot!!
Regards,
hi,
<html:textarea.. /> is a struts tag.
Please see here
http://www.roseindia.net/struts/strutsHtmlTags.shtml
fargo
<html:textarea.. /> is a struts tag.
Please see here
http://www.roseindia.net/struts/strutsHtmlTags.shtml
fargo
ASKER
Hi Fargo,
I meant that I can do it with html tag <textarea> using bean write but not with <html:textarea>.
Thanks a lot!!
Regards,
I meant that I can do it with html tag <textarea> using bean write but not with <html:textarea>.
Thanks a lot!!
Regards,
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>><html:textarea property="phraseTranslated
<bean:write property="sTranslatedText"
</html:textarea>
<html:textarea > will ignore what you provide inside the tag, even you write it as
<html:textarea> some text explicitly </html:textarea>
It only prints out property value specified in the <html:textarea>.
So what you might need to do is as following:
<textarea name="phraseTranslatedText
<bean:write property="sTranslatedText"
</textarea>
forgo's above method might prevent your phraseTranslatedText property from getting the value which is not your intention.
Acton