RE: [htmltmpl-java] testing for parameter existence
Status: Beta
Brought to you by:
bluesmoon
|
From: Costantino, D. <Dan...@gs...> - 2002-12-11 15:51:18
|
Philip,
Thanks for getting back to me. I did a little more testing and realized my
try {} .. catch {} wrapper really doesn't solve the problem. It turns out
that getParam() will throw a NoSuchElementException exception on a valid
parameter if the parameter's value has not yet been set. I'll stop short of
calling that a bug, but I think it's a serious problem. Is that the
intended behaviour?
Dan
-----Original Message-----
From: Philip S Tellis [mailto:phi...@gm...]
Sent: Tuesday, December 10, 2002 11:51 PM
To: htm...@li...
Subject: Re: [htmltmpl-java] testing for parameter existence
On Tue, 10 Dec 2002, Costantino, Dan wrote:
> I want to test for the existence of a parameter in a template. How
> can I do this without generating a java.util.NoSuchElementException?
>
> At present, I simply wrap each getParam(<test_name>) call around a try ...
Currently this seems to be the only way, but I think it is reasonable
enough to add another method that will do what you want. Expect it in
the next version, or get CVS in a few hours.
Philip
--
"If people could put rainbows in zoos, they'd do it."
-- Hobbes
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Html-tmpl-java-users mailing list
Htm...@li...
https://lists.sourceforge.net/lists/listinfo/html-tmpl-java-users
URL: http://html-tmpl-java.sourceforge.net/
|