Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2646
  • Last Modified:

How can you wrap text in a Struts <html:textarea> object?

I have a Struts form with a <html:textarea>, but the text is not wrapping within the textarea box.  "wrap" doesn't appear to be a part of the tld for this tag.  Any ideas?
0
nateforrest1
Asked:
nateforrest1
2 Solutions
 
CEHJCommented:
What is happening currently and what do you want to happen?
0
 
CEHJCommented:
>> "wrap" doesn't appear to be a part of the tld for this tag.

That's since it doesn't exist in the HTML spec
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
Hmmm check this

http://www.idocs.com/tags/forms/_TEXTAREA_WRAP.html 

you may need to try some thing like this

<textarea name="content" rows="12" cols="50"  wrap="soft">
 <bean:write name="articleForm" property="content"/>
</textarea>

which is a work around.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
CEHJCommented:
If you're getting no wrapping at all, that's odd since that's the default behaviour
0
 
freeexpertCommented:
What does the generated HTML look like? Which browser are you using?
0
 
ellandrdCommented:
>>I have a Struts form with a <html:textarea>, but the text is not wrapping within the textarea box.

http://issues.apache.org/struts/browse/STR-159

however like what shivaspk has suggested, the workaround would be something like this:

<textarea wrap="soft" rows="5" cols="50">
<bean:write name="someStrutsFormBeanName" property="someStrutsFormBeanProperty"/>
</textarea>

ellandrd
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now