• Post Reply Bookmark Topic Watch Topic
  • New Topic

ignore new line character  RSS feed

 
tun zaw
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have some problem with my outputtext.
i post the text and save in database.But newline character is ignored when saved text is display.Text is display in paragraph and continuous text line.

I wawnt to display text into composed text with no change.
what jsf tab i shold use.
this is similar to composing mail.

i use tomcat6.0.14 and mysql 5.0.45.
 
Ganesan Ramakrishnan
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can solve this using the <t:inputHtml > tag in tomahawk liberary.
 
Dwijen Bhattacharjee
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I faced similar type of problem ...but not the same as you.
I need to show some text in <hutputText> with line break.
I use <br> in between the text
and <hutputText escape="false"/>

Its working fine.I don't know is the same implementation is possible for your application or not.

And please let me know which approach you have use as i am also new to JSF.
 
Tim Holloway
Bartender
Posts: 18663
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're trying to take multi-line input from a textarea input control, the problem isn't really in JSF. JSF renders the HTML TEXTAREA input tag, and it's the limitations on HTML that are the problem.

Unfortunately, there's no easy way around that. HTML wasn't designed for that sort of input. There are some JavaScript solutions, but the only way otherwise that you can make a web page behave in ways that HTML doesn't support is to use an applet, ActiveX or other type of plugin. Plugin solutions are a pain, since they all have limitations. For example, I run a 64-bit machine, and there is no applet or Flash support for 64-bit OS's. Only by downgrading the browser to 32-bit mode (which I refuse to do). And ActiveX will only run on my system when pigs fly on pretty pink wings.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!