Re: Wrapping a FormComponent with a Border

2019-09-03 Thread Tom Götz
Hi Bas and thanks for your input! I guess this would also be my preferred way 
to deal with that task. But this also means that all "client" applications 
would have to be adapted and at least change their HTML markup which I'd like 
to avoid. I'm currently looking for a solution that avoids code changes as far 
as possible in existing client applications (and we have _several_ of those) ...

Any chance you could share some parts of your custom code?

Tom

> Gesendet: Dienstag, 03. September 2019 um 12:19 Uhr
> Von: "Bas Gooren" 
> An: users@wicket.apache.org, "Tom Götz" 
> Betreff: Re: Wrapping a FormComponent with a Border
>
> Hi Tom,
> 
> I have tried various ways to make this work: from custom markup filters and
> component tree manipulation to custom form components, which are added to a
> repeater (and thus the entire form is created programmatically, apart from
> a single div which our FormPanel connects to.
> In other projects I have experimented with rewriting the markup with a
> custom parser, implementing a custom markup cache etc.
> 
> I think, in general, the wicket-way is to not have (too) much magic; This
> also became evident for me when working with markup filters and custom
> markup caches. I got it all to work, but it’s quite complex.
> 
> In my current projects I pick (or mix) from these two strategies:
> 
> a) add the div for a border component to the layout:
> 
> 
> 
> 
> 
> b) use custom form components, and render them with a repeater
> 
> E.g. a TextInput implements Input, which contains the border, input
> component etc.
> The repeater then accepts a list of Input.
> Actually, we added a FormElement base class, since we also want to have
> non-input components in our forms like tabbed panels, information boxes etc.
> 
> In both cases, in your code you know what markup and component tree you are
> dealing with.
> In other words: no magic.
> 
> My 2 cents :-)
> 
> Met vriendelijke groet,
> Kind regards,
> 
> Bas Gooren
> 
> Op 3 september 2019 bij 11:19:06, Tom Götz (t...@richmountain.de) schreef:
> 
> Well ok, I'll give the Panel solution a try. In the panel I will have a
> FormGroup Border and inside that there's my input/textfield. Only thing
> that still worries me:
> user creates the TextField in Java code with wicket:id that he has in it's
> markup file. This wicket:id can't be changed afterwards (final). But in
> MyFormGroupPanel I need markup for the input, and this markup needs an id.
> Hm, maybe I'll look into some repeater solution for that problem ...
> 
> Tom
> 
> 
> > Gesendet: Dienstag, 03. September 2019 um 09:35 Uhr
> > Von: "Martin Grigorov" 
> > An: "users@wicket.apache.org" 
> > Betreff: Re: Wrapping a FormComponent with a Border
> >
> > On Tue, Sep 3, 2019 at 10:30 AM "Tom Götz"  wrote:
> >
> > > Thanks Martin, I will look into that. But won't it be a problem that I
> > > will add the  / TextField to the Border without having any
> markup
> > > inside the Border? Won't I need my  markup inside the border
> > > s?
> > >
> >
> > right! it is a Border, not a Panel (
> >
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-8.x/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/form/FormGroup.html#L9
> > )
> > I think it would be easier if you roll MyFormGroupPanel instead of using
> a
> > Border.
> > If you decide to stick with FormGroup then you will need to override
> > onComponentTagBody() too
> >
> >
> > >
> > > Tom
> > >
> > >
> > > > Gesendet: Dienstag, 03. September 2019 um 09:22 Uhr
> > > > Von: "Martin Grigorov" 
> > > > An: "users@wicket.apache.org" 
> > > > Betreff: Re: Re: Wrapping a FormComponent with a Border
> > > >
> > > > Hi Tom,
> > > >
> > > > Since your "user" is going to add a TextField in the Java code then I
> > > > assume (s)he is going to add  in the markup.
> > > > Your IComponentInitializationListener will replace all components of
> type
> > > > TextField which do not have FormGroup as a parent with a MyFormGroup.
> > > >
> > > > public class MyFormGroup extends FormGroup {
> > > > // constructor(s)
> > > >
> > > > @Override
> > > > public void onComponentTag(ComponentTag tag) {
> > > > super(tag);
> > > > tag.setName("div"); // this modifies  to 
> > > > }
> > > > }
> > > >
> 

Re: Wrapping a FormComponent with a Border

2019-09-03 Thread Tom Götz
Well ok, I'll give the Panel solution a try. In the panel I will have a 
FormGroup Border and inside that there's my input/textfield. Only thing that 
still worries me:
user creates the TextField in Java code with wicket:id that he has in it's 
markup file. This wicket:id can't be changed afterwards (final). But in 
MyFormGroupPanel I need markup for the input, and this markup needs an id. Hm, 
maybe I'll look into some repeater solution for that problem ...

Tom


> Gesendet: Dienstag, 03. September 2019 um 09:35 Uhr
> Von: "Martin Grigorov" 
> An: "users@wicket.apache.org" 
> Betreff: Re: Wrapping a FormComponent with a Border
>
> On Tue, Sep 3, 2019 at 10:30 AM "Tom Götz"  wrote:
> 
> > Thanks Martin, I will look into that. But won't it be a problem that I
> > will add the  / TextField to the Border without having any markup
> > inside the Border? Won't I need my  markup inside the border
> > s?
> >
> 
> right! it is a Border, not a Panel (
> https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/wicket-8.x/bootstrap-core/src/main/java/de/agilecoders/wicket/core/markup/html/bootstrap/form/FormGroup.html#L9
> )
> I think it would be easier if you roll MyFormGroupPanel instead of using a
> Border.
> If you decide to stick with FormGroup then you will need to override
> onComponentTagBody() too
> 
> 
> >
> > Tom
> >
> >
> > > Gesendet: Dienstag, 03. September 2019 um 09:22 Uhr
> > > Von: "Martin Grigorov" 
> > > An: "users@wicket.apache.org" 
> > > Betreff: Re: Re: Wrapping a FormComponent with a Border
> > >
> > > Hi Tom,
> > >
> > > Since your "user" is going to add a TextField in the Java code then I
> > > assume (s)he is going to add  in the markup.
> > > Your IComponentInitializationListener will replace all components of type
> > > TextField which do not have FormGroup as a parent with a MyFormGroup.
> > >
> > > public class MyFormGroup extends FormGroup {
> > >// constructor(s)
> > >
> > >   @Override
> > >   public void onComponentTag(ComponentTag tag) {
> > >     super(tag);
> > > tag.setName("div");  // this modifies  to 
> > >   }
> > > }
> > >
> > > I am not sure, but you may also need to expand the tag from OpenClose
> > (i.e.
> > > ) to open+close (i.e. ). See
> > ComponentTag#isOpenClose()
> > > and Component#afterRender();
> > >
> > > On Tue, Sep 3, 2019 at 10:09 AM "Tom Götz"  wrote:
> > >
> > > > Martin,
> > > >
> > > > maybe you could point me into the right direction concerning the markup
> > > > manipulation part?
> > > >
> > > > This is what I got in my HTML:
> > > >
> > > > 
> > > >   
> > > > 
> > > >
> > > > I guess this is what I need for effectively replacing the input with a
> > > > FormGroup border:
> > > >
> > > > 
> > > >   
> > > > 
> > > >   
> > > > 
> > > >
> > > > Where would be the best place in the code to start looking?
> > > >
> > > > Thanks in advance
> > > > Tom


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



Re: Wrapping a FormComponent with a Border

2019-09-03 Thread Tom Götz
Thanks Martin, I will look into that. But won't it be a problem that I will add 
the  / TextField to the Border without having any markup inside the 
Border? Won't I need my  markup inside the border s?

Tom


> Gesendet: Dienstag, 03. September 2019 um 09:22 Uhr
> Von: "Martin Grigorov" 
> An: "users@wicket.apache.org" 
> Betreff: Re: Re: Wrapping a FormComponent with a Border
>
> Hi Tom,
> 
> Since your "user" is going to add a TextField in the Java code then I
> assume (s)he is going to add  in the markup.
> Your IComponentInitializationListener will replace all components of type
> TextField which do not have FormGroup as a parent with a MyFormGroup.
> 
> public class MyFormGroup extends FormGroup {
>// constructor(s)
> 
>   @Override
>   public void onComponentTag(ComponentTag tag) {
> super(tag);
> tag.setName("div");  // this modifies  to 
>   }
> }
> 
> I am not sure, but you may also need to expand the tag from OpenClose (i.e.
> ) to open+close (i.e. ). See ComponentTag#isOpenClose()
> and Component#afterRender();
> 
> On Tue, Sep 3, 2019 at 10:09 AM "Tom Götz"  wrote:
> 
> > Martin,
> >
> > maybe you could point me into the right direction concerning the markup
> > manipulation part?
> >
> > This is what I got in my HTML:
> >
> > 
> >   
> > 
> >
> > I guess this is what I need for effectively replacing the input with a
> > FormGroup border:
> >
> > 
> >   
> > 
> >   
> > 
> >
> > Where would be the best place in the code to start looking?
> >
> > Thanks in advance
> > Tom
> >
> >
> >
> >
> > > Gesendet: Montag, 02. September 2019 um 13:57 Uhr
> > > Von: "Tom Götz" 
> > > An: users@wicket.apache.org
> > > Betreff: Re: Wrapping a FormComponent with a Border
> > >
> > > Thanks Martin, this is exactly what I had in mind. I already implemented
> > 1), replacing the TextField with said Border but now am stuck with the
> > "HTML manipulation" part ...
> > >
> > > Tom
> > >
> > >
> > > > Gesendet: Montag, 02. September 2019 um 13:47 Uhr
> > > > Von: "Martin Grigorov" 
> > > > An: "users@wicket.apache.org" 
> > > > Betreff: Re: Wrapping a FormComponent with a Border
> > > >
> > > > Hi Tom,
> > > >
> > > > I imagine two ways:
> > > > 1) use org.apache.wicket.application.IComponentInitializationListener
> > that
> > > > manipulates the component tree whenever the passed component is an
> > instance
> > > > of TextField and has no (direct?!) parent of type FormGroup
> > > > 2) use AOP
> > > >
> > > > In both cases you will need to also the markup because FormGroup
> > expects to
> > > > be attached on a , while you will have an . For this you
> > will
> > > > probably need to extend Wicket Bootstrap's FormGroup and in your
> > custom one
> > > > override onComponentTag() (and onComponentTagBody() - most probably
> > not).
> > > >
> > > > On Mon, Sep 2, 2019 at 2:05 PM "Tom Götz"  wrote:
> > > >
> > > > > Let me try to explain what I want to achieve more precisely:
> > > > >
> > > > > - user adds a TextField to a page
> > > > > - I want to replace that TextField with a Border (Wicket Border
> > component,
> > > > > e.g. FormGroup from wicket-bootstrap) and put the TextField inside
> > that
> > > > > border
> > > > >
> > > > > The problem ist not: "how do I wrap a component with some HTML
> > markup?"
> > > > > (either generated by Java code or clientside), but: how can I
> > manipulate
> > > > > the component tree (server side) in such a way, that I can remove the
> > > > > TextField from it's parent and replace it with a Border that
> > contains that
> > > > > TextField!?
> > > > >
> > > > > Tom
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > > Gesendet: Montag, 02. September 2019 um 12:49 Uhr
> > > > > > Von: "Tobias Soloschenko"  > >
> > > > > > An: users@wicket.apache.org
> > > > > > Betreff: Re: Wrapping a FormCompone

Aw: Re: Wrapping a FormComponent with a Border

2019-09-03 Thread Tom Götz
Martin,

maybe you could point me into the right direction concerning the markup 
manipulation part?

This is what I got in my HTML:


  


I guess this is what I need for effectively replacing the input with a 
FormGroup border:


  

  


Where would be the best place in the code to start looking?

Thanks in advance
Tom




> Gesendet: Montag, 02. September 2019 um 13:57 Uhr
> Von: "Tom Götz" 
> An: users@wicket.apache.org
> Betreff: Re: Wrapping a FormComponent with a Border
>
> Thanks Martin, this is exactly what I had in mind. I already implemented 1), 
> replacing the TextField with said Border but now am stuck with the "HTML 
> manipulation" part ...
> 
> Tom
> 
> 
> > Gesendet: Montag, 02. September 2019 um 13:47 Uhr
> > Von: "Martin Grigorov" 
> > An: "users@wicket.apache.org" 
> > Betreff: Re: Wrapping a FormComponent with a Border
> >
> > Hi Tom,
> > 
> > I imagine two ways:
> > 1) use org.apache.wicket.application.IComponentInitializationListener that
> > manipulates the component tree whenever the passed component is an instance
> > of TextField and has no (direct?!) parent of type FormGroup
> > 2) use AOP
> > 
> > In both cases you will need to also the markup because FormGroup expects to
> > be attached on a , while you will have an . For this you will
> > probably need to extend Wicket Bootstrap's FormGroup and in your custom one
> > override onComponentTag() (and onComponentTagBody() - most probably not).
> > 
> > On Mon, Sep 2, 2019 at 2:05 PM "Tom Götz"  wrote:
> > 
> > > Let me try to explain what I want to achieve more precisely:
> > >
> > > - user adds a TextField to a page
> > > - I want to replace that TextField with a Border (Wicket Border component,
> > > e.g. FormGroup from wicket-bootstrap) and put the TextField inside that
> > > border
> > >
> > > The problem ist not: "how do I wrap a component with some HTML markup?"
> > > (either generated by Java code or clientside), but: how can I manipulate
> > > the component tree (server side) in such a way, that I can remove the
> > > TextField from it's parent and replace it with a Border that contains that
> > > TextField!?
> > >
> > > Tom
> > >
> > >
> > >
> > >
> > >
> > >
> > > > Gesendet: Montag, 02. September 2019 um 12:49 Uhr
> > > > Von: "Tobias Soloschenko" 
> > > > An: users@wicket.apache.org
> > > > Betreff: Re: Wrapping a FormComponent with a Border
> > > >
> > > > Hi,
> > > >
> > > > why not add a css class and style it?
> > > >
> > > > kind regards
> > > >
> > > > Tobias
> > > >
> > > > > Am 02.09.2019 um 12:20 schrieb Ernesto Reinaldo Barreiro <
> > > reier...@gmail.com>:
> > > > >
> > > > > Another possibility is to do this client side...
> > > > >
> > > > >> On Mon, Sep 2, 2019, 11:43 AM "Tom Götz"  
> > > > >> wrote:
> > > > >>
> > > > >> That would be great, thanks in advance!
> > > > >>
> > > > >> Tom
> > > > >>
> > > > >>
> > > > >>> Gesendet: Montag, 02. September 2019 um 10:39 Uhr
> > > > >>> Von: "Ernesto Reinaldo Barreiro" 
> > > > >>> An: users@wicket.apache.org
> > > > >>> Betreff: Re: Wrapping a FormComponent with a Border
> > > > >>>
> > > > >>> Hi,
> > > > >>>
> > > > >>>> On Mon, Sep 2, 2019 at 11:13 AM Tom Götz 
> > > wrote:
> > > > >>>>
> > > > >>>> Thanks Ernesto! This example is from 2007 though and uses
> > > > >>>> compent.setComponentBorder 
> > > > >>>> Is there something more close to current Wicket versions available
> > > > >> maybe?
> > > > >>>> :)
> > > > >>>>
> > > > >>>
> > > > >>> I think I have somewhere on a private project something similar
> > > > >> implemented
> > > > >>> for Wicket 7.x... I can try to dig it up and send classes to you.
> > > > >>>
> > > > >>> --
> > > > >>> Regards - Ernesto Reinaldo Barreiro


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



Re: Wrapping a FormComponent with a Border

2019-09-02 Thread Tom Götz
Thanks Martin, this is exactly what I had in mind. I already implemented 1), 
replacing the TextField with said Border but now am stuck with the "HTML 
manipulation" part ...

Tom


> Gesendet: Montag, 02. September 2019 um 13:47 Uhr
> Von: "Martin Grigorov" 
> An: "users@wicket.apache.org" 
> Betreff: Re: Wrapping a FormComponent with a Border
>
> Hi Tom,
> 
> I imagine two ways:
> 1) use org.apache.wicket.application.IComponentInitializationListener that
> manipulates the component tree whenever the passed component is an instance
> of TextField and has no (direct?!) parent of type FormGroup
> 2) use AOP
> 
> In both cases you will need to also the markup because FormGroup expects to
> be attached on a , while you will have an . For this you will
> probably need to extend Wicket Bootstrap's FormGroup and in your custom one
> override onComponentTag() (and onComponentTagBody() - most probably not).
> 
> On Mon, Sep 2, 2019 at 2:05 PM "Tom Götz"  wrote:
> 
> > Let me try to explain what I want to achieve more precisely:
> >
> > - user adds a TextField to a page
> > - I want to replace that TextField with a Border (Wicket Border component,
> > e.g. FormGroup from wicket-bootstrap) and put the TextField inside that
> > border
> >
> > The problem ist not: "how do I wrap a component with some HTML markup?"
> > (either generated by Java code or clientside), but: how can I manipulate
> > the component tree (server side) in such a way, that I can remove the
> > TextField from it's parent and replace it with a Border that contains that
> > TextField!?
> >
> > Tom
> >
> >
> >
> >
> >
> >
> > > Gesendet: Montag, 02. September 2019 um 12:49 Uhr
> > > Von: "Tobias Soloschenko" 
> > > An: users@wicket.apache.org
> > > Betreff: Re: Wrapping a FormComponent with a Border
> > >
> > > Hi,
> > >
> > > why not add a css class and style it?
> > >
> > > kind regards
> > >
> > > Tobias
> > >
> > > > Am 02.09.2019 um 12:20 schrieb Ernesto Reinaldo Barreiro <
> > reier...@gmail.com>:
> > > >
> > > > Another possibility is to do this client side...
> > > >
> > > >> On Mon, Sep 2, 2019, 11:43 AM "Tom Götz"  wrote:
> > > >>
> > > >> That would be great, thanks in advance!
> > > >>
> > > >> Tom
> > > >>
> > > >>
> > > >>> Gesendet: Montag, 02. September 2019 um 10:39 Uhr
> > > >>> Von: "Ernesto Reinaldo Barreiro" 
> > > >>> An: users@wicket.apache.org
> > > >>> Betreff: Re: Wrapping a FormComponent with a Border
> > > >>>
> > > >>> Hi,
> > > >>>
> > > >>>> On Mon, Sep 2, 2019 at 11:13 AM Tom Götz 
> > wrote:
> > > >>>>
> > > >>>> Thanks Ernesto! This example is from 2007 though and uses
> > > >>>> compent.setComponentBorder 
> > > >>>> Is there something more close to current Wicket versions available
> > > >> maybe?
> > > >>>> :)
> > > >>>>
> > > >>>
> > > >>> I think I have somewhere on a private project something similar
> > > >> implemented
> > > >>> for Wicket 7.x... I can try to dig it up and send classes to you.
> > > >>>
> > > >>> --
> > > >>> Regards - Ernesto Reinaldo Barreiro
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>

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



Re: Wrapping a FormComponent with a Border

2019-09-02 Thread Tom Götz
Let me try to explain what I want to achieve more precisely:

- user adds a TextField to a page
- I want to replace that TextField with a Border (Wicket Border component, e.g. 
FormGroup from wicket-bootstrap) and put the TextField inside that border

The problem ist not: "how do I wrap a component with some HTML markup?" (either 
generated by Java code or clientside), but: how can I manipulate the component 
tree (server side) in such a way, that I can remove the TextField from it's 
parent and replace it with a Border that contains that TextField!?

Tom






> Gesendet: Montag, 02. September 2019 um 12:49 Uhr
> Von: "Tobias Soloschenko" 
> An: users@wicket.apache.org
> Betreff: Re: Wrapping a FormComponent with a Border
>
> Hi,
> 
> why not add a css class and style it?
> 
> kind regards
> 
> Tobias
> 
> > Am 02.09.2019 um 12:20 schrieb Ernesto Reinaldo Barreiro 
> > :
> > 
> > Another possibility is to do this client side...
> > 
> >> On Mon, Sep 2, 2019, 11:43 AM "Tom Götz"  wrote:
> >> 
> >> That would be great, thanks in advance!
> >> 
> >> Tom
> >> 
> >> 
> >>> Gesendet: Montag, 02. September 2019 um 10:39 Uhr
> >>> Von: "Ernesto Reinaldo Barreiro" 
> >>> An: users@wicket.apache.org
> >>> Betreff: Re: Wrapping a FormComponent with a Border
> >>> 
> >>> Hi,
> >>> 
> >>>> On Mon, Sep 2, 2019 at 11:13 AM Tom Götz  wrote:
> >>>> 
> >>>> Thanks Ernesto! This example is from 2007 though and uses
> >>>> compent.setComponentBorder 
> >>>> Is there something more close to current Wicket versions available
> >> maybe?
> >>>> :)
> >>>> 
> >>> 
> >>> I think I have somewhere on a private project something similar
> >> implemented
> >>> for Wicket 7.x... I can try to dig it up and send classes to you.
> >>> 
> >>> --
> >>> Regards - Ernesto Reinaldo Barreiro


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



Re: Wrapping a FormComponent with a Border

2019-09-02 Thread Tom Götz
That would be great, thanks in advance!

Tom


> Gesendet: Montag, 02. September 2019 um 10:39 Uhr
> Von: "Ernesto Reinaldo Barreiro" 
> An: users@wicket.apache.org
> Betreff: Re: Wrapping a FormComponent with a Border
>
> Hi,
> 
> On Mon, Sep 2, 2019 at 11:13 AM Tom Götz  wrote:
> 
> > Thanks Ernesto! This example is from 2007 though and uses
> > compent.setComponentBorder 
> > Is there something more close to current Wicket versions available maybe?
> > :)
> >
> 
> I think I have somewhere on a private project something similar implemented
> for Wicket 7.x... I can try to dig it up and send classes to you.
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro
>

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



Aw: Wrapping a FormComponent with a Border

2019-09-02 Thread Tom Götz
The Border I'd like to use for wrapping my FormComponents is the FormGroup from 
the wicket-bootstrap project: https://bit.ly/2lmU9cq.
So, the user should only care about adding the FormComponent and then I would 
like to wrap it with this Border ... any ideas?

Tom


> Gesendet: Montag, 02. September 2019 um 09:22 Uhr
> Von: "Tom Götz" 
> An: users@wicket.apache.org
> Betreff: Wrapping a FormComponent with a Border
>
> Hi there,
>  
> I would like to automatically wrap a FormComponent with a Border whenever it 
> is added on a certain page. Let's say, a TextField is added, then I'd like to 
> replace it with Border and add that TextField to the Border. The Border 
> itself contains other Wicket Components such as a Label and a FeedbackPanel. 
> I am aware of BorderBehavior, but it seems that this can only be used to wrap 
> raw HTML around a Component.
> Is this possible somehow? 
>  
> Cheers
> Tom
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
>

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



Re: Wrapping a FormComponent with a Border

2019-09-02 Thread Tom Götz
Thanks Ernesto! This example is from 2007 though and uses 
compent.setComponentBorder 
Is there something more close to current Wicket versions available maybe? :)

Tom



> Am 02.09.2019 um 09:41 schrieb Ernesto Reinaldo Barreiro :
> 
> Hi,
> 
> Would approach described in [1] match your use case?
> 
> References
> 
> 1- https://www.scribd.com/document/43719247/LondonWicket-FormsWithFlair
> 
>> On Mon, Sep 2, 2019 at 10:22 AM Tom Götz  wrote:
>> 
>> Hi there,
>> 
>> I would like to automatically wrap a FormComponent with a Border whenever
>> it is added on a certain page. Let's say, a TextField is added, then I'd
>> like to replace it with Border and add that TextField to the Border. The
>> Border itself contains other Wicket Components such as a Label and a
>> FeedbackPanel. I am aware of BorderBehavior, but it seems that this can
>> only be used to wrap raw HTML around a Component.
>> Is this possible somehow?
>> 
>> Cheers
>> Tom
>> 
>> -
>> 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



Wrapping a FormComponent with a Border

2019-09-02 Thread Tom Götz
Hi there,
 
I would like to automatically wrap a FormComponent with a Border whenever it is 
added on a certain page. Let's say, a TextField is added, then I'd like to 
replace it with Border and add that TextField to the Border. The Border itself 
contains other Wicket Components such as a Label and a FeedbackPanel. I am 
aware of BorderBehavior, but it seems that this can only be used to wrap raw 
HTML around a Component.
Is this possible somehow? 
 
Cheers
Tom

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



Re: Wicket tests with Spring Boot

2019-07-10 Thread Tom Götz
We have both, a service layer and a persistence layer (each in it's own maven 
module). We use Spring Data Jpa repositories for the persistence layer and 
Liquibase for managing DB changes. When testing the Wicket layer I don't want 
the complete persistence and service layer to be initialized by Spring (e.g. no 
need for persistence context initialization and Liquibase), but would prefer to 
work with mocks. Is that enough information for you or what else should I 
provide?
Tom

> Am 10.07.2019 um 11:00 schrieb Andrei Kondratev 
> :
> 
> Hi Tom!
> 
> It depends on the implementation. If you have a service level it's not 
> necessary to mock persistence, but enough to mock services and inject them 
> (if you use @Autowired annotation).
> 
> Could you please give a bit more examples of what you're trying to test?
> 
> 
>> On Wed, 10 Jul 2019 at 20:56, "Tom Götz"  wrote:
>> Hi there,
>> 
>> we have a Spring Boot based webapp (Wicket 8.4 with wicket-spring-boot 
>> 2.1.6) and would like to create a base test class for our Wicket tests. For 
>> testing, we would like to mock the service and persistence layer (e.g. with 
>> Mockito). Is there a good example for that purpose?
>> 
>> Cheers
>> Tom
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> -- 
> ANDREW KONDRATEV
> TECHNICAL LEAD
> 
> 
> 
> MOB +64 210 492 674
> EMAIL andrei.kondra...@unimarket.com
> www.unimarket.com
> 
> Simple and easy-to-use software that brings all your procurement into one 
> place.


Wicket tests with Spring Boot

2019-07-10 Thread Tom Götz
Hi there,

we have a Spring Boot based webapp (Wicket 8.4 with wicket-spring-boot 2.1.6) 
and would like to create a base test class for our Wicket tests. For testing, 
we would like to mock the service and persistence layer (e.g. with Mockito). Is 
there a good example for that purpose?

Cheers
Tom


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



Re: Replace session after user login

2018-04-24 Thread Tom Götz
Thank you Sven for that clarification!

Cheers,
   Tom


> On 24.04.2018, at 09:06, Sven Meier <s...@meiers.net> wrote:
> 
> Hi,
> 
> replaceSession's javadoc says "replaces the underlying session". That matches 
> your observation.
> 
> You have to call invalidatNow(). Note that this doesn't prevent the session 
> object from surviving, since it is still bound to the current thread. For 
> that you have to call ThreadContext#setSession(null).
> 
> Have fun
> Sven
> 
> Am 23. April 2018 21:53:39 MESZ schrieb "Tom Götz" <t...@decoded.de>:
>> Hi there,
>> 
>> one question concerning user login: what is the correct way of
>> replacing the session after a successful user login? Calling
>> org.apache.wicket.Session#replaceSession replaces the underlying web
>> session. But what about the Wicket session itself? Will it also be
>> replaced with a new instance?
>> 
>> I observed the following:
>> * user is already logged in with an active session
>> * user navigates to login page
>> * user logs in as a different user
>> * underlying http session is replaced (by calling replaceSession after
>> login)
>> * but: Wicket session stays the same instance, i.e. new user uses
>> existing Wicket session including it’s state (properties stored in
>> custom Wicket session)
>> 
>> Am I missing something or doing something wrong?
>> 
>> Cheers,
>>  Tom
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org





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



Replace session after user login

2018-04-23 Thread Tom Götz
Hi there,

one question concerning user login: what is the correct way of replacing the 
session after a successful user login? Calling 
org.apache.wicket.Session#replaceSession replaces the underlying web session. 
But what about the Wicket session itself? Will it also be replaced with a new 
instance?

I observed the following:
* user is already logged in with an active session
* user navigates to login page
* user logs in as a different user
* underlying http session is replaced (by calling replaceSession after login)
* but: Wicket session stays the same instance, i.e. new user uses existing 
Wicket session including it’s state (properties stored in custom Wicket session)

Am I missing something or doing something wrong?

Cheers,
   Tom



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



Wanted: example for Spring Security with wicket-auth-roles

2018-04-18 Thread Tom Götz
Hi!

Does anyone have a working example for an integration of Spring Security and 
wicket-auth-roles? We currently use Wicket 7.9.0 and Spring Boot 2.x …

We’d like to authenticate users via a login form (SignInPanel) and also use a 
„remember me“ cookie based authentication.

Anyone?


Cheers,
   Tom




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



Re: Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Tom Götz
Ok, that problem seemed to be related to the wicket-bootstrap library, which we 
also use. An upgrade of that dependency from 0.10.7 to 0.10.16 solved the 
problem.

Cheers,
   Tom


> On 08.12.2017, at 09:21, Tom Götz <tgo...@decoded.de> wrote:
> 
> I have not tried, but I guess this only happens in our application’s 
> setup/environment. Just need a starting point for debugging, as something 
> must have changed between Wicket 7.4.0 and 7.5.0 that causes a different 
> behaviour in our app. Just asking here and hoping that someone else might 
> have experienced the same exception/behaviour …
> 
>   Tom
> 
> 
>> On 08.12.2017, at 09:06, Maxim Solodovnik <solomax...@gmail.com> wrote:
>> 
>> Hello Tom,
>> 
>> maybe you can create quickstart
>> http://wicket.apache.org/start/quickstart.html demonstrating this?
>> 
>> On Fri, Dec 8, 2017 at 3:00 PM, Tom Götz <t...@decoded.de> wrote:
>>> Hi there,
>>> 
>>> starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
>>> FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
>>> pages. Everything is fine if there are not messages, but as soon as there 
>>> is any message to be rendered, we get this:
>>> 
>>> org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
>>> render. Possible reasons could be that: 1) you have added a component in 
>>> code but forgot to reference it in the markup (thus the component will 
>>> never be rendered), 2) if your components were added in a parent container 
>>> then make sure the markup for the child container includes them in 
>>> .
>>> 
>>> 1. [Component id = message]
>>> 
>>> at org.apache.wicket.Page.checkRendering(Page.java:666) 
>>> ~[wicket-core-7.5.0.jar:7.5.0]
>>> 
>>> 
>>> Without any code changes in our application, this runs fine with Wicket 
>>> 7.4.0. Any hint where I could start looking what causes this?
>>> 
>>> 
>>> Cheers,
>>>  Tom


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



Re: Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Tom Götz
I have not tried, but I guess this only happens in our application’s 
setup/environment. Just need a starting point for debugging, as something must 
have changed between Wicket 7.4.0 and 7.5.0 that causes a different behaviour 
in our app. Just asking here and hoping that someone else might have 
experienced the same exception/behaviour …

   Tom


> On 08.12.2017, at 09:06, Maxim Solodovnik <solomax...@gmail.com> wrote:
> 
> Hello Tom,
> 
> maybe you can create quickstart
> http://wicket.apache.org/start/quickstart.html demonstrating this?
> 
> On Fri, Dec 8, 2017 at 3:00 PM, Tom Götz <t...@decoded.de> wrote:
>> Hi there,
>> 
>> starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
>> FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
>> pages. Everything is fine if there are not messages, but as soon as there is 
>> any message to be rendered, we get this:
>> 
>> org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
>> render. Possible reasons could be that: 1) you have added a component in 
>> code but forgot to reference it in the markup (thus the component will never 
>> be rendered), 2) if your components were added in a parent container then 
>> make sure the markup for the child container includes them in 
>> .
>> 
>> 1. [Component id = message]
>> 
>>  at org.apache.wicket.Page.checkRendering(Page.java:666) 
>> ~[wicket-core-7.5.0.jar:7.5.0]
>> 
>> 
>> Without any code changes in our application, this runs fine with Wicket 
>> 7.4.0. Any hint where I could start looking what causes this?
>> 
>> 
>> Cheers,
>>   Tom
>> 





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



Exception with Wicket 7.5.0 when FeedbackMessage is rendered

2017-12-08 Thread Tom Götz
Hi there,

starting with Wicket 7.5.0 we get a WicketRuntimeException whenever a 
FeedbackMessage is rendered in our global FeedbackPanel that we use in our 
pages. Everything is fine if there are not messages, but as soon as there is 
any message to be rendered, we get this:

org.apache.wicket.WicketRuntimeException: The component(s) below failed to 
render. Possible reasons could be that: 1) you have added a component in code 
but forgot to reference it in the markup (thus the component will never be 
rendered), 2) if your components were added in a parent container then make 
sure the markup for the child container includes them in .
 
1. [Component id = message]
 
  at org.apache.wicket.Page.checkRendering(Page.java:666) 
~[wicket-core-7.5.0.jar:7.5.0]


 Without any code changes in our application, this runs fine with Wicket 7.4.0. 
Any hint where I could start looking what causes this?


Cheers,
   Tom



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



Re: Which Check got clicked in CheckGroup with AjaxFormChoiceComponentUpdatingBehavior

2017-06-24 Thread Tom Götz
Simply check the modelObject’s value in you onUpdate method?

Cheers,
   Tom


> On 23.06.2017, at 13:47, ssamarin  wrote:
> 
> Hello,
> 
> I have CheckGroup with Check's, and I need to have models for Check's
> updated on click, on form submit it's too late. 
> 
> So far I've seen recommendations to use
> AjaxFormChoiceComponentUpdatingBehavior. It does get invoked on every click,
> but how do I determine which checkbox got clicked?
> 
> Regards


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



Re: Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
… so what I was trying to say (I’m not yet too deep into the websockets tech):

isn’t it —in the described case— also necessary to configure the mount point of 
the WS endpoint?

   Tom



> On 05.10.2016, at 17:42, Tom Götz <t...@decoded.de> wrote:
> 
> BTW, I already tried the following workaround without success:
> 
> I did override WebSocketBehavior#renderHead and included a „patched“ JS init 
> script that contained the contextPath that ngnix is forwarding to, so the 
> generated JS looked like this:
> 
> if (typeof(Wicket.WebSocket.appName) === "undefined") {
>  jQuery.extend(Wicket.WebSocket, { pageId: 1, resourceName: '',
>baseUrl: ‚MyHomePage?1', contextPath: ‚/MyLocation', appName: ‚myApp',
>filterPrefix: '' });
>  Wicket.WebSocket.createDefaultConnection();
> }
> 
> But still I got an 404 for the ws endpoint …
> 
>   Tom
> 
> 
>> On 05.10.2016, at 17:35, Tom Götz <t...@decoded.de> wrote:
>> 
>> I created a JIRA for this: https://issues.apache.org/jira/browse/WICKET-6254
>> 
>>  Tom
>> 
>> 
>>> On 05.10.2016, at 17:31, Martin Grigorov <mgrigo...@apache.org> wrote:
>>> 
>>> The problem is that Nginx is configured to forward requests to /MyLocation
>>> to Tomcat, and the application has no idea about this.
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Wed, Oct 5, 2016 at 5:25 PM, Tom Götz <t...@decoded.de> wrote:
>>> 
>>>> Hi Martin,
>>>> 
>>>> what exactly is the problem in wicket-websocket-jquery.js? As I said, I
>>>> have no contextPath, so I wouldn’t expect Wicket/wicket-websocket-jquery.js
>>>> to know under which context the app is running. Shouldn’t I provide the
>>>> context/mountPath somehow to the websocket initialization process?!
>>>> 
>>>> Tom
>>>> 
>>>>> On 05.10.2016, at 16:47, Martin Grigorov <mgrigo...@apache.org> wrote:
>>>>> 
>>>>> Hi Tom,
>>>>> 
>>>>> The problem really is in wicket-websocket-jquery.js.
>>>>> It does: url = protocol + '//' + document.location.host +
>>>> WWS.contextPath +
>>>>> WWS.filterPrefix + '/wicket/websocket';
>>>>> 
>>>>> A workaround for you is to add url rewrite rule to Nginx to forward it to
>>>>> Tomcat.
>>>>> 
>>>>> Please file an issue at JIRA and I'll see how this could be improved.
>>>>> 
>>>>> 
>>>>> Martin Grigorov
>>>>> Wicket Training and Consulting
>>>>> https://twitter.com/mtgrigorov
>>>>> 
>>>>> On Wed, Oct 5, 2016 at 4:31 PM, Tom Götz <t...@decoded.de> wrote:
>>>>> 
>>>>>> Hm, no solution yet … anyone got a working example or some hint maybe?
>>>>>> 
>>>>>> Tom
>>>>>> 
>>>>>> 
>>>>>>> On 05.10.2016, at 15:57, Tom Götz <t...@decoded.de> wrote:
>>>>>>> 
>>>>>>> Maybe answering my own question, but this here could help … I’ll give
>>>> it
>>>>>> a try:
>>>>>>> http://stackoverflow.com/questions/32287103/how-to-use-
>>>>>> nginx-as-a-proxy-for-wicket-application-using-websockets
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> Tom
>>>>>>> 
>>>>>>> 
>>>>>>>> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote:
>>>>>>>> 
>>>>>>>> Hi there,
>>>>>>>> 
>>>>>>>> I have the following scenario:
>>>>>>>> 
>>>>>>>> 1.
>>>>>>>> a Spring-Boot Wicket application with Tomcat running on Port 8080 that
>>>>>> uses Wicket WebSockets impl running in the servlet root context
>>>>>>>> 
>>>>>>>> 2.
>>>>>>>> a ngnix server that proxies /MyLocation to the mentioned Wicket app
>>>>>>>> 
>>>>>>>> As there is no servlet context involved, the generated WebSockets
>>>>>> endpoint url is generated by Wicket as: ws://mydomain.com/wicket/
>>>>>> websocket?pageId=1=...
>>>>>>>> 
>>>>>>>> I saw that this url is generated in BaseWebSocketBehavior#renderHead
>>>>>> by asking the request for the context path:
>>>>>>>> 
>>>>>>>> String contextPath = component.getRequest().getContextPath();
>>>>>>>> variables.put("contextPath", contextPath);
>>>>>>>> 
>>>>>>>> As I don’t have a contextPath, this fails:
>>>>>>>> 
>>>>>>>> WebSocket connection to 'ws://mydomaon.com/wicket/
>>>>>> websocket?pageId=1=...' failed: Error during
>>>>>> WebSocket handshake: Unexpected response code: 404
>>>>>>>> 
>>>>>>>> Does the Wicket WebSocket API provide a way to handle such a scenario?
>>>>>> Currently, I’m studying the code but any pointer would be helpful …
>>>>>>>> 
>>>>>>>> Cheers,
>>>>>>>> Tom
>>>>>> 
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
BTW, I already tried the following workaround without success:

I did override WebSocketBehavior#renderHead and included a „patched“ JS init 
script that contained the contextPath that ngnix is forwarding to, so the 
generated JS looked like this:

if (typeof(Wicket.WebSocket.appName) === "undefined") {
  jQuery.extend(Wicket.WebSocket, { pageId: 1, resourceName: '',
baseUrl: ‚MyHomePage?1', contextPath: ‚/MyLocation', appName: ‚myApp',
filterPrefix: '' });
  Wicket.WebSocket.createDefaultConnection();
}

But still I got an 404 for the ws endpoint …

   Tom


> On 05.10.2016, at 17:35, Tom Götz <t...@decoded.de> wrote:
> 
> I created a JIRA for this: https://issues.apache.org/jira/browse/WICKET-6254
> 
>   Tom
> 
> 
>> On 05.10.2016, at 17:31, Martin Grigorov <mgrigo...@apache.org> wrote:
>> 
>> The problem is that Nginx is configured to forward requests to /MyLocation
>> to Tomcat, and the application has no idea about this.
>> 
>> Martin Grigorov
>> Wicket Training and Consulting
>> https://twitter.com/mtgrigorov
>> 
>> On Wed, Oct 5, 2016 at 5:25 PM, Tom Götz <t...@decoded.de> wrote:
>> 
>>> Hi Martin,
>>> 
>>> what exactly is the problem in wicket-websocket-jquery.js? As I said, I
>>> have no contextPath, so I wouldn’t expect Wicket/wicket-websocket-jquery.js
>>> to know under which context the app is running. Shouldn’t I provide the
>>> context/mountPath somehow to the websocket initialization process?!
>>> 
>>>  Tom
>>> 
>>>> On 05.10.2016, at 16:47, Martin Grigorov <mgrigo...@apache.org> wrote:
>>>> 
>>>> Hi Tom,
>>>> 
>>>> The problem really is in wicket-websocket-jquery.js.
>>>> It does: url = protocol + '//' + document.location.host +
>>> WWS.contextPath +
>>>> WWS.filterPrefix + '/wicket/websocket';
>>>> 
>>>> A workaround for you is to add url rewrite rule to Nginx to forward it to
>>>> Tomcat.
>>>> 
>>>> Please file an issue at JIRA and I'll see how this could be improved.
>>>> 
>>>> 
>>>> Martin Grigorov
>>>> Wicket Training and Consulting
>>>> https://twitter.com/mtgrigorov
>>>> 
>>>> On Wed, Oct 5, 2016 at 4:31 PM, Tom Götz <t...@decoded.de> wrote:
>>>> 
>>>>> Hm, no solution yet … anyone got a working example or some hint maybe?
>>>>> 
>>>>> Tom
>>>>> 
>>>>> 
>>>>>> On 05.10.2016, at 15:57, Tom Götz <t...@decoded.de> wrote:
>>>>>> 
>>>>>> Maybe answering my own question, but this here could help … I’ll give
>>> it
>>>>> a try:
>>>>>> http://stackoverflow.com/questions/32287103/how-to-use-
>>>>> nginx-as-a-proxy-for-wicket-application-using-websockets
>>>>>> 
>>>>>> Cheers,
>>>>>> Tom
>>>>>> 
>>>>>> 
>>>>>>> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote:
>>>>>>> 
>>>>>>> Hi there,
>>>>>>> 
>>>>>>> I have the following scenario:
>>>>>>> 
>>>>>>> 1.
>>>>>>> a Spring-Boot Wicket application with Tomcat running on Port 8080 that
>>>>> uses Wicket WebSockets impl running in the servlet root context
>>>>>>> 
>>>>>>> 2.
>>>>>>> a ngnix server that proxies /MyLocation to the mentioned Wicket app
>>>>>>> 
>>>>>>> As there is no servlet context involved, the generated WebSockets
>>>>> endpoint url is generated by Wicket as: ws://mydomain.com/wicket/
>>>>> websocket?pageId=1=...
>>>>>>> 
>>>>>>> I saw that this url is generated in BaseWebSocketBehavior#renderHead
>>>>> by asking the request for the context path:
>>>>>>> 
>>>>>>> String contextPath = component.getRequest().getContextPath();
>>>>>>> variables.put("contextPath", contextPath);
>>>>>>> 
>>>>>>> As I don’t have a contextPath, this fails:
>>>>>>> 
>>>>>>> WebSocket connection to 'ws://mydomaon.com/wicket/
>>>>> websocket?pageId=1=...' failed: Error during
>>>>> WebSocket handshake: Unexpected response code: 404
>>>>>>> 
>>>>>>> Does the Wicket WebSocket API provide a way to handle such a scenario?
>>>>> Currently, I’m studying the code but any pointer would be helpful …
>>>>>>> 
>>>>>>> Cheers,
>>>>>>> Tom
>>>>> 
> 


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



Re: Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
I created a JIRA for this: https://issues.apache.org/jira/browse/WICKET-6254

   Tom


> On 05.10.2016, at 17:31, Martin Grigorov <mgrigo...@apache.org> wrote:
> 
> The problem is that Nginx is configured to forward requests to /MyLocation
> to Tomcat, and the application has no idea about this.
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Wed, Oct 5, 2016 at 5:25 PM, Tom Götz <t...@decoded.de> wrote:
> 
>> Hi Martin,
>> 
>> what exactly is the problem in wicket-websocket-jquery.js? As I said, I
>> have no contextPath, so I wouldn’t expect Wicket/wicket-websocket-jquery.js
>> to know under which context the app is running. Shouldn’t I provide the
>> context/mountPath somehow to the websocket initialization process?!
>> 
>>   Tom
>> 
>>> On 05.10.2016, at 16:47, Martin Grigorov <mgrigo...@apache.org> wrote:
>>> 
>>> Hi Tom,
>>> 
>>> The problem really is in wicket-websocket-jquery.js.
>>> It does: url = protocol + '//' + document.location.host +
>> WWS.contextPath +
>>> WWS.filterPrefix + '/wicket/websocket';
>>> 
>>> A workaround for you is to add url rewrite rule to Nginx to forward it to
>>> Tomcat.
>>> 
>>> Please file an issue at JIRA and I'll see how this could be improved.
>>> 
>>> 
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>> https://twitter.com/mtgrigorov
>>> 
>>> On Wed, Oct 5, 2016 at 4:31 PM, Tom Götz <t...@decoded.de> wrote:
>>> 
>>>> Hm, no solution yet … anyone got a working example or some hint maybe?
>>>> 
>>>>  Tom
>>>> 
>>>> 
>>>>> On 05.10.2016, at 15:57, Tom Götz <t...@decoded.de> wrote:
>>>>> 
>>>>> Maybe answering my own question, but this here could help … I’ll give
>> it
>>>> a try:
>>>>> http://stackoverflow.com/questions/32287103/how-to-use-
>>>> nginx-as-a-proxy-for-wicket-application-using-websockets
>>>>> 
>>>>> Cheers,
>>>>> Tom
>>>>> 
>>>>> 
>>>>>> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote:
>>>>>> 
>>>>>> Hi there,
>>>>>> 
>>>>>> I have the following scenario:
>>>>>> 
>>>>>> 1.
>>>>>> a Spring-Boot Wicket application with Tomcat running on Port 8080 that
>>>> uses Wicket WebSockets impl running in the servlet root context
>>>>>> 
>>>>>> 2.
>>>>>> a ngnix server that proxies /MyLocation to the mentioned Wicket app
>>>>>> 
>>>>>> As there is no servlet context involved, the generated WebSockets
>>>> endpoint url is generated by Wicket as: ws://mydomain.com/wicket/
>>>> websocket?pageId=1=...
>>>>>> 
>>>>>> I saw that this url is generated in BaseWebSocketBehavior#renderHead
>>>> by asking the request for the context path:
>>>>>> 
>>>>>> String contextPath = component.getRequest().getContextPath();
>>>>>> variables.put("contextPath", contextPath);
>>>>>> 
>>>>>> As I don’t have a contextPath, this fails:
>>>>>> 
>>>>>> WebSocket connection to 'ws://mydomaon.com/wicket/
>>>> websocket?pageId=1=...' failed: Error during
>>>> WebSocket handshake: Unexpected response code: 404
>>>>>> 
>>>>>> Does the Wicket WebSocket API provide a way to handle such a scenario?
>>>> Currently, I’m studying the code but any pointer would be helpful …
>>>>>> 
>>>>>> Cheers,
>>>>>> Tom
>>>> 


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



Re: Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
Hi Martin,

what exactly is the problem in wicket-websocket-jquery.js? As I said, I have no 
contextPath, so I wouldn’t expect Wicket/wicket-websocket-jquery.js to know 
under which context the app is running. Shouldn’t I provide the 
context/mountPath somehow to the websocket initialization process?!

   Tom

> On 05.10.2016, at 16:47, Martin Grigorov <mgrigo...@apache.org> wrote:
> 
> Hi Tom,
> 
> The problem really is in wicket-websocket-jquery.js.
> It does: url = protocol + '//' + document.location.host + WWS.contextPath +
> WWS.filterPrefix + '/wicket/websocket';
> 
> A workaround for you is to add url rewrite rule to Nginx to forward it to
> Tomcat.
> 
> Please file an issue at JIRA and I'll see how this could be improved.
> 
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Wed, Oct 5, 2016 at 4:31 PM, Tom Götz <t...@decoded.de> wrote:
> 
>> Hm, no solution yet … anyone got a working example or some hint maybe?
>> 
>>   Tom
>> 
>> 
>>> On 05.10.2016, at 15:57, Tom Götz <t...@decoded.de> wrote:
>>> 
>>> Maybe answering my own question, but this here could help … I’ll give it
>> a try:
>>> http://stackoverflow.com/questions/32287103/how-to-use-
>> nginx-as-a-proxy-for-wicket-application-using-websockets
>>> 
>>> Cheers,
>>>  Tom
>>> 
>>> 
>>>> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote:
>>>> 
>>>> Hi there,
>>>> 
>>>> I have the following scenario:
>>>> 
>>>> 1.
>>>> a Spring-Boot Wicket application with Tomcat running on Port 8080 that
>> uses Wicket WebSockets impl running in the servlet root context
>>>> 
>>>> 2.
>>>> a ngnix server that proxies /MyLocation to the mentioned Wicket app
>>>> 
>>>> As there is no servlet context involved, the generated WebSockets
>> endpoint url is generated by Wicket as: ws://mydomain.com/wicket/
>> websocket?pageId=1=...
>>>> 
>>>> I saw that this url is generated in BaseWebSocketBehavior#renderHead
>> by asking the request for the context path:
>>>> 
>>>> String contextPath = component.getRequest().getContextPath();
>>>> variables.put("contextPath", contextPath);
>>>> 
>>>> As I don’t have a contextPath, this fails:
>>>> 
>>>> WebSocket connection to 'ws://mydomaon.com/wicket/
>> websocket?pageId=1=...' failed: Error during
>> WebSocket handshake: Unexpected response code: 404
>>>> 
>>>> Does the Wicket WebSocket API provide a way to handle such a scenario?
>> Currently, I’m studying the code but any pointer would be helpful …
>>>> 
>>>> Cheers,
>>>> Tom
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 


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



Re: Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
Hm, no solution yet … anyone got a working example or some hint maybe?

   Tom


> On 05.10.2016, at 15:57, Tom Götz <t...@decoded.de> wrote:
> 
> Maybe answering my own question, but this here could help … I’ll give it a 
> try:
> http://stackoverflow.com/questions/32287103/how-to-use-nginx-as-a-proxy-for-wicket-application-using-websockets
> 
> Cheers,
>   Tom
> 
> 
>> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote:
>> 
>> Hi there,
>> 
>> I have the following scenario:
>> 
>> 1.
>> a Spring-Boot Wicket application with Tomcat running on Port 8080 that uses 
>> Wicket WebSockets impl running in the servlet root context
>> 
>> 2.
>> a ngnix server that proxies /MyLocation to the mentioned Wicket app
>> 
>> As there is no servlet context involved, the generated WebSockets endpoint 
>> url is generated by Wicket as: 
>> ws://mydomain.com/wicket/websocket?pageId=1=...
>> 
>> I saw that this url is generated in BaseWebSocketBehavior#renderHead by 
>> asking the request for the context path: 
>> 
>> String contextPath = component.getRequest().getContextPath();
>> variables.put("contextPath", contextPath);
>> 
>> As I don’t have a contextPath, this fails:
>> 
>> WebSocket connection to 
>> 'ws://mydomaon.com/wicket/websocket?pageId=1=...' 
>> failed: Error during WebSocket handshake: Unexpected response code: 404
>> 
>> Does the Wicket WebSocket API provide a way to handle such a scenario? 
>> Currently, I’m studying the code but any pointer would be helpful …
>> 
>> Cheers,
>>  Tom


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



Re: Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
Maybe answering my own question, but this here could help … I’ll give it a try:
http://stackoverflow.com/questions/32287103/how-to-use-nginx-as-a-proxy-for-wicket-application-using-websockets

Cheers,
   Tom


> On 05.10.2016, at 15:36, Tom Götz <t...@decoded.de> wrote:
> 
> Hi there,
> 
> I have the following scenario:
> 
> 1.
> a Spring-Boot Wicket application with Tomcat running on Port 8080 that uses 
> Wicket WebSockets impl running in the servlet root context
> 
> 2.
> a ngnix server that proxies /MyLocation to the mentioned Wicket app
> 
> As there is no servlet context involved, the generated WebSockets endpoint 
> url is generated by Wicket as: 
> ws://mydomain.com/wicket/websocket?pageId=1=...
> 
> I saw that this url is generated in BaseWebSocketBehavior#renderHead by 
> asking the request for the context path: 
> 
> String contextPath = component.getRequest().getContextPath();
> variables.put("contextPath", contextPath);
> 
> As I don’t have a contextPath, this fails:
> 
> WebSocket connection to 
> 'ws://mydomaon.com/wicket/websocket?pageId=1=...' failed: 
> Error during WebSocket handshake: Unexpected response code: 404
> 
> Does the Wicket WebSocket API provide a way to handle such a scenario? 
> Currently, I’m studying the code but any pointer would be helpful …
> 
> Cheers,
>   Tom
> 

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



Wicket WebSockets problem with servlet context

2016-10-05 Thread Tom Götz
Hi there,

I have the following scenario:

1.
a Spring-Boot Wicket application with Tomcat running on Port 8080 that uses 
Wicket WebSockets impl running in the servlet root context

2.
a ngnix server that proxies /MyLocation to the mentioned Wicket app

As there is no servlet context involved, the generated WebSockets endpoint url 
is generated by Wicket as: 
ws://mydomain.com/wicket/websocket?pageId=1=...

I saw that this url is generated in BaseWebSocketBehavior#renderHead by asking 
the request for the context path: 

String contextPath = component.getRequest().getContextPath();
variables.put("contextPath", contextPath);

As I don’t have a contextPath, this fails:

WebSocket connection to 
'ws://mydomaon.com/wicket/websocket?pageId=1=...' failed: 
Error during WebSocket handshake: Unexpected response code: 404

Does the Wicket WebSocket API provide a way to handle such a scenario? 
Currently, I’m studying the code but any pointer would be helpful …

Cheers,
   Tom


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



Re: ClassNotFoundException: org.apache.wicket.settings.def.JavaScriptLibrarySettings

2016-08-12 Thread Tom Götz
Thanks for the hint! I still had a 6.x dependency to wicket-jquery-ui lingering 
around in my classpath, now everything looks fine.

Cheers,
   Tom

> On 12.08.2016, at 11:23, Ernesto Reinaldo Barreiro  wrote:
> 
> But not on that package. Maybe your server is trying to deserialize some
> "legacy object" stored with 6.x... ?


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



ClassNotFoundException: org.apache.wicket.settings.def.JavaScriptLibrarySettings

2016-08-12 Thread Tom Götz
Hi there,

I am currently migrating a webapp from Wicket 6.x to Wicket 7.3 (can’t use 7.4 
due to a bug that hits us —> other topic).

When clicking on some ajax link, I get the following stacktrace: 
https://gist.github.com/tgoetz/809196f35be40157d7c69d1879871d43

I don’t know yet what exactly causes this, but has anybody maybe seen that 
already? I am especially worried about the package 
def.JavaScriptLibrarySettings, which does not seem to exist?! Plus: how could 
that class not be found, as it’s part of wicket-core?

Any hints welcome!

Cheers,
   Tom


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



Re: Best way to track logged in users?

2016-05-13 Thread Tom Götz
Hi Martin,

thanks for the pointers, will have a look at 2):
can I also use org.apache.wicket.ISessionListener? What’s the difference to 
org.apache.wicket.session.ISessionStore.BindListener (besides that the 
bind/unbind methods are split into two separate interfaces)?

Cheers,
   Tom


> On 13.05.2016, at 08:45, Martin Grigorov <mgrigo...@apache.org> wrote:
> 
> Hi,
> 
> You can use:
> 1) plain Servlet APIs -
> http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpSessionListener.html
> 2) Wicket APIs - ISessionStore#register[Un]BindListener()
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Fri, May 13, 2016 at 8:02 AM, Tom Götz <t...@decoded.de> wrote:
> 
>> Hi there,
>> 
>> I’d like to track the currently logged in users with the corresponding
>> session ids for displaying them on an admin page. What’s the best way to do
>> that? I was thinking about storing sessionId/userId data in the database,
>> but I’m not sure yet if that would be the best approach.
>> 
>> What do you think?
>> 
>> Cheers,
>>   Tom


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



Re: Best way to track logged in users?

2016-05-13 Thread Tom Götz
Thanks for you hint, I hoped that there would also be a Wicket based solution. 
As I have a custom Wicket-Session class I’d like to also display certain 
properties of that session objects. So what I’m looking for is a way to get a 
List for displaying in a DataTable …

   Tom


> On 13.05.2016, at 08:37, Christos Stieglitz <chris...@gnosys.de> wrote:
> 
> This is not a wicket related issue.
> 
> There are some frameworks out there, both open source and  commercial,
> with this functionality. One of my customers uses Omniture (commercial)
> with good results. But perhaps you need a subset of the omniture features,
> so another framework may suit you better.
> 
> Just google some keywords like "web analytics" etc.
> 
> Cheers
> 
> Christos
> 
> On Fri, May 13, 2016 08:02, Tom Götz wrote:
>> Hi there,
>> 
>> 
>> I=3DE2=3D80=3D99d like to track the currently logged in users with the
>> =3D
>> corresponding session ids for displaying them on an admin page.
>> What=3DE2=3D80=3D
>> =3D99s the best way to do that? I was thinking about storing =3D
>> sessionId/userId data in the database, but I=3DE2=3D80=3D99m not sure yet
>> if =3D that would be the best approach.
>> 
>> What do you think?
>> 
>> 
>> Cheers,
>> Tom
>> 
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
>> 
> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 



signature.asc
Description: Message signed with OpenPGP using GPGMail


Best way to track logged in users?

2016-05-13 Thread Tom Götz
Hi there,

I’d like to track the currently logged in users with the corresponding session 
ids for displaying them on an admin page. What’s the best way to do that? I was 
thinking about storing sessionId/userId data in the database, but I’m not sure 
yet if that would be the best approach.

What do you think?

Cheers,
   Tom



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



Re: DataTable with subrows

2016-04-08 Thread Tom Götz
Thanks for the pointers Martin and Ernesto,

TreeTable looks promising, I’ll play around with that one and see how far I can 
bend it ;-)

Cheers,
   Tom


> On 08.04.2016, at 08:57, Martin Grigorov  wrote:
> 
> Hi Tom,
> 
> The closest we have is TreeTable component:
> http://examples7x.wicket.apache.org/tree/wicket/bookmarkable/org.apache.wicket.examples.tree.TableTreePage
> If this is not exactly what you need then you can create your own one by
> using GridView.
> ​



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



DataTable with subrows

2016-04-08 Thread Tom Götz
Hi there,

is there a clean way to have „subrows“ in a DataTable? I want to do something 
like that: http://www.bootply.com/GGAMvot45f 

The only solution I found yet involves writing into the output stream directly 
(as shown here: http://www.javased.com/?post=3822324 
). Has anybody done something like that 
already? Any pointers welcome.

Cheers,
   Tom




Re: Wicket and Spring-Boot, how to reload changed HTML files?

2016-03-15 Thread Tom Götz
Argh, you should run Wicket in „development“ config … thanks for listening ;-)

   Tom


> On 15.03.2016, at 22:14, Tom Götz <t...@decoded.de> wrote:
> 
> Hi there,
> 
> I’m currently playing around with the Spring-Boot/Wicket integration from 
> https://github.com/MarcGiffing/wicket-spring-boot 
> <https://github.com/MarcGiffing/wicket-spring-boot>. It’s quite handy, but I 
> wonder: how do I reload a changed HTML/CSS/JS file without having to restart 
> the application? Any hint on this, or even an example?!
> 
> Cheers,
>   Tom



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



Wicket and Spring-Boot, how to reload changed HTML files?

2016-03-15 Thread Tom Götz
Hi there,

I’m currently playing around with the Spring-Boot/Wicket integration from 
https://github.com/MarcGiffing/wicket-spring-boot 
. It’s quite handy, but I 
wonder: how do I reload a changed HTML/CSS/JS file without having to restart 
the application? Any hint on this, or even an example?!

Cheers,
   Tom




Re: Is there any pointers to change the markup header of a column or propertyColumn ?

2016-03-09 Thread Tom Götz
Hi,

I think the question was how to modify the *header* of the column and not the 
cell’s content. Therefore you only need to do the following:

@Override
Component getHeader(String componentId) {
return new MyFancyHeaderPanel(componentId);
}

… in your PropertyColumn (anonymous) subclass.

Cheers,
   Tom


> On 09.03.2016, at 19:09, Francois Meillet  wrote:
> 
> If you want to your own html, you need to create an object that extends 
> PropertyColumn
> 
> Let's say that XXXPropertyColumn extend PropertyColumn
> 
> You need to override the populateItem(Item item, String 
> componentId, IModel rowModel) method
> 
> for example
> 
> @Override
> public void populateItem(Item item, String componentId, 
> IModel rowModel) {
>   item.add(new YYYPanel(item, componentId, rowModel));
> }
> 
> Then you create the YYYPanel.java and the html file 
> XXXPropertyColumn$YYYPanel.html with your own design.
> 
> 
> François 
> 
> 
> 
> 
> Le 9 mars 2016 à 18:41, andre seame  a écrit :
> 
>> 
>> Hello,
>> 
>> 
>> In DataTableFilterToolbarPag, we use columns.add(new PropertyColumn> String> ...
>> 
>> 
>> I would like to modify the content of the header of this column.
>> 
>> 
>> Must I do "replace the header component of the header of column" ? But how 
>> to do that?
>> 
>> 
>> Must i my own column objects? I imlagine that the header (th) is defined by 
>> the column. But how to do that?
>> 
>> 
>> Thanks,
>> 
>> PHL.
> 



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



click behavior on table rows

2016-02-17 Thread Tom Götz

Hi there,

I have a DataTable where rows are clickable and open a detail page when 
clicked. No problem so far.

But: in one column I have a (Bootstrap) dropdown which won’t open any more 
because the row’s click handler is too greedy and the dropdown won’t receive 
the click event.

I added the row’s click behavior like that in my DataTable impl:

protected Item newRowItem(String id, int index, IModel model) {
   Item item = super(newRowItem(id, index, model);
   item.add(new AjaxEventBehavior(„click“) {
  @Override
  protected void onEvent(AjaxRequestTarget target) {
 // ...
  }
   }
}

Anything I can do about that?

Cheers,
   Tom


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



Re: wicketstuff-select2 and Bootstrap 3

2016-01-15 Thread Tom Götz
Any chance for a Bootstrap theme (backport) for wicketstuff 6.x (i.e. select2 
version 3.x) …? We are currently still using Wicket 6.x and can’t update yet 
because of infrastructure restrictions (app server not supporting Java 7 :-/ ) …

Cheers,
   Tom


> On 15.01.2016, at 10:02, Ernesto Reinaldo Barreiro  wrote:
> 
> Gabriel,
> 
> Thanks for sharing! I ended up doing it a bit differently in order to be
> more compatible with existing select2 component. See
> 
> https://github.com/wicketstuff/core/pull/453
> 
> @martin-g, @solomax,
> 
> Sorry again about white spaces vs tabs noise: I need to find some time to
> fix that on my idea settings :-(
> 
> 
> On Thu, Jan 14, 2016 at 6:58 PM, Gabriel Landon  wrote:
> 
>> Ernesto,
>> 
>> I've done a simple behavior that I add to the select2 component when
>> needed.
>> 
>> public class Select2CssBehavior extends Behavior {
>>/** serialVersionUID. */
>>private static final long serialVersionUID = 1L;
>>/** Select2 CSS for bootstrap. */
>>private static final CssResourceReference SELECT2_CSS = new
>> CssResourceReference(Select2CssBehavior.class,
>>"select2-bootstrap.css");
>> 
>>@Override
>>public void renderHead(final Component varComponent, final
>> IHeaderResponse varResponse) {
>>super.renderHead(varComponent, varResponse);
>>varResponse.render(CssHeaderItem.forReference(SELECT2_CSS));
>>}
>> 
>> }
>> 
>> 
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/wicketstuff-select2-and-Bootstrap-3-tp4673303p467.html
>> Sent from the Users forum mailing list archive at Nabble.com.
>> 
>> -
>> 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



wicketstuff-select2 and Bootstrap 3

2016-01-13 Thread Tom Götz
Hi there,

does anybody have a working example for wicketstuff-select2 single/multi 
choices styled in Bootstrap 3 layout? I’m currently going bananas trying to 
integrate those into our Bootstrap-styled application. Any hint is welcome!

Cheers,
   Tom



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



Re: wicketstuff-select2 and Bootstrap 3

2016-01-13 Thread Tom Götz
Yeah, the CSS (after finished with playing) is exactly what I’d like to see ;-)

   Tom


> On 13.01.2016, at 14:52, Ernesto Reinaldo Barreiro <reier...@gmail.com> wrote:
> 
> I use them both together in my current project but I haven't got to the
> point where styling it is a priority: I did that before for a previous
> version of select2 and it was mostly playing with CSS.
> 
> On Wed, Jan 13, 2016 at 2:47 PM, Tom Götz <t...@decoded.de> wrote:
> 
>> Hi there,
>> 
>> does anybody have a working example for wicketstuff-select2 single/multi
>> choices styled in Bootstrap 3 layout? I’m currently going bananas trying to
>> integrate those into our Bootstrap-styled application. Any hint is welcome!
>> 
>> Cheers,
>>   Tom





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



Re: Enable single components inside a container that is disabled?

2015-12-01 Thread Tom Götz
Thanks for the hint! What about ajax behaviors (e.g. AjaxEventBehavior), is 
there also a way to enable them inside a disabled container (Wicket 6.x)?

Cheers,
   Tom


> On 30.11.2015, at 16:18, Sven Meier <s...@meiers.net> wrote:
> 
> Hi Tom,
> 
> in Wicket 6 you can override #isLinkEnabled() *and* 
> #canCallListenerInterface() both returning true.
> 
> Have fun
> Sven
> 
> On 30.11.2015 16:06, Tom Götz wrote:
>> Unfortunately the project ist still running Wicket 6.x :-|
>> 
>>Tom
>> 
>> 
>>> On 30.11.2015, at 15:59, Sven Meier <s...@meiers.net> wrote:
>>> 
>>> Hi,
>>> 
>>> in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().
>>> 
>>> Have fun
>>> Sven
>>> 
>>> 
>>> On 30.11.2015 15:54, Tom Götz wrote:
>>>> 
>>>> Hi there,
>>>> 
>>>> I have a form that can be either in „edit“ or „view“ mode. To toggle this, 
>>>> I simply call form.setEnabled(true|false), which works fine.
>>>> 
>>>> Now, I have some ajax links inside that form that should be enabled 
>>>> although the form itself is disabled. Yet, I found no way to achieve this, 
>>>> is that doable somehow?
>>>> 
>>>> Cheers,
>>>>Tom
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 



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



Re: Enable single components inside a container that is disabled?

2015-11-30 Thread Tom Götz
Unfortunately the project ist still running Wicket 6.x :-|

   Tom


> On 30.11.2015, at 15:59, Sven Meier <s...@meiers.net> wrote:
> 
> Hi,
> 
> in Wicket 7 your AjaxLinks can override #isEnabledInHierarchy().
> 
> Have fun
> Sven
> 
> 
> On 30.11.2015 15:54, Tom Götz wrote:
>> 
>> Hi there,
>> 
>> I have a form that can be either in „edit“ or „view“ mode. To toggle this, I 
>> simply call form.setEnabled(true|false), which works fine.
>> 
>> Now, I have some ajax links inside that form that should be enabled although 
>> the form itself is disabled. Yet, I found no way to achieve this, is that 
>> doable somehow?
>> 
>> Cheers,
>>Tom



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



Enable single components inside a container that is disabled?

2015-11-30 Thread Tom Götz

Hi there,

I have a form that can be either in „edit“ or „view“ mode. To toggle this, I 
simply call form.setEnabled(true|false), which works fine.

Now, I have some ajax links inside that form that should be enabled although 
the form itself is disabled. Yet, I found no way to achieve this, is that 
doable somehow?

Cheers,
   Tom


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



PropertyModel pointing at an IModel property

2015-11-11 Thread Tom Götz

Hi there,

I have the following situation:


MyClass extends Panel {

   private IModel someModel;

   MyClass(String id) {
  super(id);
  add(new Label(„label“, PropertyModel.of(this, „someModel“));
   }

}


But instead of displaying someModel’s modelObject, the Label displays 
someModel.toString(), which is how PropertyResolver is implemented (does not 
check if value instance IModel …). Is there a best practice how to handle such 
constructs?

Cheers,
   Tom



Re: PropertyModel pointing at an IModel property

2015-11-11 Thread Tom Götz
Yeah this will work, thanks. I did fear that somebody came around with that 
proposal ;-)

It would feel more „natural" if PropertyResolver/PropertyModel would care about 
calling model.getObject() (if the target value is an instance of IModel) though.

   Tom


> On 11.11.2015, at 10:51, Ernesto Reinaldo Barreiro <reier...@gmail.com> wrote:
> 
> What happens if you user "someModel.object"?
> 
> On Wed, Nov 11, 2015 at 10:48 AM, Tom Götz <t...@decoded.de> wrote:
> 
>> 
>> Hi there,
>> 
>> I have the following situation:
>> 
>> 
>> MyClass extends Panel {
>> 
>>   private IModel someModel;
>> 
>>   MyClass(String id) {
>>  super(id);
>>  add(new Label(„label“, PropertyModel.of(this, „someModel“));
>>   }
>> 
>> }
>> 
>> 
>> But instead of displaying someModel’s modelObject, the Label displays
>> someModel.toString(), which is how PropertyResolver is implemented (does
>> not check if value instance IModel …). Is there a best practice how to
>> handle such constructs?
>> 
>> Cheers,
>>   Tom
>> 
>> 
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro





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



Re: PropertyModel pointing at an IModel property

2015-11-11 Thread Tom Götz
Yeah, I can’t think of any situation where I’d prefer to see model.toString() 
instead of model.getObject().toString() …

   Tom


> On 11.11.2015, at 11:12, Ernesto Reinaldo Barreiro <reier...@gmail.com> wrote:
> 
> So, you if last thing after the . is a model ==> So, if the last thing
> after . is a model
> 
> On Wed, Nov 11, 2015 at 11:11 AM, Ernesto Reinaldo Barreiro <
> reier...@gmail.com> wrote:
> 
>> I see your point... I do not know if such a change could break existing
>> applications. Thought I guess not. So, you if last thing after the . is a
>> model, i.e. a.b -> b, is a model automatically call b.getObject
>> 
>> On Wed, Nov 11, 2015 at 11:02 AM, Tom Götz <t...@decoded.de> wrote:
>> 
>>> Yeah this will work, thanks. I did fear that somebody came around with
>>> that proposal ;-)
>>> 
>>> It would feel more „natural" if PropertyResolver/PropertyModel would care
>>> about calling model.getObject() (if the target value is an instance of
>>> IModel) though.
>>> 
>>>   Tom
>>> 
>>> 
>>>> On 11.11.2015, at 10:51, Ernesto Reinaldo Barreiro <reier...@gmail.com>
>>> wrote:
>>>> 
>>>> What happens if you user "someModel.object"?
>>>> 
>>>> On Wed, Nov 11, 2015 at 10:48 AM, Tom Götz <t...@decoded.de> wrote:
>>>> 
>>>>> 
>>>>> Hi there,
>>>>> 
>>>>> I have the following situation:
>>>>> 
>>>>> 
>>>>> MyClass extends Panel {
>>>>> 
>>>>>  private IModel someModel;
>>>>> 
>>>>>  MyClass(String id) {
>>>>> super(id);
>>>>> add(new Label(„label“, PropertyModel.of(this, „someModel“));
>>>>>  }
>>>>> 
>>>>> }
>>>>> 
>>>>> 
>>>>> But instead of displaying someModel’s modelObject, the Label displays
>>>>> someModel.toString(), which is how PropertyResolver is implemented
>>> (does
>>>>> not check if value instance IModel …). Is there a best practice how to
>>>>> handle such constructs?
>>>>> 
>>>>> Cheers,
>>>>>  Tom
>>>>> 
>>>>> 
>>>> 
>>>> 
>>>> --
>>>> Regards - Ernesto Reinaldo Barreiro
>>> 
>>> 
>>> 
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> 
>> --
>> Regards - Ernesto Reinaldo Barreiro
>> 
> 
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro





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



Re: Toggling visibility via ajax fails

2015-10-07 Thread Tom Götz
… additional info: container + contained components are visible if I do a page 
refresh

   Tom


> On 07.10.2015, at 12:42, Tom Götz <t...@decoded.de> wrote:
> 
> Hi there,
> 
> I’m currently struggling with toggling the visibility of a WebMarkupContainer:
> 
> * setOutputMarkupIdPlaceholderTag is set to true
> * container is not visible, i.e. contained components are hidden
> * ajax request is triggered that should make the container visible
> * the container is rerendered, I can see it’s contained components (that 
> should now be visible) in the generated ajax response
> 
> Still, they are *not* visible after the ajax request finished and I currently 
> have no clue where to look. Any hints maybe?
> 
> Cheers,
>   Tom



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



Toggling visibility via ajax fails

2015-10-07 Thread Tom Götz
Hi there,

I’m currently struggling with toggling the visibility of a WebMarkupContainer:

* setOutputMarkupIdPlaceholderTag is set to true
* container is not visible, i.e. contained components are hidden
* ajax request is triggered that should make the container visible
* the container is rerendered, I can see it’s contained components (that should 
now be visible) in the generated ajax response

Still, they are *not* visible after the ajax request finished and I currently 
have no clue where to look. Any hints maybe?

Cheers,
   Tom



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



Re: Toggling visibility via ajax fails

2015-10-07 Thread Tom Götz
Hi,

thanks for your hints, I have already checked all of this, otherwise I wouldn’t 
have asked ;-)

The container that’s toggled is added to the AjaxRequestTarget, which has no 
effect as described. If I add container.getParent() it works though … strange 
thing, will look even deeper.

   Tom




> On 07.10.2015, at 13:48, Martin Grigorov <mgrigo...@apache.org> wrote:
> 
> Hi Tom,
> 
> Check the browser DevTools.
> First check for JS errors in the console.
> Then check the response of the Ajax call - you should see the new HTML with
> all components there. Verify that the component id is existing in the DOM.
> Wicket will log an error if it is not anyway.
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Wed, Oct 7, 2015 at 12:44 PM, Tom Götz <t...@decoded.de> wrote:
> 
>> … additional info: container + contained components are visible if I do a
>> page refresh
>> 
>>   Tom
>> 
>> 
>>> On 07.10.2015, at 12:42, Tom Götz <t...@decoded.de> wrote:
>>> 
>>> Hi there,
>>> 
>>> I’m currently struggling with toggling the visibility of a
>> WebMarkupContainer:
>>> 
>>> * setOutputMarkupIdPlaceholderTag is set to true
>>> * container is not visible, i.e. contained components are hidden
>>> * ajax request is triggered that should make the container visible
>>> * the container is rerendered, I can see it’s contained components (that
>> should now be visible) in the generated ajax response
>>> 
>>> Still, they are *not* visible after the ajax request finished and I
>> currently have no clue where to look. Any hints maybe?
>>> 
>>> Cheers,
>>>  Tom
>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 





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



Bootstrap Typeahead example?

2015-06-23 Thread Tom Götz
Hi,

I’m currently trying to implement a Typeahead component using the 
wicket-bootstrap project (v 0.10.1, Wicket version 7.0.0-M5).
Is there some example how the template mechanism can be used 
(de.agilecoders.wicket.extensions.markup.html.bootstrap.form.typeaheadV10.DataSet#Templates)?
 I found one Typeahead example in the wicket-bootstrap-samples project, but no 
templates are used there. I’m looking for a way to e.g. add icons to each 
individual suggestion …

Any hint or small code sample available?

Cheers,
   -Tom




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



[OT] Available for hire

2015-05-06 Thread Tom Götz
Dear Wicketeers,

my current client engagement is coming to an end and I will be available for 
hire ~middle/end of May. If anyone has knowledge of some Wicket related project 
(preferably in Germany or central/western Europe or off-site/remote) that needs 
some support, I would be interested in hearing about! Please contact me 
directly. CV/profile is available on demand.

Please cut me some slack for abusing this list for that kind of emails, hope I 
didn’t violate any rules or hurt someone’s feelings ;-)

Regards,
   -Tom







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



Re: Could not clear select2Choice component model value.

2015-05-04 Thread Tom Götz
Done: https://github.com/wicketstuff/core/pull/402

Cheers,
   -Tom



 On 30.04.2015, at 09:31, Martin Grigorov mgrigo...@apache.org wrote:
 
 Hi Tom,
 
 Please send a PR with your suggested changes/improvements and we will
 discuss them.
 Thanks!
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov
 
 On Thu, Apr 30, 2015 at 10:27 AM, Tom Götz t...@decoded.de wrote:
 
 I found the source of the mentioned changes:
 
 https://github.com/wicketstuff/core/commit/79781d83cf11ac63d2e661328fa7176b93184c64
 
   -Tom
 
 
 On 30.04.2015, at 08:58, Tom Götz t...@decoded.de wrote:
 
 See my inline comments
 
 On 30.04.2015, at 04:29, Maxim Solodovnik solomax...@gmail.com wrote:
 
 
 The changes I have made were (most probably) merged from original Igor's
 code (https://github.com/ivaynberg/wicket-select2)
 
 I can’t find the ListT choices“ property of AbstractSelect2Choice
 anywhere in Igor’s original code, so I don’t know where it should have been
 merged from.
 
 What should be the purpose of having to provide a ChoiceProvider *and* a
 list of choices?! Currently you have to provide both to avoid an exception
 upon construction, which is … weird ;) and breaks existing implementations.
 
 
 1) I believe this is since AbstractSelect2Choice is parent class for for
 Single and Multi choices.
 
 That is so, but what does this explain? ;)
 
 
 2) the code was refactored a bit, so line numbers were changed. This
 constructor:
 
 https://github.com/wicketstuff/core/blob/wicket-6.x/jdk-1.6-parent/select2-parent/select2/src/main/java/org/wicketstuff/select2/AbstractSelect2Choice.java#L109
 seems to not throwing any exceptions
 
 Yeah, but another does. This pattern does not make any sense to me:
 
 class Foo {
 
   public Foo(Object a) {
   this(a, null);
   }
 
   public Foo(Object a, Object b) {
   if (b == null)
   throw new IllegalArgumentException();
   this.a = a;
   this.b = b;
   }
 }
 
 
 3) you can call constructor mentioned in 2 to avoid exception.
 
 …
 
 
 4) I guess renderChoice method is designed to render single choice
 object,
 you can override it (for ex. to add your own properties to each choice)
 other 2 methods are private helpers
 
 renderChoice is called from within renderChoices which is called from
 within renderHead. But only if !isAjax(), and:
 
 public boolean isAjax()
 {
  return provider != null;
 }
 
 …?
 
 That means: if no ChoiceProvider is set, then use the static ListT
 choices, but if you don’t provide a ChoiceProvider in the constructor
 you’ll get an IllegalArgumentException.
 
 This code is broken and doesn’t make any sense *to me*, or I didn’t get
 it yet ;-)
 
 My proposal is:
 
 if nobody can tell which problem should be solved with the introduced
 ListT choices I would revert it to get a working implementation again, as
 it is currently unusable.
 
 Personally, I need to upgrade the select.js library in our project,
 therefor I was looking at wicketstuff-select2, as we still use the original
 wicket-select2 implementation. The current state of it leaves mit three
 options, in order of priority:
 
 a)
 convince the wicketstuff-select2 maintainers to revert the code to a
 working state, which I am currently doing ;-)
 
 b)
 fork wicketstuff-select2 and provide own (working) implementation
 
 c)
 stick with Igor’s original code, which means: no upgrades to select2.js
 
 
 Maybe someone else can shed some light on this?
 
 Cheers,
  -Tom
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 


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



Re: Could not clear select2Choice component model value.

2015-04-30 Thread Tom Götz
See my inline comments

 On 30.04.2015, at 04:29, Maxim Solodovnik solomax...@gmail.com wrote:
 
 
 The changes I have made were (most probably) merged from original Igor's
 code (https://github.com/ivaynberg/wicket-select2)

I can’t find the ListT choices“ property of AbstractSelect2Choice anywhere 
in Igor’s original code, so I don’t know where it should have been merged from.

What should be the purpose of having to provide a ChoiceProvider *and* a list 
of choices?! Currently you have to provide both to avoid an exception upon 
construction, which is … weird ;) and breaks existing implementations.


 1) I believe this is since AbstractSelect2Choice is parent class for for
 Single and Multi choices.

That is so, but what does this explain? ;)


 2) the code was refactored a bit, so line numbers were changed. This
 constructor:
 https://github.com/wicketstuff/core/blob/wicket-6.x/jdk-1.6-parent/select2-parent/select2/src/main/java/org/wicketstuff/select2/AbstractSelect2Choice.java#L109
 seems to not throwing any exceptions

Yeah, but another does. This pattern does not make any sense to me:

class Foo {

public Foo(Object a) {
this(a, null);
}

public Foo(Object a, Object b) {
if (b == null)
throw new IllegalArgumentException();
this.a = a;
this.b = b;
}
}


 3) you can call constructor mentioned in 2 to avoid exception.

…


 4) I guess renderChoice method is designed to render single choice object,
 you can override it (for ex. to add your own properties to each choice)
 other 2 methods are private helpers

renderChoice is called from within renderChoices which is called from within 
renderHead. But only if !isAjax(), and:

public boolean isAjax()
{
   return provider != null;
}

…?

That means: if no ChoiceProvider is set, then use the static ListT choices, 
but if you don’t provide a ChoiceProvider in the constructor you’ll get an 
IllegalArgumentException.

This code is broken and doesn’t make any sense *to me*, or I didn’t get it yet 
;-)

My proposal is:

if nobody can tell which problem should be solved with the introduced ListT 
choices I would revert it to get a working implementation again, as it is 
currently unusable.

Personally, I need to upgrade the select.js library in our project, therefor I 
was looking at wicketstuff-select2, as we still use the original wicket-select2 
implementation. The current state of it leaves mit three options, in order of 
priority:

a)
convince the wicketstuff-select2 maintainers to revert the code to a working 
state, which I am currently doing ;-)

b)
fork wicketstuff-select2 and provide own (working) implementation

c)
stick with Igor’s original code, which means: no upgrades to select2.js


Maybe someone else can shed some light on this?

Cheers,
   -Tom




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



Re: Could not clear select2Choice component model value.

2015-04-30 Thread Tom Götz
I found the source of the mentioned changes:
https://github.com/wicketstuff/core/commit/79781d83cf11ac63d2e661328fa7176b93184c64

   -Tom


 On 30.04.2015, at 08:58, Tom Götz t...@decoded.de wrote:
 
 See my inline comments
 
 On 30.04.2015, at 04:29, Maxim Solodovnik solomax...@gmail.com wrote:
 
 
 The changes I have made were (most probably) merged from original Igor's
 code (https://github.com/ivaynberg/wicket-select2)
 
 I can’t find the ListT choices“ property of AbstractSelect2Choice anywhere 
 in Igor’s original code, so I don’t know where it should have been merged 
 from.
 
 What should be the purpose of having to provide a ChoiceProvider *and* a list 
 of choices?! Currently you have to provide both to avoid an exception upon 
 construction, which is … weird ;) and breaks existing implementations.
 
 
 1) I believe this is since AbstractSelect2Choice is parent class for for
 Single and Multi choices.
 
 That is so, but what does this explain? ;)
 
 
 2) the code was refactored a bit, so line numbers were changed. This
 constructor:
 https://github.com/wicketstuff/core/blob/wicket-6.x/jdk-1.6-parent/select2-parent/select2/src/main/java/org/wicketstuff/select2/AbstractSelect2Choice.java#L109
 seems to not throwing any exceptions
 
 Yeah, but another does. This pattern does not make any sense to me:
 
 class Foo {
 
public Foo(Object a) {
this(a, null);
}
 
public Foo(Object a, Object b) {
if (b == null)
throw new IllegalArgumentException();
this.a = a;
this.b = b;
}
 }
 
 
 3) you can call constructor mentioned in 2 to avoid exception.
 
 …
 
 
 4) I guess renderChoice method is designed to render single choice object,
 you can override it (for ex. to add your own properties to each choice)
 other 2 methods are private helpers
 
 renderChoice is called from within renderChoices which is called from within 
 renderHead. But only if !isAjax(), and:
 
 public boolean isAjax()
 {
   return provider != null;
 }
 
 …?
 
 That means: if no ChoiceProvider is set, then use the static ListT choices, 
 but if you don’t provide a ChoiceProvider in the constructor you’ll get an 
 IllegalArgumentException.
 
 This code is broken and doesn’t make any sense *to me*, or I didn’t get it 
 yet ;-)
 
 My proposal is:
 
 if nobody can tell which problem should be solved with the introduced ListT 
 choices I would revert it to get a working implementation again, as it is 
 currently unusable.
 
 Personally, I need to upgrade the select.js library in our project, therefor 
 I was looking at wicketstuff-select2, as we still use the original 
 wicket-select2 implementation. The current state of it leaves mit three 
 options, in order of priority:
 
 a)
 convince the wicketstuff-select2 maintainers to revert the code to a working 
 state, which I am currently doing ;-)
 
 b)
 fork wicketstuff-select2 and provide own (working) implementation
 
 c)
 stick with Igor’s original code, which means: no upgrades to select2.js
 
 
 Maybe someone else can shed some light on this?
 
 Cheers,
   -Tom
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


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



Re: Could not clear select2Choice component model value.

2015-04-29 Thread Tom Götz
Sorry, Github link was broken in last email (additional „:“ at the end), use 
this:
https://github.com/wicketstuff/core/commit/92851a253253849582a117d66dee5fcdb15c7353

   -Tom


 On 29.04.2015, at 14:01, Tom Götz t...@decoded.de wrote:
 
 Hi Maxim,
 
 I do not understand the changes you introduced to AbstractSelect2Choice.java 
 in 
 https://github.com/wicketstuff/core/commit/92851a253253849582a117d66dee5fcdb15c7353:
 [...]



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



Re: Could not clear select2Choice component model value.

2015-04-29 Thread Tom Götz
Hi Maxim,

I do not understand the changes you introduced to AbstractSelect2Choice.java in 
https://github.com/wicketstuff/core/commit/92851a253253849582a117d66dee5fcdb15c7353:

1.
you added a private ListT choices“ property, what is the purpose of this? 
Isn’t the ChoiceProvider supposed to provide the list of choices?

2.
in lines 130 and 133 you throw an IllegalStateException if either choices or 
renderer is null. Besides the fact that I didn’t get the purpose of the 
„choices“ list yet: this breaks several of our implementations, as we have 
select2 implementations where it’s not possible to determine the ChoiceProvider 
upon construction, but e.g. in onInitialize (we have several abstract select2 
choice classes, where only the concrete implementation can know which 
choiceprovider to use …)

3.
you can now call the constructor in line 74 (public 
AbstractSelect2Choice(String id, IModelM model)) which generates above 
mentioned IllegalStateException …

4.
methods added starting in line 351: these use the newly introduced ListT 
choices, could you explain the idea behind that?

Thanks in advance!

   -Tom




 On 30.11.2014, at 16:32, Maxim Solodovnik solomax...@gmail.com wrote:
 
 Merged!
 
 Seems to work as expected in our application
 Thanks for the fix Martin!
 
 On Wed, Nov 26, 2014 at 10:20 AM, Maxim Solodovnik solomax...@gmail.com
 wrote:
 
 Thanks a lot!
 I'll backport!
 
 On Wed, Nov 26, 2014 at 1:34 AM, Martin Grigorov mgrigo...@apache.org
 wrote:
 
 Fixed with
 
 https://github.com/wicketstuff/core/commit/b7e5b68b858336d85958663204166bd0852b43dd
 Hopefully all other use cases are still covered.
 
 I just noticed that there is
 
 https://github.com/wicketstuff/core/tree/wicket-6.x/jdk-1.6-parent/select2-parent
 (i.e. Wicket 6.x version).
 It would be good if someone backports the improvements from master branch
 to wicket-6.x:
 
 https://github.com/wicketstuff/core/commits/master/jdk-1.7-parent/select2-parent
 It seems Igor has been active last month at
 https://github.com/ivaynberg/wicket-select2/ and merged few PRs. I've
 ported them to WicketStuff 7.x but not to 6.x.
 
 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov



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



Ace Editor Wicket integration?

2015-03-16 Thread Tom Götz
Hi folks,

has anybody already done a successful Wicket integration of the Ace code editor 
(https://github.com/ajaxorg/ace https://github.com/ajaxorg/ace) and is 
willing to share it (or at least some code snippets)?

   -Tom




6.19.0 release date?

2015-01-22 Thread Tom Götz
Hi there,

are there already considerations for a release date of 6.19.0?

Cheers,
   -Tom



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



CircularDependencyException when upgrading from Wicket 6.9.0 to 6.10.0

2014-11-07 Thread Tom Götz
Hi there,

I’m trying to upgrade some semi-legacy app to the current Wicket version. I 
discovered that I get a CircularDependencyException when upgrading from 6.9.0 
to 6.10.0 without any code changes.

I created a quickstart based on Wicket 6.10.0 that throws the exception when 
opening the home page (when changing to 6.9.0 everything is fine): 
https://dl.dropboxusercontent.com/u/236111/quickstart.zip

The demo app uses some jquery(-ui) resource references and resource 
replacements. Could someone point me into the right direction maybe?

Cheers,
   -Tom


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



Re: ResourceModel with default *key*

2014-11-06 Thread Tom Götz
You could try something like this: 
https://gist.github.com/tgoetz/0735b05d47b16acf2fd7 
https://gist.github.com/tgoetz/0735b05d47b16acf2fd7

Cheers,
   -Tom


 On 06.11.2014, at 11:53, Guillaume Smet guillaume.s...@gmail.com wrote:
 
 Hi all,
 
 Maybe we are missing something but we haven't found an elegant way to
 have a ResourceModel with a default *key* if the current key doesn't
 exist.
 
 There is a mechanism for a default *string* but it's not sufficient
 for us (we want to be able to specialize the key if needed but have an
 internationalized default if not).
 
 Suggestions welcome!
 
 Thanks.
 
 -- 
 Guillaume



Tracking changes when updating models

2014-10-29 Thread Tom Götz
Hi there,

I need to track all modifications made to FormComponents' target objects in 
order to generate some kind of changelog when saving my entity. Therefore I 
created a custom Model that wraps the components' default model and remembers 
the original value when setObject is called.

This works fine but breaks for FormComponents that use 
FormComponent#updateCollectionModel to update their model object (CheckGroup, 
ListMultipleChoice, MultiFileUploadField) because of the implementation of 
updateCollectionModel, which manipulates the collection in place and calls 
setObject with the already updated collection (see here: http://bit.ly/1nPoniW 
http://bit.ly/1nPoniW).

I tried to find another way to react upon model object changes and found 
Page#componentModelChanging (http://bit.ly/ZZdiRr), which is called from within 
Component#modelChanging. Unfortunately this method is final void, and thus 
can’t be overridden (does this make sense? Nothing can’t be done with the 
„component parameter …).

Any pointer where I should look to get this done with the existing Wicket code 
(I use Wicket 6.17.0)?

I could think of several solutions for supporting that usecase:

* FormComponent#updateCollectionModel: don’t update the collection in place but 
hand the unmodified collection to setObject
* remove the „final“ from Page#componentModelChanging and add at least a 
„protected“
* my favorite: introduce a new listener for component model changes, so that 
it’s easy to hook into that process, analogue to 
IComponentOnBeforeRenderListener and friends (e.g. IModelUpdateListener, called 
before and after model updates ...)

What do you think?

Cheers,
   -Tom




Re: Global Ajax Event Handler

2014-09-09 Thread Tom Götz
See https://cwiki.apache.org/confluence/display/WICKET/Wicket+Ajax, section 
Global Ajax call listeners“.

Cheers,
   -Tom


On 09.09.2014, at 10:58, Tobias Soloschenko tobiassolosche...@googlemail.com 
wrote:

 Hi all, 
 
 is there a way to register a global ajax event handler within Wicket? For 
 normal there is the AbstractDefaultAjaxBehavior which is added to a 
 component. And then the CallbackScript can be obtained and used within a 
 OnDomReadyHeaderItem for example.
 
 Is there a way to do this on application level so that Im able to get the 
 CallbackScript from the instantiated Application? 
 
 kind regards 
 
 Tobias
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 






Change name of session cookie

2014-05-16 Thread Tom Götz
Hi,

might be slightly offtopic, but: does someone know how to change to name of the 
session cookie from „JSESSIONID“ to something else (in Tomcat 7.0.42 and Jetty 
6.1.26)?. Background: we have a Wicket app that runs inside an iFrame of 
another Wicket app, so we have two cookies named „JESSESIONID“ …

Cheers,
   -Tom


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



Re: Change name of session cookie

2014-05-16 Thread Tom Götz
Ah, wrong. It seems that there’s only one cookie. But both apps seem to have 
the same session id (running in the same container) …

   -Tom

On 16.05.2014, at 15:13, Tom Götz t...@decoded.de wrote:

 Hi,
 
 might be slightly offtopic, but: does someone know how to change to name of 
 the session cookie from „JSESSIONID“ to something else (in Tomcat 7.0.42 and 
 Jetty 6.1.26)?. Background: we have a Wicket app that runs inside an iFrame 
 of another Wicket app, so we have two cookies named „JESSESIONID“ …
 
 Cheers,
   -Tom
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 



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



Re: AjaxTabbedPanel and validation for all tabs

2014-05-15 Thread Tom Götz
The easiest solution I can think of. Why do you want to avoid that?

Cheers,
   -Tom

On 06.05.2014, at 16:13, mscoon msc...@gmail.com wrote:

 Is there a way to solve this? Client side tabs are a solution I guess but
 one I'd like to avoid if possible.






Re: Application Scope

2014-05-06 Thread Tom Götz
You can’t, and it isn’t a deficiency, just think about e.g. session replication 
among multiple cluster nodes.

Cheers,
   -Tom


On 06.05.2014, at 15:52, Richard W. Adams rwada...@up.com wrote:

 I assume that means we can't store non-serializable objects in the 
 session? This is sounding like a serious deficiency in Wicket's 
 architecture...
 
 
 
 
 From:   Francois Meillet francois.meil...@gmail.com
 To: users@wicket.apache.org
 Date:   05/06/2014 08:48 AM
 Subject:Re: Application Scope
 
 
 
 sessions are serialised
 
 François Meillet
 Formation Wicket - Développement Wicket
 
 
 
 
 
 Le 6 mai 2014 à 15:28, Richard W. Adams rwada...@up.com a écrit :
 
 One more question: Since each task is associated with a single user, 
 would 
 it make more sense to create a task map in Session scope? Or will Wicket 
 
 try to serialize a map we put into the session?
 
 
 
 
 From:   Martin Grigorov mgrigo...@apache.org
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/06/2014 08:06 AM
 Subject:Re: Application Scope
 
 
 
 Please don't change the thread subject for all your answers. This 
 confuses
 the threading support in some mail clients.
 
 I meant *My*Application, i.e. *Your*Application.
 Add this method and map/associate all tasks that your run to some 
 id/key.
 Serialize the key and later get a reference to the FutureTask with
 something like:
 YourApp.get().getTasks().get(theKey).isDone()/.isCanceled()/...
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Tue, May 6, 2014 at 2:50 PM, Richard W. Adams rwada...@up.com 
 wrote:
 
 Are you referring to org.apache.wicket.Application? I don't see a
 getTasksMap() method there.  We use Wicket 1.4.17  our company will 
 not
 allow us to upgrade to newer versions). If getTasksMap() is unavailable 
 
 in
 1.4.17, could Application.getSharedResources() be used in a similar 
 way?
 
 
 
 
 From:   Martin Grigorov mgrigo...@apache.org
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/06/2014 07:26 AM
 Subject:Re: Background Threading
 
 
 
 Hi,
 
 You can put the tasks in an application scoped structure (e.g.
 MyApplication.get().getTasksMap()) and use a serializable key.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Tue, May 6, 2014 at 2:11 PM, Richard W. Adams rwada...@up.com 
 wrote:
 
 Interesting approach. Our use case is more complex, as it runs a
 background task in a separate thread. Our task has three basic
 requirements. It must:
 
 1. Be cancellable.
 
 2. Report its outcome (success/failure/warning).
 
 3. Report incremental progress.
 
 Our fundamental problem is not how to display the progress bar, it's 
 how
 to determine the outcome of the background thread. That's an
 unexpectedly
 a tough nut to crack. The vast majority of examples we've seen use the
 Runnable interface (which doesn't help us, as it can't be canceled or
 return a value), rather than Callable interface (which meets our 
 needs,
 but doesn't seem to play well with Wicket)
 
 
 
 
 From:   Colin Rogers colin.rog...@objectconsulting.com.au
 To: users@wicket.apache.org users@wicket.apache.org
 Date:   05/05/2014 08:14 PM
 Subject:RE: Progress Bar
 
 
 
 There is a pretty nifty, jquery based progress bar, in 
 wicket-jquery-ui
 library...
 
 
 
 
 http://www.7thweb.net/wicket-jquery-ui/progressbar/DefaultProgressBarPage
 
 Cheers,
 Col.
 
 -Original Message-
 From: Richard W. Adams [mailto:rwada...@up.com]
 Sent: Tuesday, 6 May 2014 3:19 AM
 To: users@wicket.apache.org
 Subject: Progress Bar
 
 We have a requirement to implement a progress bar for long-running
 server
 operations. We can't use the code at
 https://github.com/wicketstuff/core/wiki/Progressbar, because it 
 doesn't
 meet our corporate user interface look-and-feel standards.
 
 So, we started our own implementation. Our test page contains these
 methods below (the TestExecutor below class implements
 CallableExecutorResult).
 
 
 
 
 
 
 //--
 private Component createButton() {
   return new AjaxButton(start-button) {
   private static final long serialVersionUID = -1;
 
   @Override protected void onSubmit(final
 AjaxRequestTarget
 ajax, final Form? form) {
 
   final ExecutorService service = Executors.
 newSingleThreadExecutor();
   try {
   final ProgressBarTestPage page =
 ProgressBarTestPage.this;
   final TransactionData data = new
 TransactionData (page.getId(), false);
   final TestExecutor executor = new
 TestExecutor(data, getPermissions());
 
   executor.addListener(page); //
 Request
 notification when done
   future = service.submit(executor); //
 Begin execution
   

Problems with wicket-select2 and session timeout

2014-04-02 Thread Tom Götz
Hello everyone,

I already posted this on https://github.com/ivaynberg/wicket-select2/issues/83 
but thought I could mention it here also, as I’m not sure yet if the described 
problem is related to wicket-select2 or Wicket itself:

if my current session is already expired and I click a Select2Choice, Wicket 
creates an ajax response containing a redirect (see here: 
http://bit.ly/1flepiM) but this response is never digestet by 
wicket-ajax-jquery.js, because it is not even loaded on the current page (no 
ajax components/behaviors). Even if there are other ajax components on the page 
and wicket-ajax-jquery.js is loaded, processAjaxResponse is never called. The 
result is that the redirect is not happening and the select2 gets stuck (like 
this: http://bit.ly/1fligwv).

I created a quickstart to demonstrate this: http://bit.ly/1flfQOc (the session 
timeout is set to 1min in web.xml):

- open browser on localhost:8080
- wait for 1min
- click on select2
- look at response in e.g. firebug

Wicket identifies the request as „ajax“ because wicket-select2 sets the 
WebRequest.PARAM_AJAX parameter. If the request is processed correctly, the 
JSON response is returned and digested, but in case of a server-side error 
(e.g. PageExpiredException) the returned ajax response is not consumed 
(wicket-ajax-jquery.js not loaded) , as far as I do understand the code.

Any hints?

Cheers,
   -Tom




Re: wicket:header-items/

2014-03-14 Thread Tom Götz
This is really helpful, thanks for your time!

Cheers,
   -Tom

On 14.03.2014, at 13:50, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 At http://wicketinaction.com/2014/03/header-contributions-positioning/ I've
 added a short description of a new special wicket tag -
 wicket:header-items/.
 It will be available with Wicket 6.15.0.
 
 I hope you will find it useful!
 
 Martin Grigorov
 Wicket Training and Consulting


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



Re: Pure in-memory IPageStore implementation?

2014-03-06 Thread Tom Götz

On 06.03.2014, at 08:39, Martin Grigorov mgrigo...@apache.org wrote:

 On Thu, Mar 6, 2014 at 9:29 AM, Tom Götz t...@decoded.de wrote:
 
 Hi there,
 
 I have an application that doesn’t need back-button support and also has
 several domain objects that are not meant to be serialized. I thought it
 could be a good idea to implement an IPageStore that skips serialization
 and simply keeps the last n pages in memory (where n might be 5-10 e.g.).
 Does this sound like a reasonable plan or do you see any pitfalls with that
 approach?
 
 
 Where you will store the pages ?
 I guess you will put them in the Session. Be aware that the Wicket Session
 is stored as an attribute in the Http session. You will need custom
 ISessionStore if you want to avoid this. If you put non-Serializable
 objects in the http session then you have to make sure the http session is
 not replicated by your web container.

Can’t I simply use an own cache (map), just like DefaultPageStore does it with 
SerializedPagesCache? With the only difference that I do not serialize the 
pages …!?


 What about ajax requests (I’m using a lot of them)? Let’s say n=5, i.e.
 I’m storing (only) the last 5 pages in memory, without serialization to
 disk. I start a page, pageId==1, then I’m doing 10 ajax requests on the
 page. Now when the user does a page reload, will he run into a
 PageExpiredException because the requested page with id=1 is not available
 any more in my pageStore?
 
 
 This is not how it works!
 Initially you store page with id X. In Ajax requests the pageId is not
 incremented, so after Ajax request the old page instance will be overridden
 by the new one (the one with the modifications done in the ajax request)
 because it has the same pageId.
 So in your example when the user does page reload (s)he will see the last
 version of the page, i.e. the state after the last Ajax request. All
 previous states will be gone.
 
 All this is valid only if you use the same composite key for the page store
 - sessionId+pageId.

Ok, thanks for clarification on that point!

Cheers,
   -Tom


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



Pure in-memory IPageStore implementation?

2014-03-05 Thread Tom Götz
Hi there,

I have an application that doesn’t need back-button support and also has 
several domain objects that are not meant to be serialized. I thought it could 
be a good idea to implement an IPageStore that skips serialization and simply 
keeps the last n pages in memory (where n might be 5-10 e.g.). Does this sound 
like a reasonable plan or do you see any pitfalls with that approach?

What about ajax requests (I’m using a lot of them)? Let’s say n=5, i.e. I’m 
storing (only) the last 5 pages in memory, without serialization to disk. I 
start a page, pageId==1, then I’m doing 10 ajax requests on the page. Now when 
the user does a page reload, will he run into a PageExpiredException because 
the requested page with id=1 is not available any more in my pageStore?

Cheers,
   -Tom



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



Re: Component Queueing is here (master), aka Free Wicket From Hierarchy Hell, aka Markup Driven Component Tree

2014-02-28 Thread Tom Götz
Having read your article, I think this sounds like a very promising approach. 
Thanks Igor!

Cheers,
   -Tom


On 28.02.2014, at 03:00, Igor Vaynberg igor.vaynb...@gmail.com wrote:

 in the past couple of weeks i finally had some time to finish up the
 component queueing feature. it is meant to greatly decrease common
 maintenance headaches associated with markup tweaks and moving
 components around. see the intro here:
 
 https://www.42lines.net/2014/02/28/component-queueing-in-wicket-7/
 
 -igor


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



Central exception handling using a custom RequestCycleListener

2014-02-19 Thread Tom Götz
Hi there,

we’d like to implement a centralized exception handling strategy for 
backend/service calls from with within Wicket components. Therefor I thought it 
could be a good idea to do this in a custom 
org.apache.wicket.request.cycle.AbstractRequestCycleListener#onException 
implementation. Depending on the caught exception we’d potentially like to do 
some cleanup logic (i.e. call methods on the currently requested page).

I’m not sure what is the best strategy to get the page instance in onException, 
and what about ajax requests? And hints or pointers?


Cheers,
   -Tom





signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Central exception handling using a custom RequestCycleListener

2014-02-19 Thread Tom Götz
Nice, I’ll have a look at that thingy ;-)

Thanks,
   -Tom


On 19.02.2014, at 16:56, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 You may use another IRequestCycleListener to track the last processed page
 - org.apache.wicket.request.cycle.PageRequestHandlerTracker
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Wed, Feb 19, 2014 at 5:53 PM, Tom Götz t...@decoded.de wrote:
 
 Hi there,
 
 we’d like to implement a centralized exception handling strategy for
 backend/service calls from with within Wicket components. Therefor I
 thought it could be a good idea to do this in a custom
 org.apache.wicket.request.cycle.AbstractRequestCycleListener#onException
 implementation. Depending on the caught exception we’d potentially like to
 do some cleanup logic (i.e. call methods on the currently requested page).
 
 I’m not sure what is the best strategy to get the page instance in
 onException, and what about ajax requests? And hints or pointers?
 
 
 Cheers,
   -Tom
 
 
 
 



signature.asc
Description: Message signed with OpenPGP using GPGMail


AjaxRequestTarget.IListener question

2014-02-05 Thread Tom Götz
Hi there,

I’d like to add something to the AjaxRequestTarget at the very end“, i.e. I 
need to be the last one to add something to the target (because I need to check 
some preconditions that might change if the target is manipulated later on).

Reading the Javadoc of 
org.apache.wicket.ajax.AjaxRequestTarget.IListener#onAfterRespond I learned 
that adding components at that stage is already too late. Is there an 
alternative to AjaxRequestTarget.IListener that might do the job?

Cheers,
   -Tom



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



Re: AjaxRequestTarget.IListener question

2014-02-05 Thread Tom Götz
Ok, I was misinterpreting the Javadoc of 
org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond: Triggered 
before ajax request target begins its response cycle“. That sounded to me as it 
was called *before* the action phase …

Thanks for the hint, I will try that.

Cheers,
   -Tom


On 05.02.2014, at 16:12, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 org.apache.wicket.ajax.AjaxRequestTarget.IListener#onBeforeRespond() is
 called after the action phase (e.g. onEvent, onSubmit) and before the
 rendering.
 Sounds like what you need.
 
 Martin Grigorov
 Wicket Training and Consulting
 
 
 On Wed, Feb 5, 2014 at 4:09 PM, Tom Götz t...@decoded.de wrote:
 
 Hi there,
 
 I’d like to add something to the AjaxRequestTarget at the very end“, i.e.
 I need to be the last one to add something to the target (because I need to
 check some preconditions that might change if the target is manipulated
 later on).
 
 Reading the Javadoc of
 org.apache.wicket.ajax.AjaxRequestTarget.IListener#onAfterRespond I learned
 that adding components at that stage is already too late. Is there an
 alternative to AjaxRequestTarget.IListener that might do the job?
 
 Cheers,
   -Tom
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 




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



Additional ajax request before ajax form submit

2013-09-27 Thread Tom Götz
Hi,

I have the following situation:
we use a tabpanel (8-10 tabs) to display lots of form components. On tab change 
the content of the activated tab is made visible via ajax, content of all other 
tabs is made invisible (setVisible(false)). To not lose user input we do a form 
submit when changing tabs, with setDefaultFormProcessing(false). All fine up to 
here.

Now: when I submit the form, only the data of the active tab is submitted, 
because all others are invisible at that moment. So I think I need to do an 
additional ajax request before submitting the form, to set all tab-content 
visible and after that submit the form. Does this sound like a good idea? How 
would I do that?

Cheers,
   -Tom



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



Re: Slow performance when tabbing through form elements

2013-09-22 Thread Tom Götz
No, I don't have tabindex yet. Does this really help the browser in determining 
the next tab?

   -Tom

_
On 22.09.2013, at 09:54, Martin Grigorov mgrigo...@apache.org wrote:

 Hi,
 
 You can try with Chrome's Dev Tools - Timeline - Events and Profile - CPU.
 Maybe one of those will show what is the reason.
 
 Do you have tabindex on the form elements ?
 
 
 On Sat, Sep 21, 2013 at 11:21 AM, Tom Götz t...@decoded.de wrote:
 
 Hi!
 
 I've got a performance problem when navigating through form elements using
 the tab key. This issue is not directly wicket related, but maybe someone
 could point me into the right direction how to analyze/improve the
 situation:
 
 we're using a tabpanel to render several tabs (~8-10) containing lots of
 form components. Tab-switiching is done client-side only, so there's no
 ajax roundtrip. Now if you focus one of the form components and hit the
 'tab' key to skip to the next form element, there's a noticeable delay of
 ~200-400ms, although there's no ajax involved. Could this be related to the
 amount of form components displayed, i.e. does it take that long for the
 browser to calculate/determine which element to focus next?
 
 How could I determine the cause for the delay?
 
 Cheers,
   -Tom
 
 
 





signature.asc
Description: Message signed with OpenPGP using GPGMail


Slow performance when tabbing through form elements

2013-09-21 Thread Tom Götz
Hi!

I've got a performance problem when navigating through form elements using the 
tab key. This issue is not directly wicket related, but maybe someone could 
point me into the right direction how to analyze/improve the situation:

we're using a tabpanel to render several tabs (~8-10) containing lots of form 
components. Tab-switiching is done client-side only, so there's no ajax 
roundtrip. Now if you focus one of the form components and hit the 'tab' key to 
skip to the next form element, there's a noticeable delay of ~200-400ms, 
although there's no ajax involved. Could this be related to the amount of form 
components displayed, i.e. does it take that long for the browser to 
calculate/determine which element to focus next?

How could I determine the cause for the delay?

Cheers,
   -Tom




signature.asc
Description: Message signed with OpenPGP using GPGMail