This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
When I submit my record to be saved.. I check for certain 'badwords'/expletives in some of the fields. If any are found I would love to be able to highlight those words... However I'm using SelectInputText components.. So I dont think thats possible...
Secondly I have a datatable with a Lucene based search facility which populates the table depending on the search.. Again I would love to be able to highlight the search term(s) in the table of results... I imagine this would be more possible as it presents its data using OutputText components...
Any thoughts appreciated.
Thanks
Regards, Dave Brown
SCJP 6 - [url]http://www.dbws.net/[/url] - Check out Grails Forum
The inputText JSF tag renders as an HTML INPUT TYPE=TEXT control, so you're out of luck there, since that control lacks fine-grained formatting features. You'd have to replace it with a smarter input text control than the standard JSF one.
outputText is much easier. Just format the property string using HTML markup and use the escape="false" attribute on the outputText element.
Customer surveys are for companies who didn't pay proper attention to begin with.
Tim Holloway wrote:The inputText JSF tag renders as an HTML INPUT TYPE=TEXT control, so you're out of luck there, since that control lacks fine-grained formatting features. You'd have to replace it with a smarter input text control than the standard JSF one.
outputText is much easier. Just format the property string using HTML markup and use the escape="false" attribute on the outputText element.
Ahh okay thanks.. so in the case of my table.. would this be a worthy approach : User enters search term and clicks search button... I add the search phrase to session, then after applying a special Converter to each column in the table, I could pick up the search term from the session in the converter getAsString() method and look for and apply html to the found text there..
As for the InputText boxes.. Best I can do there is just apply a 'message' to the relevant box indicating that a badword was found...