You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by James Watkin <ja...@anderson.ucla.edu> on 2003/12/09 01:31:13 UTC
Default Value Escaping
Request for a new feature, I think:
I'd like to be able to turn off escaping for the default value in the
<c:out> tag, but not the regular value if it exists.
Here's what I'm trying to do:
When displaying HTML tables that contain CSS borders, I need to put a blank
value( ) in those cells that contain null values, otherwise the
borders won't appear correctly. This is a common requirement.
With JSTL 1.0, there's a problem if I try to use this pattern:
<td><c:out value="${someVariable}" default=" " escapeXml="false"/></td>
The problem is that I want escaping turned on for the regular variable
value, if it exists. Perhaps there should be two new attributes for the
<c:out> tag: valueEscapeXml and defaultEscapeXml.
- Jim
______________________________
James Watkin
ACIS Software Development
The Anderson School at UCLA
james.watkin@anderson.ucla.edu
Voice: 1-310-825-5030
Fax: 1-310-825-4835
______________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: Default Value Escaping
Posted by James Watkin <ja...@anderson.ucla.edu>.
I had considered your suggestion, but I was worried that this could throw
off the formatting in some cases. Also, there may be cases in the future
when I might want a more complicated default value that includes some
visible HTML.
- Jim
At 07:49 PM 12/8/2003 -0500, you wrote:
>James Watkin wrote:
>>With JSTL 1.0, there's a problem if I try to use this pattern:
>><td><c:out value="${someVariable}" default=" " escapeXml="false"/></td>
>
>I usually just do:
>
><c:out value="${someVariable}" /> </td>
>
>The extra in most cases has no effect on how the HTML is rendered.
>
>--
>Serge Knystautas
>President
>Lokitech >>> software . strategy . design >> http://www.lokitech.com
>p. 301.656.5501
>e. sergek@lokitech.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
______________________________
James Watkin
ACIS Software Development
The Anderson School at UCLA
james.watkin@anderson.ucla.edu
Voice: 1-310-825-5030
Fax: 1-310-825-4835
______________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: Default Value Escaping
Posted by Serge Knystautas <se...@lokitech.com>.
James Watkin wrote:
> With JSTL 1.0, there's a problem if I try to use this pattern:
> <td><c:out value="${someVariable}" default=" "
> escapeXml="false"/></td>
I usually just do:
<c:out value="${someVariable}" /> </td>
The extra in most cases has no effect on how the HTML is rendered.
--
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: Default Value Escaping
Posted by Nic Werner <ni...@link11.net>.
I had fun with:
<c:choose><c:when test="${empty main.outlet_no
}"> </c:when><c:otherwise><c:out
value="${main.outlet_no}"/></c:otherwise></c:choose>
- Nic Werner
> Request for a new feature, I think:
>
> I'd like to be able to turn off escaping for the default value in the
> <c:out> tag, but not the regular value if it exists.
>
> Here's what I'm trying to do:
> When displaying HTML tables that contain CSS borders, I need to put a
> blank value( ) in those cells that contain null values, otherwise
> the borders won't appear correctly. This is a common requirement.
>
> With JSTL 1.0, there's a problem if I try to use this pattern:
> <td><c:out value="${someVariable}" default=" "
> escapeXml="false"/></td>
>
> The problem is that I want escaping turned on for the regular variable
> value, if it exists. Perhaps there should be two new attributes for the
> <c:out> tag: valueEscapeXml and defaultEscapeXml.
>
> - Jim
>
> ______________________________
> James Watkin
> ACIS Software Development
> The Anderson School at UCLA
> james.watkin@anderson.ucla.edu
> Voice: 1-310-825-5030
> Fax: 1-310-825-4835
> ______________________________
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: taglibs-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org