Re: Issue using Wicket Bootstap Less

2016-09-28 Thread Martin Grigorov
Done!
0.9.19 and 0.10.9 are on their way to Maven Central!
Enjoy!

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

On Wed, Sep 28, 2016 at 9:46 AM, Martin Grigorov 
wrote:

> Releases are cheap!
> I'll do it today!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Sep 28, 2016 at 9:40 AM, Erik Strid  wrote:
>
>> Hi Martin,
>>
>> Thank you for your fast response to the pull request!
>>
>> How often is the wicket-boostrap project released?
>>
>> We have tested the snapshot in our test environment and we think the
>> solution works as intended. We would like to have a correct release before
>> releasing the whole solution to the real world. This will happen within
>> 3-4
>> weeks. Is it possible to get a release in that time frame?
>>
>> Regards
>> Erik
>>
>> On Thu, Sep 22, 2016 at 9:26 PM, Martin Grigorov 
>> wrote:
>>
>> > Merged!
>> > Thanks a lot!
>> >
>> > Martin Grigorov
>> > Wicket Training and Consulting
>> > https://twitter.com/mtgrigorov
>> >
>> > On Thu, Sep 22, 2016 at 1:11 PM, Erik Strid 
>> wrote:
>> >
>> > > Hi Martin,
>> > >
>> > > I have created a pull request, see
>> > > https://github.com/l0rdn1kk0n/wicket-bootstrap/pull/636
>> > >
>> > > Regards
>> > > Erik
>> > >
>> > > On Tue, Sep 20, 2016 at 9:08 PM, Martin Grigorov <
>> mgrigo...@apache.org>
>> > > wrote:
>> > >
>> > > > Hi Erik,
>> > > >
>> > > > Many thanks for investigating this!
>> > > >
>> > > > Please create a Pull Request!
>> > > > It seems you already know how to fix it!
>> > > > Thank you!
>> > > >
>> > > > Martin Grigorov
>> > > > Wicket Training and Consulting
>> > > > https://twitter.com/mtgrigorov
>> > > >
>> > > > On Tue, Sep 20, 2016 at 2:16 PM, Erik Strid 
>> > > wrote:
>> > > >
>> > > > > Hi Martin,
>> > > > >
>> > > > > I have finally found some time to investigate this issue further.
>> > > > >
>> > > > > It seems that clearing the cache only will clear the variable
>> > > > contentCache
>> > > > > and not both the contentCache and urlSourceCache variables in
>> > > > > LessCacheManager. A cleared cache will trigger a recompile in
>> > > > > LessCacheManager.getCss(URLSource) on a cached URLSource, in this
>> > case
>> > > > > will
>> > > > > the compiler add the imported files to the importedSources list,
>> > > returned
>> > > > > by AbstractHierarchicalSource.getImportedSources(), once more.
>> And
>> > the
>> > > > > importedSources list will grow with imported files after each
>> call to
>> > > > > clearCache.
>> > > > > The NPE that we get is a result of the shared URLSource and a race
>> > > > > condition in AbstractHierarchicalSource.
>> > addImportedSource(LessSource)
>> > > > > (importedSources isn't thread safe).
>> > > > >
>> > > > > Furthermore I think there is an issue with the
>> > > > > LessCacheManager.getCss(URLSource). For the first file that is
>> > > compiled
>> > > > > will the list of imported sources for lessSource be empty. The
>> > > > > lastModifiedTime will then only contain the timestamp for the file
>> > and
>> > > > not
>> > > > > the last modified time of the file itself or its imports, so the
>> > > > > lastModifiedTime will be incorrect when adding the compiled
>> source to
>> > > the
>> > > > > timeToContentMap the first time.
>> > > > >
>> > > > > You should be able to see these two issues in this commit
>> > > > > https://github.com/strido/wicket-bootstrap/commit/
>> > > > > 2be0d8d4294162bd103e63c74198d90457e6069e
>> > > > >
>> > > > > Should I report this to your issue tracker (
>> > > > > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues)?
>> > > > >
>> > > > > Regards
>> > > > > Erik Strid
>> > > > >
>> > > > > On Tue, Sep 6, 2016 at 10:49 AM, Martin Grigorov <
>> > mgrigo...@apache.org
>> > > >
>> > > > > wrote:
>> > > > >
>> > > > > > Hi,
>> > > > > >
>> > > > > > If the list of imported sources contains "null" then you should
>> ask
>> > > at
>> > > > > > https://github.com/SomMeri/less4j/issues.
>> > > > > >
>> > > > > > What I can do in Wicket-Bootstrap-Less is to add protection
>> against
>> > > > this
>> > > > > > NullPointerException by ignoring all "null"s. But this may lead
>> to
>> > > > broken
>> > > > > > UI!
>> > > > > > Please file an issue at
>> > > > > > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues if you
>> think
>> > > > this
>> > > > > > could help.
>> > > > > >
>> > > > > > Martin Grigorov
>> > > > > > Wicket Training and Consulting
>> > > > > > https://twitter.com/mtgrigorov
>> > > > > >
>> > > > > > On Tue, Sep 6, 2016 at 10:39 AM, Erik Strid <
>> strid.e...@gmail.com>
>> > > > > wrote:
>> > > > > >
>> > > > > > > Hi.
>> > > > > > >
>> > > > > > > We are using Wicket Bootstap Less in our project and have an
>> > issue
>> > > > with
>> > > > > > the
>> > > > > > > Less compilation.
>> > > > > > > From time to time the compilation fails for some of the 

Re: Issue using Wicket Bootstap Less

2016-09-28 Thread Martin Grigorov
Releases are cheap!
I'll do it today!

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

On Wed, Sep 28, 2016 at 9:40 AM, Erik Strid  wrote:

> Hi Martin,
>
> Thank you for your fast response to the pull request!
>
> How often is the wicket-boostrap project released?
>
> We have tested the snapshot in our test environment and we think the
> solution works as intended. We would like to have a correct release before
> releasing the whole solution to the real world. This will happen within 3-4
> weeks. Is it possible to get a release in that time frame?
>
> Regards
> Erik
>
> On Thu, Sep 22, 2016 at 9:26 PM, Martin Grigorov 
> wrote:
>
> > Merged!
> > Thanks a lot!
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Thu, Sep 22, 2016 at 1:11 PM, Erik Strid 
> wrote:
> >
> > > Hi Martin,
> > >
> > > I have created a pull request, see
> > > https://github.com/l0rdn1kk0n/wicket-bootstrap/pull/636
> > >
> > > Regards
> > > Erik
> > >
> > > On Tue, Sep 20, 2016 at 9:08 PM, Martin Grigorov  >
> > > wrote:
> > >
> > > > Hi Erik,
> > > >
> > > > Many thanks for investigating this!
> > > >
> > > > Please create a Pull Request!
> > > > It seems you already know how to fix it!
> > > > Thank you!
> > > >
> > > > Martin Grigorov
> > > > Wicket Training and Consulting
> > > > https://twitter.com/mtgrigorov
> > > >
> > > > On Tue, Sep 20, 2016 at 2:16 PM, Erik Strid 
> > > wrote:
> > > >
> > > > > Hi Martin,
> > > > >
> > > > > I have finally found some time to investigate this issue further.
> > > > >
> > > > > It seems that clearing the cache only will clear the variable
> > > > contentCache
> > > > > and not both the contentCache and urlSourceCache variables in
> > > > > LessCacheManager. A cleared cache will trigger a recompile in
> > > > > LessCacheManager.getCss(URLSource) on a cached URLSource, in this
> > case
> > > > > will
> > > > > the compiler add the imported files to the importedSources list,
> > > returned
> > > > > by AbstractHierarchicalSource.getImportedSources(), once more. And
> > the
> > > > > importedSources list will grow with imported files after each call
> to
> > > > > clearCache.
> > > > > The NPE that we get is a result of the shared URLSource and a race
> > > > > condition in AbstractHierarchicalSource.
> > addImportedSource(LessSource)
> > > > > (importedSources isn't thread safe).
> > > > >
> > > > > Furthermore I think there is an issue with the
> > > > > LessCacheManager.getCss(URLSource). For the first file that is
> > > compiled
> > > > > will the list of imported sources for lessSource be empty. The
> > > > > lastModifiedTime will then only contain the timestamp for the file
> > and
> > > > not
> > > > > the last modified time of the file itself or its imports, so the
> > > > > lastModifiedTime will be incorrect when adding the compiled source
> to
> > > the
> > > > > timeToContentMap the first time.
> > > > >
> > > > > You should be able to see these two issues in this commit
> > > > > https://github.com/strido/wicket-bootstrap/commit/
> > > > > 2be0d8d4294162bd103e63c74198d90457e6069e
> > > > >
> > > > > Should I report this to your issue tracker (
> > > > > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues)?
> > > > >
> > > > > Regards
> > > > > Erik Strid
> > > > >
> > > > > On Tue, Sep 6, 2016 at 10:49 AM, Martin Grigorov <
> > mgrigo...@apache.org
> > > >
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > If the list of imported sources contains "null" then you should
> ask
> > > at
> > > > > > https://github.com/SomMeri/less4j/issues.
> > > > > >
> > > > > > What I can do in Wicket-Bootstrap-Less is to add protection
> against
> > > > this
> > > > > > NullPointerException by ignoring all "null"s. But this may lead
> to
> > > > broken
> > > > > > UI!
> > > > > > Please file an issue at
> > > > > > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues if you
> think
> > > > this
> > > > > > could help.
> > > > > >
> > > > > > Martin Grigorov
> > > > > > Wicket Training and Consulting
> > > > > > https://twitter.com/mtgrigorov
> > > > > >
> > > > > > On Tue, Sep 6, 2016 at 10:39 AM, Erik Strid <
> strid.e...@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > > Hi.
> > > > > > >
> > > > > > > We are using Wicket Bootstap Less in our project and have an
> > issue
> > > > with
> > > > > > the
> > > > > > > Less compilation.
> > > > > > > From time to time the compilation fails for some of the Less
> > files
> > > in
> > > > > our
> > > > > > > project, usually we see this in our Selenium Grid but it have
> > > > happened
> > > > > > > locally as well.
> > > > > > >
> > > > > > > When the compilation fails we get this stacktrace:
> > > > > > >
> > > > > > > java.lang.NullPointerException: null
> > > > > > > at
> > > > > > > 

Re: Issue using Wicket Bootstap Less

2016-09-28 Thread Erik Strid
Hi Martin,

Thank you for your fast response to the pull request!

How often is the wicket-boostrap project released?

We have tested the snapshot in our test environment and we think the
solution works as intended. We would like to have a correct release before
releasing the whole solution to the real world. This will happen within 3-4
weeks. Is it possible to get a release in that time frame?

Regards
Erik

On Thu, Sep 22, 2016 at 9:26 PM, Martin Grigorov 
wrote:

> Merged!
> Thanks a lot!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Thu, Sep 22, 2016 at 1:11 PM, Erik Strid  wrote:
>
> > Hi Martin,
> >
> > I have created a pull request, see
> > https://github.com/l0rdn1kk0n/wicket-bootstrap/pull/636
> >
> > Regards
> > Erik
> >
> > On Tue, Sep 20, 2016 at 9:08 PM, Martin Grigorov 
> > wrote:
> >
> > > Hi Erik,
> > >
> > > Many thanks for investigating this!
> > >
> > > Please create a Pull Request!
> > > It seems you already know how to fix it!
> > > Thank you!
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Tue, Sep 20, 2016 at 2:16 PM, Erik Strid 
> > wrote:
> > >
> > > > Hi Martin,
> > > >
> > > > I have finally found some time to investigate this issue further.
> > > >
> > > > It seems that clearing the cache only will clear the variable
> > > contentCache
> > > > and not both the contentCache and urlSourceCache variables in
> > > > LessCacheManager. A cleared cache will trigger a recompile in
> > > > LessCacheManager.getCss(URLSource) on a cached URLSource, in this
> case
> > > > will
> > > > the compiler add the imported files to the importedSources list,
> > returned
> > > > by AbstractHierarchicalSource.getImportedSources(), once more. And
> the
> > > > importedSources list will grow with imported files after each call to
> > > > clearCache.
> > > > The NPE that we get is a result of the shared URLSource and a race
> > > > condition in AbstractHierarchicalSource.
> addImportedSource(LessSource)
> > > > (importedSources isn't thread safe).
> > > >
> > > > Furthermore I think there is an issue with the
> > > > LessCacheManager.getCss(URLSource). For the first file that is
> > compiled
> > > > will the list of imported sources for lessSource be empty. The
> > > > lastModifiedTime will then only contain the timestamp for the file
> and
> > > not
> > > > the last modified time of the file itself or its imports, so the
> > > > lastModifiedTime will be incorrect when adding the compiled source to
> > the
> > > > timeToContentMap the first time.
> > > >
> > > > You should be able to see these two issues in this commit
> > > > https://github.com/strido/wicket-bootstrap/commit/
> > > > 2be0d8d4294162bd103e63c74198d90457e6069e
> > > >
> > > > Should I report this to your issue tracker (
> > > > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues)?
> > > >
> > > > Regards
> > > > Erik Strid
> > > >
> > > > On Tue, Sep 6, 2016 at 10:49 AM, Martin Grigorov <
> mgrigo...@apache.org
> > >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > If the list of imported sources contains "null" then you should ask
> > at
> > > > > https://github.com/SomMeri/less4j/issues.
> > > > >
> > > > > What I can do in Wicket-Bootstrap-Less is to add protection against
> > > this
> > > > > NullPointerException by ignoring all "null"s. But this may lead to
> > > broken
> > > > > UI!
> > > > > Please file an issue at
> > > > > https://github.com/l0rdn1kk0n/wicket-bootstrap/issues if you think
> > > this
> > > > > could help.
> > > > >
> > > > > Martin Grigorov
> > > > > Wicket Training and Consulting
> > > > > https://twitter.com/mtgrigorov
> > > > >
> > > > > On Tue, Sep 6, 2016 at 10:39 AM, Erik Strid 
> > > > wrote:
> > > > >
> > > > > > Hi.
> > > > > >
> > > > > > We are using Wicket Bootstap Less in our project and have an
> issue
> > > with
> > > > > the
> > > > > > Less compilation.
> > > > > > From time to time the compilation fails for some of the Less
> files
> > in
> > > > our
> > > > > > project, usually we see this in our Selenium Grid but it have
> > > happened
> > > > > > locally as well.
> > > > > >
> > > > > > When the compilation fails we get this stacktrace:
> > > > > >
> > > > > > java.lang.NullPointerException: null
> > > > > > at
> > > > > > de.agilecoders.wicket.less.LessCacheManager.findLastModified(
> > > > > > LessCacheManager.java:159)
> > > > > > ~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
> > > > > > at
> > > > > > de.agilecoders.wicket.less.LessCacheManager.findLastModified(
> > > > > > LessCacheManager.java:165)
> > > > > > ~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
> > > > > > at
> > > > > > de.agilecoders.wicket.less.LessCacheManager.getLastModifiedTime(
> > > > > > LessCacheManager.java:145)
> > > > > > ~[wicket-bootstrap-less-0.9.16.jar:0.9.16]
> > > > > > at
> > > > > 

Aw: Re: Find a component corresponding to entity

2016-09-28 Thread Per Newgro
Thank you both for your statement.
Per

> Gesendet: Mittwoch, 28. September 2016 um 08:34 Uhr
> Von: "Ernesto Reinaldo Barreiro" 
> An: "users@wicket.apache.org" 
> Betreff: Re: Find a component corresponding to entity
>
> Per,
> 
> I normally do it the static factory way.. but Spring might give you the
> advantage for testing (e.g in some situation just pass something that
> creates an empty panels, or anything else). As Martin said, this is not
> something Wicket cares about.
> 
> On Wed, Sep 28, 2016 at 8:04 AM, Per Newgro  wrote:
> 
> > Hello *,
> >
> > I'm looking for an elegant solution to determine a component for an entity.
> >
> > Example:
> > There is a person and two sub-types of it - Manager and Sportsman.
> > The Manager can be listed in a listview by using a ManagerViewItem
> > and the Sportsman by using a SportsmanViewItem.
> >
> > Currently I'm using a factory producing the appropriate viewitems. But
> > this factory is injected by using spring.
> > I would like to reduce the coupling to spring within my component classes
> > (e.g. Page).
> >
> > So i'm looking for a "wicket way" to determine which component is required
> > to list all persons.
> >
> > Thanks for your ideas.
> > Per
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro
> 

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



Re: Find a component corresponding to entity

2016-09-28 Thread Ernesto Reinaldo Barreiro
Per,

I normally do it the static factory way.. but Spring might give you the
advantage for testing (e.g in some situation just pass something that
creates an empty panels, or anything else). As Martin said, this is not
something Wicket cares about.

On Wed, Sep 28, 2016 at 8:04 AM, Per Newgro  wrote:

> Hello *,
>
> I'm looking for an elegant solution to determine a component for an entity.
>
> Example:
> There is a person and two sub-types of it - Manager and Sportsman.
> The Manager can be listed in a listview by using a ManagerViewItem
> and the Sportsman by using a SportsmanViewItem.
>
> Currently I'm using a factory producing the appropriate viewitems. But
> this factory is injected by using spring.
> I would like to reduce the coupling to spring within my component classes
> (e.g. Page).
>
> So i'm looking for a "wicket way" to determine which component is required
> to list all persons.
>
> Thanks for your ideas.
> Per
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: Find a component corresponding to entity

2016-09-28 Thread Martin Grigorov
Hi,

Wicket doesn't prescribe any way for this.
You could use Spring, ServiceLoader, OSGi, static factory, ... Anything
that makes sense in your application.

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

On Wed, Sep 28, 2016 at 8:04 AM, Per Newgro  wrote:

> Hello *,
>
> I'm looking for an elegant solution to determine a component for an entity.
>
> Example:
> There is a person and two sub-types of it - Manager and Sportsman.
> The Manager can be listed in a listview by using a ManagerViewItem
> and the Sportsman by using a SportsmanViewItem.
>
> Currently I'm using a factory producing the appropriate viewitems. But
> this factory is injected by using spring.
> I would like to reduce the coupling to spring within my component classes
> (e.g. Page).
>
> So i'm looking for a "wicket way" to determine which component is required
> to list all persons.
>
> Thanks for your ideas.
> Per
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Find a component corresponding to entity

2016-09-28 Thread Per Newgro
Hello *,

I'm looking for an elegant solution to determine a component for an entity.

Example:
There is a person and two sub-types of it - Manager and Sportsman.
The Manager can be listed in a listview by using a ManagerViewItem
and the Sportsman by using a SportsmanViewItem.

Currently I'm using a factory producing the appropriate viewitems. But this 
factory is injected by using spring.
I would like to reduce the coupling to spring within my component classes (e.g. 
Page).

So i'm looking for a "wicket way" to determine which component is required to 
list all persons.

Thanks for your ideas.
Per

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