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 11:22:48 GMT

Does the truncateOutput tag work with JSF EL? 

The following snippet causes a NullPointerException in the
TruncateConverterTag at line 62, which is marked below because
the Object o is always null.

<t:columns id="columns"

<h:outputText value="#{DynaAnnoControllerBean.cellValue}">
     <rm:truncateOutput truncateAt="#{columnHeader.truncateAtPosition}"
private static void setConverterTruncateAt(FacesContext facesContext,
TruncateConverter converter, String value) {
	if (value == null) {
	} else if (UIComponentTag.isValueReference(value)) {
		ValueBinding vb =
	Object o = vb.getValue(facesContext);
	if (o instanceof Number) {
		converter.setTruncateAt(((Number) o).intValue());
	} else {
//line 62


-----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