Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:textarea problem

 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by format style?
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic