Get your CodeRanch badge!*
The moose likes Struts and the fly likes html:textarea problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:textarea problem" Watch "html:textarea problem" New topic
Author

html:textarea problem

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 437
hi, how to we save data in html:textarea commonly to DB table , if we set it to 5 line for textarea ...when we retrieve , would it arrange back the data in same format style ?
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

What do you mean by format style?


A good workman is known by his tools.
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 437
for example for format style ...the entered data in line1 go back to line 1 when data retrieve again from DB
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

No trimming is necessary and what was said about trimming made absolutely no sense to me.

You specify the size of the textarea in your html Struts tag. If the String that gets submitted is redisplayed in the same textarea (or in another textarea with the same size parameters) it will look exactly the same.

I don't understand what would make you worry about that. Were you concerned that the DB was going to lose the linebreak characters or something?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: html:textarea problem
 
Similar Threads
Error using struts (form-bean)
html:textarea property
problem displaying greaterthan, etc special characters
Html:Textarea Tooltip
Line breaks in html:textarea