jsr344-experts@javaserverfaces-spec-public.java.net

[jsr344-experts] Re: Fwd: Error handling in case of illegal JSF tag attributes

From: Kito Mann <kito.mann_at_virtua.com>
Date: Tue, 4 Sep 2012 09:14:25 -0400

On Fri, Aug 31, 2012 at 2:09 PM, Frank Caputo <frank_at_frankcaputo.de> wrote:

> Hi Kito,
>
> I love the flexibility of adding custom attributes to any component. IMO
> it is no error, if you have an illegal attribute, because JSF simply
> ignores it. Maybe we should add a warning in development mode (but I'd like
> the option to disable the warning).
>
> Ciao Frank
>

It's way too easy for people to have typos or accidentally add attributes
that they think are supported, but aren't. Consequently, they waste their
time trying to figure out why something doesn't work. Trust me. I see it a
lot.

I remember Facelets did have a warning about incorrect parameters, but I
haven't seen that in JSF 2.x.

>
> Am 31.08.2012 um 15:01 schrieb Kito Mann:
>
> Hello everyone,
>
> This is one thing that's been bothering me for a while; with JSP tags we
> had this feature, but we lost it with Facelets. I know there are probably
> lots of apps that take advantage of the ability to add random attributes in
> specific cases, but most of the time it would cut down on errors if the tag
> would complain about illegal attributes.
>
> Thoughts?
> ___
>
> Kito D. Mann | @kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info |
> @jsfcentral
> +1 203-404-4848 x246
>
> * Listen to the latest headlines in the JSF and Java EE newscast: *
> http://blogs.jsfcentral.com/JSFNewscast/*
> * Sign up for the JSFCentral Newsletter:
> http://oi.vresp.com/?fid=ac048d0e17
>
>
>
> ---------- Forwarded message ----------
> From: Uwe Seimet <Uwe.Seimet_at_seimet.de>
> Date: Thu, Aug 30, 2012 at 5:33 PM
> Subject: Error handling in case of illegal JSF tag attributes
> To: users_at_javaserverfaces.java.net
>
>
> Hi all,
>
> I wonder if there is any way to enable a better error handling if an
> illegal
> JSF tag attribute was specified. In this fragment (taken from a Facelet
> page):
>
> <h:panelGroup abc="xyz">
> </h:panelGroup>
>
> the attribute 'abc' is obviously illegal. Nevertheless Mojarra 2.1.x
> does not report any problem. Is there any way to tell Mojarra not to
> silently ignore errors like this?
>
> Regards
>
> Uwe
>
> --
> -----------------------------------------------------------------------
> Dr. Uwe Seimet http://www.seimet.de/
>
>
>
>