struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Calmus (JIRA)" <>
Subject [jira] Created: (WW-2299) property tag forcing values into Long
Date Tue, 06 Nov 2007 16:04:35 GMT
property tag forcing values into Long

                 Key: WW-2299
             Project: Struts 2
          Issue Type: Bug
    Affects Versions: 2.0.9
         Environment: Tomcat 6.0.14,
Java 6u3
Windows XP
            Reporter: Mike Calmus

Instances of property are not behaving properly when inside a displaytag table tag:

    <display:table name="grants" class="its" id="grant">
      <display:column title="PI name" property="piFullName" sortable="true" headerClass="sortable"/>
      <display:column title="RFA PA" sortable="true" headerClass="sortable">
        <s:property value="${grant.rfaPaNumber}" />

The value returned by getRfaPaNumber is a String (for example: PAR98-103). When the above
snippet is used, the displayed value is "-103.0". If I change it to use the JSTL core class,
(c:out in place of s:property), everything displays as expected. Using s:property in other
places seems to work fine as well.

In the above snippet, using the following:

        <s:property value="${'a' + grant.rfaPaNumber}" />

gives a NumberFormatException:

java.lang.NumberFormatException: For input string: "a"
	at java.lang.NumberFormatException.forInputString(
	at java.lang.Long.parseLong(
	at java.lang.Long.<init>(
	at org.apache.el.lang.ELArithmetic$LongDelegate.coerce(
	at org.apache.el.lang.ELArithmetic.coerce(
	at org.apache.el.lang.ELArithmetic.add(
	at org.apache.el.parser.AstPlus.getValue(
	at org.apache.el.ValueExpressionImpl.getValue(
	at org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message