aspose file tools
The moose likes JSF and the fly likes ignore new line character Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "ignore new line character" Watch "ignore new line character" New topic
Author

ignore new line character

tun zaw
Greenhorn

Joined: Jan 23, 2008
Posts: 22
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

Joined: Mar 18, 2008
Posts: 84
Hi,
You can solve this using the <t:inputHtml > tag in tomahawk liberary.
Dwijen Bhattacharjee
Greenhorn

Joined: Mar 31, 2008
Posts: 26
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14487
    
    7

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: ignore new line character
 
Similar Threads
Japanese character not read or written correctly
How to to recognize new line character?.
NX: Wrapping JOption messages
How to display "\n" in xml file?
textarea