You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Heath Borders <he...@gmail.com> on 2005/03/21 04:31:01 UTC

Warning messages

Do you guys think we should have warning messages for things we know
will cause components to not function properly, and then have a
variable in the web.xml to turn it off?

Specifically, I spent about 30 emails trying to get to the bottom of
someone's converter problem, when it turned out that he didn't have
his menu inside an <h:form />.

We could have warning messages for all components that need forms, or
for components using the "for" attribute that cannot find their parent
component, etc.

These could all be enabled by default.

Then, there could be a context-variable named
"org.apache.myfaces.warnings" which could be set to "false" or "true"
to turn it off or on.

This would also disable messages like invalid children when a
component is looking for <f:selectItems /> (and variants).  And the
invalid columns attribute on <h:panelGrid />

This would probably help out newbies a lot.

It should be on by default because experienced people will know to
turn it off, and newbies won't.


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: Warning messages

Posted by Heath Borders <he...@gmail.com>.
Ok.  I'll write up a utility class to do this.  Then, we can just
start dropping it in the renderers.


On Mon, 21 Mar 2005 08:05:13 -0500, Sean Schofield
<se...@gmail.com> wrote:
> +1
> 
> 
> On Mon, 21 Mar 2005 07:41:02 -0400, Sylvain Vieujot <sv...@apache.org> wrote:
> >  +1 too.
> >
> >
> >  On Mon, 2005-03-21 at 12:33 +0100, Martin Marinschek wrote:
> >  +1 from me! I am always for more logging, more warning, more writing to
> > standard out if it is possible to switch that off again... regards, Martin
> > On Mon, 21 Mar 2005 09:49:22 +0100, Bruno Aranda <br...@gmail.com>
> > wrote: > I thought the same after those emails. Forgetting the form tags is
> > a > common mistake and people always think that the problem is some >
> > component that return null. Warning messages for this would be very >
> > helpful to newbies... > > Bruno > > On Sun, 20 Mar 2005 21:31:01 -0600,
> > Heath Borders > <he...@gmail.com> wrote: > > Do you guys think we
> > should have warning messages for things we know > > will cause components to
> > not function properly, and then have a > > variable in the web.xml to turn
> > it off? > > > > Specifically, I spent about 30 emails trying to get to the
> > bottom of > > someone's converter problem, when it turned out that he didn't
> > have > > his menu inside an <h:form />. > > > > We could have warning
> > messages for all components that need forms, or > > for components using the
> > "for" attribute that cannot find their parent > > component, etc. > > > >
> > These could all be enabled by default. > > > > Then, there could be a
> > context-variable named > > "org.apache.myfaces.warnings" which could be set
> > to "false" or "true" > > to turn it off or on. > > > > This would also
> > disable messages like invalid children when a > > component is looking for
> > <f:selectItems /> (and variants). And the > > invalid columns attribute on
> > <h:panelGrid /> > > > > This would probably help out newbies a lot. > > > >
> > It should be on by default because experienced people will know to > > turn
> > it off, and newbies won't. > > > > -- > > -Heath Borders-Wing > >
> > hborders@mail.win.org > > >
> 


-- 
-Heath Borders-Wing
hborders@mail.win.org

Re: Warning messages

Posted by Sean Schofield <se...@gmail.com>.
+1


On Mon, 21 Mar 2005 07:41:02 -0400, Sylvain Vieujot <sv...@apache.org> wrote:
>  +1 too.
> 
>  
>  On Mon, 2005-03-21 at 12:33 +0100, Martin Marinschek wrote: 
>  +1 from me! I am always for more logging, more warning, more writing to
> standard out if it is possible to switch that off again... regards, Martin
> On Mon, 21 Mar 2005 09:49:22 +0100, Bruno Aranda <br...@gmail.com>
> wrote: > I thought the same after those emails. Forgetting the form tags is
> a > common mistake and people always think that the problem is some >
> component that return null. Warning messages for this would be very >
> helpful to newbies... > > Bruno > > On Sun, 20 Mar 2005 21:31:01 -0600,
> Heath Borders > <he...@gmail.com> wrote: > > Do you guys think we
> should have warning messages for things we know > > will cause components to
> not function properly, and then have a > > variable in the web.xml to turn
> it off? > > > > Specifically, I spent about 30 emails trying to get to the
> bottom of > > someone's converter problem, when it turned out that he didn't
> have > > his menu inside an <h:form />. > > > > We could have warning
> messages for all components that need forms, or > > for components using the
> "for" attribute that cannot find their parent > > component, etc. > > > >
> These could all be enabled by default. > > > > Then, there could be a
> context-variable named > > "org.apache.myfaces.warnings" which could be set
> to "false" or "true" > > to turn it off or on. > > > > This would also
> disable messages like invalid children when a > > component is looking for
> <f:selectItems /> (and variants). And the > > invalid columns attribute on
> <h:panelGrid /> > > > > This would probably help out newbies a lot. > > > >
> It should be on by default because experienced people will know to > > turn
> it off, and newbies won't. > > > > -- > > -Heath Borders-Wing > >
> hborders@mail.win.org > > >

Re: Warning messages

Posted by Sylvain Vieujot <sv...@apache.org>.
+1 too.

On Mon, 2005-03-21 at 12:33 +0100, Martin Marinschek wrote:

> +1 from me!
> 
> I am always for more logging, more warning, more writing to standard
> out if it is possible to switch that off again...
> 
> regards,
> 
> Martin
> 
> 
> On Mon, 21 Mar 2005 09:49:22 +0100, Bruno Aranda <br...@gmail.com> wrote:
> > I thought the same after those emails. Forgetting the form tags is a
> > common mistake and people always think that the problem is some
> > component that return null. Warning messages for this would be very
> > helpful to newbies...
> > 
> > Bruno
> > 
> > On Sun, 20 Mar 2005 21:31:01 -0600, Heath Borders
> > <he...@gmail.com> wrote:
> > > Do you guys think we should have warning messages for things we know
> > > will cause components to not function properly, and then have a
> > > variable in the web.xml to turn it off?
> > >
> > > Specifically, I spent about 30 emails trying to get to the bottom of
> > > someone's converter problem, when it turned out that he didn't have
> > > his menu inside an <h:form />.
> > >
> > > We could have warning messages for all components that need forms, or
> > > for components using the "for" attribute that cannot find their parent
> > > component, etc.
> > >
> > > These could all be enabled by default.
> > >
> > > Then, there could be a context-variable named
> > > "org.apache.myfaces.warnings" which could be set to "false" or "true"
> > > to turn it off or on.
> > >
> > > This would also disable messages like invalid children when a
> > > component is looking for <f:selectItems /> (and variants).  And the
> > > invalid columns attribute on <h:panelGrid />
> > >
> > > This would probably help out newbies a lot.
> > >
> > > It should be on by default because experienced people will know to
> > > turn it off, and newbies won't.
> > >
> > > --
> > > -Heath Borders-Wing
> > > hborders@mail.win.org
> > >
> >

Re: Warning messages

Posted by Martin Marinschek <ma...@gmail.com>.
+1 from me!

I am always for more logging, more warning, more writing to standard
out if it is possible to switch that off again...

regards,

Martin


On Mon, 21 Mar 2005 09:49:22 +0100, Bruno Aranda <br...@gmail.com> wrote:
> I thought the same after those emails. Forgetting the form tags is a
> common mistake and people always think that the problem is some
> component that return null. Warning messages for this would be very
> helpful to newbies...
> 
> Bruno
> 
> On Sun, 20 Mar 2005 21:31:01 -0600, Heath Borders
> <he...@gmail.com> wrote:
> > Do you guys think we should have warning messages for things we know
> > will cause components to not function properly, and then have a
> > variable in the web.xml to turn it off?
> >
> > Specifically, I spent about 30 emails trying to get to the bottom of
> > someone's converter problem, when it turned out that he didn't have
> > his menu inside an <h:form />.
> >
> > We could have warning messages for all components that need forms, or
> > for components using the "for" attribute that cannot find their parent
> > component, etc.
> >
> > These could all be enabled by default.
> >
> > Then, there could be a context-variable named
> > "org.apache.myfaces.warnings" which could be set to "false" or "true"
> > to turn it off or on.
> >
> > This would also disable messages like invalid children when a
> > component is looking for <f:selectItems /> (and variants).  And the
> > invalid columns attribute on <h:panelGrid />
> >
> > This would probably help out newbies a lot.
> >
> > It should be on by default because experienced people will know to
> > turn it off, and newbies won't.
> >
> > --
> > -Heath Borders-Wing
> > hborders@mail.win.org
> >
>

Re: Warning messages

Posted by Bruno Aranda <br...@gmail.com>.
I thought the same after those emails. Forgetting the form tags is a
common mistake and people always think that the problem is some
component that return null. Warning messages for this would be very
helpful to newbies...

Bruno


On Sun, 20 Mar 2005 21:31:01 -0600, Heath Borders
<he...@gmail.com> wrote:
> Do you guys think we should have warning messages for things we know
> will cause components to not function properly, and then have a
> variable in the web.xml to turn it off?
> 
> Specifically, I spent about 30 emails trying to get to the bottom of
> someone's converter problem, when it turned out that he didn't have
> his menu inside an <h:form />.
> 
> We could have warning messages for all components that need forms, or
> for components using the "for" attribute that cannot find their parent
> component, etc.
> 
> These could all be enabled by default.
> 
> Then, there could be a context-variable named
> "org.apache.myfaces.warnings" which could be set to "false" or "true"
> to turn it off or on.
> 
> This would also disable messages like invalid children when a
> component is looking for <f:selectItems /> (and variants).  And the
> invalid columns attribute on <h:panelGrid />
> 
> This would probably help out newbies a lot.
> 
> It should be on by default because experienced people will know to
> turn it off, and newbies won't.
> 
> --
> -Heath Borders-Wing
> hborders@mail.win.org
>