myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Heinen" <>
Subject RE: tag to truncate outputText?
Date Wed, 12 Apr 2006 08:45:00 GMT

Many thanks for your answer. 

This morning it is running and working perfectly.
I assume that my tld file was not found also other tags were working
well. BTW I use Tomcat 5.5.12.

Maybe anybody is interested in this add-on for your TruncateConverter.
When the text is truncated I display a tooltip on onMouseOver events
with the original not truncated text via JS.

		if (getTruncateAt() > 0 && buff.length() >
getTruncateAt()) {
			if (getContinuationMark() != null) {

			//add on start
			String esapedTruncStrObject =
StringUtils.replace(value.toString(), "'", "\'");
			esapedTruncStrObject =
StringUtils.replace(esapedTruncStrObject, "\n", "<br/>");
"return escape('" + esapedTruncStrObject + "')");
		//add on end

see for the js stuff.

-----Original Message-----
From: Lindholm, Greg [] 
Sent: Dienstag, 11. April 2006 18:32
To: MyFaces Discussion
Subject: RE: tag to truncate outputText?

-----Original Message----- From: Michael Heinen
> Now I'm really curious about your version and added it to my project.
> But I get the following error (see below) on a really simple page.
> Do you have any ideas?
> I am using MyFaces 1.1.1.

I'm also use MyFaces 1.1.1 with Tomcat 5.0.25.

I don't know what's causing the errors your getting.

The only changes I made to the code I posted was:
- changed the package to xxx
- removed the uri info from the TLD 
- I didn't show the taglib tag
	<%@ taglib prefix="xxx" uri=""%>
- I didn't show the TLD doctype (see below)

Ensure your xxx.tld is in WEB-INF and starts:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "">

View raw message