You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Daniel Stoch <da...@gmail.com> on 2014/10/02 12:35:11 UTC

Add extra debug information to component markup

Hi,

I want to add extra debug information to component markup or modify
existing wicketpath info.

For now it can be easily done by using a custom default
IMarkupSourcingStrategy which has onComponentTag() method. But inside
Component.getMarkupSourcingStrategy() the default strategy is get
using a static call to a singleton
DefaultMarkupSourcingStrategy.get(). Maybe there should be a method
inside IMarkupSettings:
  IMarkupSourcingStrategy getDefaultMarkupSourcingStrategy()
which can be used in Component.getMarkupSourcingStrategy() instead a
direct call to DefaultMarkupSourcingStrategy.get().

Another solution is to invent another extension point to allow to
customize all components tags, but this described above is very simple
to implement I think.

PS. I want to add some extra information about class names where every
component come from (to allow developers, especially not GUI guys, to
easily find a source code).

--
Daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Add extra debug information to component markup

Posted by Daniel Stoch <da...@gmail.com>.
You are fast :).
I wanted to write about this solution - came to my mind right now :)

--
Thanks,
Daniel

On Thu, Oct 2, 2014 at 12:38 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> You can use Behavior#onComponentTag().
> And IComponentInstantiationListenener to add this behavior to all/some
> components.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Oct 2, 2014 at 12:35 PM, Daniel Stoch <da...@gmail.com>
> wrote:
>
>> Hi,
>>
>> I want to add extra debug information to component markup or modify
>> existing wicketpath info.
>>
>> For now it can be easily done by using a custom default
>> IMarkupSourcingStrategy which has onComponentTag() method. But inside
>> Component.getMarkupSourcingStrategy() the default strategy is get
>> using a static call to a singleton
>> DefaultMarkupSourcingStrategy.get(). Maybe there should be a method
>> inside IMarkupSettings:
>>   IMarkupSourcingStrategy getDefaultMarkupSourcingStrategy()
>> which can be used in Component.getMarkupSourcingStrategy() instead a
>> direct call to DefaultMarkupSourcingStrategy.get().
>>
>> Another solution is to invent another extension point to allow to
>> customize all components tags, but this described above is very simple
>> to implement I think.
>>
>> PS. I want to add some extra information about class names where every
>> component come from (to allow developers, especially not GUI guys, to
>> easily find a source code).
>>
>> --
>> Daniel
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Add extra debug information to component markup

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

You can use Behavior#onComponentTag().
And IComponentInstantiationListenener to add this behavior to all/some
components.

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

On Thu, Oct 2, 2014 at 12:35 PM, Daniel Stoch <da...@gmail.com>
wrote:

> Hi,
>
> I want to add extra debug information to component markup or modify
> existing wicketpath info.
>
> For now it can be easily done by using a custom default
> IMarkupSourcingStrategy which has onComponentTag() method. But inside
> Component.getMarkupSourcingStrategy() the default strategy is get
> using a static call to a singleton
> DefaultMarkupSourcingStrategy.get(). Maybe there should be a method
> inside IMarkupSettings:
>   IMarkupSourcingStrategy getDefaultMarkupSourcingStrategy()
> which can be used in Component.getMarkupSourcingStrategy() instead a
> direct call to DefaultMarkupSourcingStrategy.get().
>
> Another solution is to invent another extension point to allow to
> customize all components tags, but this described above is very simple
> to implement I think.
>
> PS. I want to add some extra information about class names where every
> component come from (to allow developers, especially not GUI guys, to
> easily find a source code).
>
> --
> Daniel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>