On Mon, Jan 4, 2010 at 4:11 PM, Jim Driscoll <Jim.Driscoll_at_sun.com> wrote:
>
> 2) I don't know offhand what Exception I'd pick to throw, but I'm sure that
> IOException isn't the one I'd choose. IllegalStateException is probably
> better... though there's probably a better one still that I haven't thought
> of.
Maybe javax.faces.view.facelets.TagException?
I noticed that the check for the presence of the required facet is
checking the attribute map (calling attrs.containsKey(key)) instead of
checking the facet map (by calling getFacet(key)). Is this
intentional?
Oh, also... It looks like it is possible that the previous value for
the "required" variable may survive across loop iterations. That is,
say the first attribute has required="true" and the value for the
attribute is properly specified. We move onto the next iteration of
the loop. The next attribute does not specify required metadata.
Won't the "required" variable still be true when we hit the "if
(required)" block?
Andy