Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Highlight part of a text in JSF InputTextArea

 
Cesar Huasupoma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to Highlight part of a text but this text is in InputTextArea. Also I need to Highlight this text in when I push the button which is going to have a parameter that give me the text that is going to Highlight.

I got some kind of idea of highlight the text using this function:



But for this I need to have a change the tag of <ice:inputTextarea> to <div> I a really need to have an inputTextarea because I also need to change the text if it's necessary I got an example page: gskinner.com/RegExr/ Andi hope someone understand me because my english isn't the best
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18014
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The HTML controls that implement the JSF inputText and inputTextArea controls do not support formatted text, only plain text. If you attempt to embed sub-elements for formatting within the element definitions for these controls, it will not work properly.

There are JSF controls available that can allow for the input of text with formatting, but they are not part of the core JSF tag set - you have to use one of the extension tag sets such as the RichFaces Rich Text control.

 
Cesar Huasupoma
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that I use ICEFaces 1.8 because the system that I'm working use it so I was thinking maybe I could use the InputRichText but I consider this kind of the last option
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18014
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IceFaces has the ice:inputRichText control. It's not a "last resort", however. Like I said, the core JSF tags are all limited to what HTML can do, and HTML text controls can't do rich text.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic