tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Morgan Delagrange <mdela...@yahoo.com>
Subject Re: Dealing with NULL result columns
Date Mon, 09 Apr 2001 15:17:39 GMT
Sure, what I do is assign the column to a variable and
then use the wasNull/wasNotNull tags.  Something like:

<td>
  <sql:getColumn position="2" to="PO"/>
  <sql:wasNotNull>
    <a href="PO.xtp?PO=<%=
pageContext.getAttribute("PO") %>">
      <%= pageContext.getAttribute("PO") %>
    </a>
  </sql:wasNotNull>
  <sql:wasNull>&nbsp;</sql:wasNull>
</td> 

--- Steve Philp <sphilp@ameritech.net> wrote:
> I'm hoping someone can point out a way to work
> around a problem I'm
> experiencing.  My code currently looks like the
> following:
> 
> 	<td>
> 		<a href="PO.xtp?PO=<sql:getColumn position=2/>">
> 			<sql:getColumn position="2"/>
> 		</a>
> 	</td>                           
> 
> 
> How can I gracefully deal with a NULL value being
> returned?  In the case
> of NULL, I'd like to forgo the <a href> and replace
> it with '&nbsp;'.
> 
> Thanks for any help you can provide!  I'm happy to
> provide more
> information/detail if needed.
> 
> -- 
> Steve Philp, MCSE/MCP+I
> Assistant IS Manager
> Advance Packaging Corporation
> sphilp@ameritech.net


=====
Morgan Delagrange
Britannica.com

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

Mime
View raw message