You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2016/08/17 07:56:56 UTC

Throw exception when setOutputMarkupId() on non-renderable component

Hi,

What do you think on adding a new setting to ExceptionSettings that says
whether to log a WARN (default, as it does now) or to throw exception when
setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on component
with #setRenderBodyOnly(true) or attached to <wicket:container> ?

I've had few occasions in the past few months where colleagues of mine use
<wicket:container> and later try to update it with Ajax. The WARN log is
buried amongst other logs (and developers usually simply ignore WARNs) and
I see it is hard for them to find out the reason.

If the setting proves to be useful then we can throw an exception in DEV
mode and log a WARN in PROD mode.

https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c369f3a56b1/wicket-core/src/main/java/org/apache/wicket/Component.java#L4019-L4035


Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Sven Meier <sv...@meiers.net>.
+1

Sven


On 17.08.2016 09:59, Maxim Solodovnik wrote:
> +1 for "throw an exception in DEV mode and log a WARN in PROD mode"
>
> On Wed, Aug 17, 2016 at 2:56 PM, Martin Grigorov <mg...@apache.org>
> wrote:
>
>> Hi,
>>
>> What do you think on adding a new setting to ExceptionSettings that says
>> whether to log a WARN (default, as it does now) or to throw exception when
>> setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on component
>> with #setRenderBodyOnly(true) or attached to <wicket:container> ?
>>
>> I've had few occasions in the past few months where colleagues of mine use
>> <wicket:container> and later try to update it with Ajax. The WARN log is
>> buried amongst other logs (and developers usually simply ignore WARNs) and
>> I see it is hard for them to find out the reason.
>>
>> If the setting proves to be useful then we can throw an exception in DEV
>> mode and log a WARN in PROD mode.
>>
>> https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
>> 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
>> Component.java#L4019-L4035
>>
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>
>


Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Sebastien <se...@gmail.com>.
+1 too

On Aug 17, 2016 21:24, "Carl-Eric Menzel" <cm...@wicketbuch.de> wrote:

> +1 for that.
>
> On Wed, 17 Aug 2016 14:59:03 +0700
> Maxim Solodovnik <so...@gmail.com> wrote:
>
> > +1 for "throw an exception in DEV mode and log a WARN in PROD mode"
> >
> > On Wed, Aug 17, 2016 at 2:56 PM, Martin Grigorov
> > <mg...@apache.org> wrote:
> >
> > > Hi,
> > >
> > > What do you think on adding a new setting to ExceptionSettings that
> > > says whether to log a WARN (default, as it does now) or to throw
> > > exception when setOutputMarkupId/setOutputMarkupPlaceholderTag()
> > > are used on component with #setRenderBodyOnly(true) or attached to
> > > <wicket:container> ?
> > >
> > > I've had few occasions in the past few months where colleagues of
> > > mine use <wicket:container> and later try to update it with Ajax.
> > > The WARN log is buried amongst other logs (and developers usually
> > > simply ignore WARNs) and I see it is hard for them to find out the
> > > reason.
> > >
> > > If the setting proves to be useful then we can throw an exception
> > > in DEV mode and log a WARN in PROD mode.
> > >
> > > https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
> > > 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
> > > Component.java#L4019-L4035
> > >
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> >
> >
> >
>
>

Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Carl-Eric Menzel <cm...@wicketbuch.de>.
+1 for that.

On Wed, 17 Aug 2016 14:59:03 +0700
Maxim Solodovnik <so...@gmail.com> wrote:

> +1 for "throw an exception in DEV mode and log a WARN in PROD mode"
> 
> On Wed, Aug 17, 2016 at 2:56 PM, Martin Grigorov
> <mg...@apache.org> wrote:
> 
> > Hi,
> >
> > What do you think on adding a new setting to ExceptionSettings that
> > says whether to log a WARN (default, as it does now) or to throw
> > exception when setOutputMarkupId/setOutputMarkupPlaceholderTag()
> > are used on component with #setRenderBodyOnly(true) or attached to
> > <wicket:container> ?
> >
> > I've had few occasions in the past few months where colleagues of
> > mine use <wicket:container> and later try to update it with Ajax.
> > The WARN log is buried amongst other logs (and developers usually
> > simply ignore WARNs) and I see it is hard for them to find out the
> > reason.
> >
> > If the setting proves to be useful then we can throw an exception
> > in DEV mode and log a WARN in PROD mode.
> >
> > https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
> > 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
> > Component.java#L4019-L4035
> >
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >  
> 
> 
> 


Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Maxim Solodovnik <so...@gmail.com>.
+1 for "throw an exception in DEV mode and log a WARN in PROD mode"

On Wed, Aug 17, 2016 at 2:56 PM, Martin Grigorov <mg...@apache.org>
wrote:

> Hi,
>
> What do you think on adding a new setting to ExceptionSettings that says
> whether to log a WARN (default, as it does now) or to throw exception when
> setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on component
> with #setRenderBodyOnly(true) or attached to <wicket:container> ?
>
> I've had few occasions in the past few months where colleagues of mine use
> <wicket:container> and later try to update it with Ajax. The WARN log is
> buried amongst other logs (and developers usually simply ignore WARNs) and
> I see it is hard for them to find out the reason.
>
> If the setting proves to be useful then we can throw an exception in DEV
> mode and log a WARN in PROD mode.
>
> https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
> 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
> Component.java#L4019-L4035
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>



-- 
WBR
Maxim aka solomax

Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Martin Grigorov <mg...@apache.org>.
Thanks!

I've created https://issues.apache.org/jira/browse/WICKET-6229 to track it!

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Aug 19, 2016 at 8:06 AM, Pedro Santos <pe...@gmail.com> wrote:

> +1
>
> Pedro Santos
>
> On Thu, Aug 18, 2016 at 7:56 AM, Andrea Del Bene <an...@gmail.com>
> wrote:
>
> > +1 for me too
> >
> >
> >
> > On 18/08/2016 00:47, Martijn Dashorst wrote:
> >
> >> Sounds good to me
> >>
> >> Martijn
> >>
> >> On Wednesday, 17 August 2016, Martin Grigorov <mg...@apache.org>
> >> wrote:
> >>
> >> Hi,
> >>>
> >>> What do you think on adding a new setting to ExceptionSettings that
> says
> >>> whether to log a WARN (default, as it does now) or to throw exception
> >>> when
> >>> setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on
> component
> >>> with #setRenderBodyOnly(true) or attached to <wicket:container> ?
> >>>
> >>> I've had few occasions in the past few months where colleagues of mine
> >>> use
> >>> <wicket:container> and later try to update it with Ajax. The WARN log
> is
> >>> buried amongst other logs (and developers usually simply ignore WARNs)
> >>> and
> >>> I see it is hard for them to find out the reason.
> >>>
> >>> If the setting proves to be useful then we can throw an exception in
> DEV
> >>> mode and log a WARN in PROD mode.
> >>>
> >>> https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
> >>> 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
> >>> Component.java#L4019-L4035
> >>>
> >>>
> >>> Martin Grigorov
> >>> Wicket Training and Consulting
> >>> https://twitter.com/mtgrigorov
> >>>
> >>>
> >>
> >
>

Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Pedro Santos <pe...@gmail.com>.
+1

Pedro Santos

On Thu, Aug 18, 2016 at 7:56 AM, Andrea Del Bene <an...@gmail.com>
wrote:

> +1 for me too
>
>
>
> On 18/08/2016 00:47, Martijn Dashorst wrote:
>
>> Sounds good to me
>>
>> Martijn
>>
>> On Wednesday, 17 August 2016, Martin Grigorov <mg...@apache.org>
>> wrote:
>>
>> Hi,
>>>
>>> What do you think on adding a new setting to ExceptionSettings that says
>>> whether to log a WARN (default, as it does now) or to throw exception
>>> when
>>> setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on component
>>> with #setRenderBodyOnly(true) or attached to <wicket:container> ?
>>>
>>> I've had few occasions in the past few months where colleagues of mine
>>> use
>>> <wicket:container> and later try to update it with Ajax. The WARN log is
>>> buried amongst other logs (and developers usually simply ignore WARNs)
>>> and
>>> I see it is hard for them to find out the reason.
>>>
>>> If the setting proves to be useful then we can throw an exception in DEV
>>> mode and log a WARN in PROD mode.
>>>
>>> https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
>>> 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
>>> Component.java#L4019-L4035
>>>
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>>
>>>
>>
>

Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Andrea Del Bene <an...@gmail.com>.
+1 for me too


On 18/08/2016 00:47, Martijn Dashorst wrote:
> Sounds good to me
>
> Martijn
>
> On Wednesday, 17 August 2016, Martin Grigorov <mg...@apache.org> wrote:
>
>> Hi,
>>
>> What do you think on adding a new setting to ExceptionSettings that says
>> whether to log a WARN (default, as it does now) or to throw exception when
>> setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on component
>> with #setRenderBodyOnly(true) or attached to <wicket:container> ?
>>
>> I've had few occasions in the past few months where colleagues of mine use
>> <wicket:container> and later try to update it with Ajax. The WARN log is
>> buried amongst other logs (and developers usually simply ignore WARNs) and
>> I see it is hard for them to find out the reason.
>>
>> If the setting proves to be useful then we can throw an exception in DEV
>> mode and log a WARN in PROD mode.
>>
>> https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
>> 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
>> Component.java#L4019-L4035
>>
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>>
>


Re: Throw exception when setOutputMarkupId() on non-renderable component

Posted by Martijn Dashorst <ma...@gmail.com>.
Sounds good to me

Martijn

On Wednesday, 17 August 2016, Martin Grigorov <mg...@apache.org> wrote:

> Hi,
>
> What do you think on adding a new setting to ExceptionSettings that says
> whether to log a WARN (default, as it does now) or to throw exception when
> setOutputMarkupId/setOutputMarkupPlaceholderTag() are used on component
> with #setRenderBodyOnly(true) or attached to <wicket:container> ?
>
> I've had few occasions in the past few months where colleagues of mine use
> <wicket:container> and later try to update it with Ajax. The WARN log is
> buried amongst other logs (and developers usually simply ignore WARNs) and
> I see it is hard for them to find out the reason.
>
> If the setting proves to be useful then we can throw an exception in DEV
> mode and log a WARN in PROD mode.
>
> https://github.com/apache/wicket/blob/bec52515f1bb2570f09140ba6f457c
> 369f3a56b1/wicket-core/src/main/java/org/apache/wicket/
> Component.java#L4019-L4035
>
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>


-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com