Re: Illegal Reflective Access in DefaultPropertyLocator

2021-01-18 Thread Rob Audenaerde
java.time.LocalDateTime does not have a `getDate` / `setDate`, so what you
did before was depending on internal implementation of LocalDateTime anyway
(private members), and not a very nice thing to do :).

You should write proper models for dealing with it, or write custom
converters I guess.

On Mon, Jan 18, 2021 at 5:14 PM Johannes Renoth 
wrote:

> Hello,
>
> In my project i have the following Warning since the Update to Java 11:
>
> The issue remains even after trying with the latest Version 9.2.0
>
> I am using a LocalDateTime Model Object with PropertyModel(LocalDateTime,
> "date").
>
> Of course i could try to split my Model into two parts date and time but
> it is much more convenient as it is now.
>
> Any suggestions what i could do?
>


Wicket and Web Application Firewalls

2020-07-07 Thread Rob Audenaerde
Hi all,

Do any of you have experience running a Wicket application behind a Web
Application Firewall? (
https://en.wikipedia.org/wiki/Web_application_firewall) and want to share
their experience?

I'm curious to know as we are planning to run our application directly
accessible on the internet. (behind nginx, but still)

-Rob


Re: one pass render, mounted page back button

2020-06-24 Thread Rob Audenaerde
Hi Sven,

I only actually need 1 level of 'back'

I thought of two (far fetched?) things:

1. Have an unbeforeunload trigger some ajax request that might store the
state and return some id that could be stored in the window.history and
detect the back, retrieve the id, and instantiate a new page with the old
state that somehow should be stored server side
2. Have the ajax calls manipulate the window.history somehow (need to have
1 extra page version, not sure how)

Maybe I should give up and try to find if I can differ the strategy based
on the user agent, so Google sees nice stuff, but the user a ?1 etc

Does that make sense?


On Wed, Jun 24, 2020, 17:44 Sven Meier  wrote:

> Hi Rob,
>
> without a redirect, your first page will be presented without page id in
> the url.
>
> Thus when you return back from another page, the browser will just
> request a fresh page. An F5 while on your first page should result in
> the same problem.
>
> I don't know how to square that circle.
>
> Have fun
> Sven
>
>
> On 24.06.20 17:12, Rob Audenaerde wrote:
> > Hi all,
> >
> > We switched our app to use the renderstategy ONE_PASS_RENDER for SEO
> > reasons (reduce the number of redirects).
> >
> > However, this causes the back-button to behave differently.
> >
> > Before, when we update a part of the screen via ajax; then following a
> > link, then going back shows the page as it was after all the ajax stuff.
> > (which is really great for users)
> >
> > Now, it generates a clean new page without all the changes.
> >
> > What would be the best way to still work around is problem? Or is there a
> > simple fix?
> >
> > Thanks in advance,
> > Rob Audenaerde
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


one pass render, mounted page back button

2020-06-24 Thread Rob Audenaerde
Hi all,

We switched our app to use the renderstategy ONE_PASS_RENDER for SEO
reasons (reduce the number of redirects).

However, this causes the back-button to behave differently.

Before, when we update a part of the screen via ajax; then following a
link, then going back shows the page as it was after all the ajax stuff.
(which is really great for users)

Now, it generates a clean new page without all the changes.

What would be the best way to still work around is problem? Or is there a
simple fix?

Thanks in advance,
Rob Audenaerde


Re: JS - defer automatic?

2020-06-23 Thread Rob Audenaerde
Hi Sven,

Thanks! that is really helpful, until now I manually added ,true to each
JavaScriptHeaderItem :/ Wish I knew this before :)

For all others reading this, it is as simple as adding this:

setHeaderResponseDecorator(response -> new ResourceAggregator(new
JavaScriptDeferHeaderResponse(response)));

to the Application.init()

Cheers!
-Rob


On Mon, Jun 22, 2020 at 6:41 PM Sven Meier  wrote:

> Hi Rob,
>
> have you tried JavaScriptDeferHeaderResponse?
>
> And here's some background on how we arrived at this solution:
>
> https://issues.apache.org/jira/browse/WICKET-6498
>
> Have fun
> Sven
>
>
> On 22.06.20 13:23, Rob Audenaerde wrote:
> > Hi all,
> >
> > I'm trying to increase the google-page-speed of some WicketApplication.
> It
> > seems most jquery javascript is 'blocking', i.e. not usign 'defer'.
> >
> > For example this google-chrome-audit section:
> >
> > URL
> > Size
> > Potential Savings
> > …jquery/jquery-2.2.4-ver-F9E….js
> > <
> http://localhost:8080/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-ver-F9EE266EF993962AD59E804AD9DEBE66.js
> >
> > (localhost)
> > 167 KB
> > 2,560 ms
> > …com.googlecode.wicket.jquery.ui.resource.JQueryUIR…/jquery-….js
> > <
> http://localhost:8080/wicket/resource/com.googlecode.wicket.jquery.ui.resource.JQueryUIResourceReference/jquery-ui-ver-0A819924D70A18322660DEE759225D2B.js
> >
> > (localhost)
> > 494 KB
> > 4,360 ms
> > …js/wicket-aj….js
> > <
> http://localhost:8080/wicket/resource/org.apache.wicket.ajax.AbstractDefaultAjaxBehavior/res/js/wicket-ajax-jquery-ver-3A8C326A8436172FC95523D517EBC88B.js
> >
> > (localhost)
> > 86 KB
> > 1,660 ms
> > /style.css <http://localhost:8080/style.css>
> > (localhost)
> > 4 KB
> > 310 ms
> >
> > Is there a reason why this is all non-deferred? Or an easy way to change
> > this? Most functionality is added in an DomReady event anyway.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


JS - defer automatic?

2020-06-22 Thread Rob Audenaerde
Hi all,

I'm trying to increase the google-page-speed of some WicketApplication. It
seems most jquery javascript is 'blocking', i.e. not usign 'defer'.

For example this google-chrome-audit section:

URL
Size
Potential Savings
…jquery/jquery-2.2.4-ver-F9E….js

(localhost)
167 KB
2,560 ms
…com.googlecode.wicket.jquery.ui.resource.JQueryUIR…/jquery-….js

(localhost)
494 KB
4,360 ms
…js/wicket-aj….js

(localhost)
86 KB
1,660 ms
/style.css 
(localhost)
4 KB
310 ms

Is there a reason why this is all non-deferred? Or an easy way to change
this? Most functionality is added in an DomReady event anyway.


Re: AjaxEventBehavior/AjaxFormComponentUpdatingBehavior & visibility

2020-01-21 Thread Rob Audenaerde
Hi Sven,

Thanks for double-checking!

The weird thing is that I thought this solved my problem, but when I tried
to create the quickstart; I couldn't reproduce it either :o. I seem to have
been mistakenly assuming it was this piece of code that fixed the problem.

So I tried to build it more towards our application and I saw a
 that causes this behavior (the isVisibleInHierarchy() is
not working there).

I attached the quickstart for those who want to experiment with it.

-Rob

On Mon, Jan 20, 2020 at 7:17 PM Sven Meier  wrote:

> Hi Rob,
>
> actually I wasn't able to reproduce the problem on a second try (not
> sure what I tested before).
>
> Can you create a a quickstart showing the problem?
>
> Sven
>
> On 20.01.20 13:18, Sven Meier wrote:
> > Hi Rob,
> >
> >> the 'correct' way to solve this?
> >
> > the component is explicitly added to the Ajax request for an update,
> > but decides to hide itself in onConfigure().
> > Perfectly valid usecase IMHO, but the head will be rendered
> > nevertheless :/
> >
> > Just tested with 7.x, 8.x and master, this seems to have been that way
> > forever.
> > But maybe we can improve that in Wicket core?
> >
> > Sven
> >
> >
> > On 20.01.20 10:36, Rob Audenaerde wrote:
> >> Hi all,
> >>
> >> I recently got some javascript errors that came from behaviors of
> >> components that where triggered to be visible or invisible in the dom
> >> (using onConfigure()) in an ajax request.
> >>
> >> Typically something like:
> >>
> >> Wicket.Ajax:  Cannot bind a listener for event "change" on element
> >> "format1dd" because the element is not in the DOM
> >>
> >> I solve this by adding an isVisibleInHierarchy() check in the
> >> renderHead()
> >> like this:
> >>
> >> @Override
> >>
> >> public void renderHead(final Component component, final IHeaderResponse
> >> response) {
> >>  if (component.isVisibleInHierarchy()) {
> >>  super.renderHead(component, response);
> >>  }
> >> }
> >>
> >> I was wondering if this is the 'correct' way to solve this? Or am I
> >> doing
> >> something wrong?
> >>
> >> Please advise :)
> >>
> >> -Rob
> >>
> >
> > -
> > 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
>
>


visible.bz2
Description: application/bzip

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

AjaxEventBehavior/AjaxFormComponentUpdatingBehavior & visibility

2020-01-20 Thread Rob Audenaerde
Hi all,

I recently got some javascript errors that came from behaviors of
components that where triggered to be visible or invisible in the dom
(using onConfigure()) in an ajax request.

Typically something like:

Wicket.Ajax:  Cannot bind a listener for event "change" on element
"format1dd" because the element is not in the DOM

I solve this by adding an isVisibleInHierarchy() check in the renderHead()
like this:

@Override

public void renderHead(final Component component, final IHeaderResponse
response) {
if (component.isVisibleInHierarchy()) {
super.renderHead(component, response);
}
}

I was wondering if this is the 'correct' way to solve this? Or am I doing
something wrong?

Please advise :)

-Rob


Re: An open source git server written with Wicket

2019-01-06 Thread Rob Audenaerde
Looks good!

You should add onedev.io repo to the demo though :)

On Mon, Jan 7, 2019 at 12:25 AM Robin Shen  wrote:

> Dear wicket user,
>
>
> I'd like to introduce an open source project - OneDev. It is a self-hosted
> git server with unique features. The technology stack used is Wicket +
> JQuery. Welcome any contributions.
>
>
> Learn more at https://onedev.io
>
>
> Regards
>
> Robin
>


Re: error shutting down

2018-10-26 Thread Rob Audenaerde
Will do, but after the weekend :D

On Fri, Oct 26, 2018 at 5:58 PM Maxim Solodovnik 
wrote:

> Hello Rob,
>
> The PR was merged, so you can verify the fix using 8.2.0-SNAPSHOT (in ~30
> minutes or so ) :))
>
> On Wed, 24 Oct 2018 at 15:09, Maxim Solodovnik 
> wrote:
>
> > BTW master branch of our project is already uses wicket 8.2.0-SNAPSHOT
> >
> > On Wed, 24 Oct 2018 at 15:07, Maxim Solodovnik 
> > wrote:
> >
> >> My steps were:
> >>
> >> 0) locate problem test (TestInstall in my case)
> >> 1) build updated wicket-core
> >> 2) Run problem test in a loop:
> >> reset && for i in `seq 0 200`; do echo; echo; echo "--- ${i}
> >> -"; echo; echo; echo; mvn clean test
> >> -DgenerateReports=false -Dtest=TestInstall -o; done
> >>
> >> We also can merge this code (after proper review)
> >> And then it can be tested using Jenkins and 8.2.0-SNAPSHOT as wicket
> >> version
> >>
> >> On Wed, 24 Oct 2018 at 15:02, Rob Audenaerde 
> >> wrote:
> >>
> >>> Thank you Maxim!
> >>>
> >>> I'd gladly test this.
> >>> Is there an standard/easy (maven?) way to test this in my application?
> >>>
> >>> -Rob
> >>>
> >>> On Wed, Oct 24, 2018 at 9:52 AM Maxim Solodovnik  >
> >>> wrote:
> >>>
> >>> > Here is the JIRA [1]
> >>> >
> >>> > I was able to reproduce this issue running one of our tests in a bash
> >>> loop
> >>> > Original 8.2.0-SNAPSHOT usually hang on <10th iteration
> >>> >
> >>> > After this [1] fix, it flawlessly works 201 iterations
> >>> > I would appreciate if you can review/test these changes
> >>> >
> >>> > [1] https://issues.apache.org/jira/browse/WICKET-6603
> >>> > [2] https://github.com/apache/wicket/pull/300
> >>> >
> >>> >
> >>> > On Fri, 12 Oct 2018 at 21:59, Rob Audenaerde <
> rob.audenae...@gmail.com
> >>> >
> >>> > wrote:
> >>> >
> >>> > > BTW: I currently worked around it by (very ugly) adding a
> >>> > > Thread.sleep(1000) between the last test-action in Wicket and the
> >>> > > Jetty-shutdown. So it seems a timing issue (which probably explains
> >>> why
> >>> > > Maxim has been seeing Jenkins failing occasionally).
> >>> > >
> >>> > > Thanks for checking into this!
> >>> > >
> >>> > > -Rob
> >>> > >
> >>> > > On Fri, Oct 12, 2018 at 4:08 PM Rob Audenaerde <
> >>> rob.audenae...@gmail.com
> >>> > >
> >>> > > wrote:
> >>> > >
> >>> > > > Is there a simple way to disable the AsynchronousDataStore (for
> >>> now)?
> >>> > > >
> >>> > > > On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik <
> >>> solomax...@gmail.com
> >>> > >
> >>> > > > wrote:
> >>> > > >
> >>> > > >> I'm occasionally able to see this error on Apache Jenkins, but
> >>> > > >> unfortunately there is no clear steps to reproduce
> >>> > > >> I was unable to find what is wrong, will spend some more time on
> >>> this
> >>> > > >> next week
> >>> > > >> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov <
> >>> mgrigo...@apache.org>
> >>> > > >> wrote:
> >>> > > >> >
> >>> > > >> > Hi,
> >>> > > >> >
> >>> > > >> > When the application stops Application#destroy() should call
> >>> > > >> > AsynchronousDataStore#destroy() (
> >>> > > >> >
> >>> > > >>
> >>> > >
> >>> >
> >>>
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
> >>> > > >> > )
> >>> > > >> > There it will interrupt the page saving thread and it should
> >>> stop:
> >>> > > >> >
> >>> > > >>
> >>> > >
&

Re: error shutting down

2018-10-24 Thread Rob Audenaerde
Thank you Maxim!

I'd gladly test this.
Is there an standard/easy (maven?) way to test this in my application?

-Rob

On Wed, Oct 24, 2018 at 9:52 AM Maxim Solodovnik 
wrote:

> Here is the JIRA [1]
>
> I was able to reproduce this issue running one of our tests in a bash loop
> Original 8.2.0-SNAPSHOT usually hang on <10th iteration
>
> After this [1] fix, it flawlessly works 201 iterations
> I would appreciate if you can review/test these changes
>
> [1] https://issues.apache.org/jira/browse/WICKET-6603
> [2] https://github.com/apache/wicket/pull/300
>
>
> On Fri, 12 Oct 2018 at 21:59, Rob Audenaerde 
> wrote:
>
> > BTW: I currently worked around it by (very ugly) adding a
> > Thread.sleep(1000) between the last test-action in Wicket and the
> > Jetty-shutdown. So it seems a timing issue (which probably explains why
> > Maxim has been seeing Jenkins failing occasionally).
> >
> > Thanks for checking into this!
> >
> > -Rob
> >
> > On Fri, Oct 12, 2018 at 4:08 PM Rob Audenaerde  >
> > wrote:
> >
> > > Is there a simple way to disable the AsynchronousDataStore (for now)?
> > >
> > > On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik  >
> > > wrote:
> > >
> > >> I'm occasionally able to see this error on Apache Jenkins, but
> > >> unfortunately there is no clear steps to reproduce
> > >> I was unable to find what is wrong, will spend some more time on this
> > >> next week
> > >> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov 
> > >> wrote:
> > >> >
> > >> > Hi,
> > >> >
> > >> > When the application stops Application#destroy() should call
> > >> > AsynchronousDataStore#destroy() (
> > >> >
> > >>
> >
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
> > >> > )
> > >> > There it will interrupt the page saving thread and it should stop:
> > >> >
> > >>
> >
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L325
> > >> >
> > >> > I do not remember changes in this area of the code in 8.x but it is
> > not
> > >> > impossible.
> > >> >
> > >> > On Fri, Oct 12, 2018 at 12:32 PM Rob Audenaerde <
> > >> rob.audenae...@gmail.com>
> > >> > wrote:
> > >> >
> > >> > > Hi all,
> > >> > >
> > >> > > I'm experiencing some jetty-shutdown problems after upgrading from
> > >> 7.9 to
> > >> > > 8.1. See the stacktrace below.
> > >> > >
> > >> > > Is there a simple remedy for this? (or a known cause?) It is
> > annoying
> > >> > > because this error prevents Jetty from shutting down, and I use
> this
> > >> in my
> > >> > > tests, so my tests never end... :(
> > >> > >
> > >> > > Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112
> > >> > >
> > >> > >
> > >> > > 2018-10-12 11:24:25,738 ERROR - AsynchronousDataStore  -
> > >> > > java.lang.InterruptedException
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1259)
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:317)
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> java.base/java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:373)
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:207)
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
> > >> > > at
> > >> > >
> > >> > >
> > >>
> >
> org.apache.wicket.pageStore.AsynchronousPageStore$PageSavingRunnable.run(AsynchronousPageStore.java:225)
> > >> > > at java.base/java.lang.Thread.run(Thread.java:844)
> > >> > >
> > >>
> > >>
> > >>
> > >> --
> > >> WBR
> > >> Maxim aka solomax
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > >>
> > >>
> >
>
>
> --
> WBR
> Maxim aka solomax
>


Re: error shutting down

2018-10-12 Thread Rob Audenaerde
BTW: I currently worked around it by (very ugly) adding a
Thread.sleep(1000) between the last test-action in Wicket and the
Jetty-shutdown. So it seems a timing issue (which probably explains why
Maxim has been seeing Jenkins failing occasionally).

Thanks for checking into this!

-Rob

On Fri, Oct 12, 2018 at 4:08 PM Rob Audenaerde 
wrote:

> Is there a simple way to disable the AsynchronousDataStore (for now)?
>
> On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik 
> wrote:
>
>> I'm occasionally able to see this error on Apache Jenkins, but
>> unfortunately there is no clear steps to reproduce
>> I was unable to find what is wrong, will spend some more time on this
>> next week
>> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov 
>> wrote:
>> >
>> > Hi,
>> >
>> > When the application stops Application#destroy() should call
>> > AsynchronousDataStore#destroy() (
>> >
>> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
>> > )
>> > There it will interrupt the page saving thread and it should stop:
>> >
>> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L325
>> >
>> > I do not remember changes in this area of the code in 8.x but it is not
>> > impossible.
>> >
>> > On Fri, Oct 12, 2018 at 12:32 PM Rob Audenaerde <
>> rob.audenae...@gmail.com>
>> > wrote:
>> >
>> > > Hi all,
>> > >
>> > > I'm experiencing some jetty-shutdown problems after upgrading from
>> 7.9 to
>> > > 8.1. See the stacktrace below.
>> > >
>> > > Is there a simple remedy for this? (or a known cause?) It is annoying
>> > > because this error prevents Jetty from shutting down, and I use this
>> in my
>> > > tests, so my tests never end... :(
>> > >
>> > > Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112
>> > >
>> > >
>> > > 2018-10-12 11:24:25,738 ERROR - AsynchronousDataStore  -
>> > > java.lang.InterruptedException
>> > > at
>> > >
>> > >
>> java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1259)
>> > > at
>> > >
>> > >
>> java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:317)
>> > > at
>> > >
>> > >
>> java.base/java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:373)
>> > > at
>> > >
>> > >
>> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:207)
>> > > at
>> > >
>> > >
>> org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
>> > > at
>> > >
>> > >
>> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
>> > > at
>> > >
>> > >
>> org.apache.wicket.pageStore.AsynchronousPageStore$PageSavingRunnable.run(AsynchronousPageStore.java:225)
>> > > at java.base/java.lang.Thread.run(Thread.java:844)
>> > >
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>


Re: error shutting down

2018-10-12 Thread Rob Audenaerde
Is there a simple way to disable the AsynchronousDataStore (for now)?

On Fri, Oct 12, 2018 at 3:31 PM Maxim Solodovnik 
wrote:

> I'm occasionally able to see this error on Apache Jenkins, but
> unfortunately there is no clear steps to reproduce
> I was unable to find what is wrong, will spend some more time on this next
> week
> On Fri, 12 Oct 2018 at 17:20, Martin Grigorov 
> wrote:
> >
> > Hi,
> >
> > When the application stops Application#destroy() should call
> > AsynchronousDataStore#destroy() (
> >
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L101
> > )
> > There it will interrupt the page saving thread and it should stop:
> >
> https://github.com/apache/wicket/blob/6ee5313d405fbbdd4ce9d9a03ccb526358834fca/wicket-core/src/main/java/org/apache/wicket/pageStore/AsynchronousDataStore.java#L325
> >
> > I do not remember changes in this area of the code in 8.x but it is not
> > impossible.
> >
> > On Fri, Oct 12, 2018 at 12:32 PM Rob Audenaerde <
> rob.audenae...@gmail.com>
> > wrote:
> >
> > > Hi all,
> > >
> > > I'm experiencing some jetty-shutdown problems after upgrading from 7.9
> to
> > > 8.1. See the stacktrace below.
> > >
> > > Is there a simple remedy for this? (or a known cause?) It is annoying
> > > because this error prevents Jetty from shutting down, and I use this
> in my
> > > tests, so my tests never end... :(
> > >
> > > Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112
> > >
> > >
> > > 2018-10-12 11:24:25,738 ERROR - AsynchronousDataStore  -
> > > java.lang.InterruptedException
> > > at
> > >
> > >
> java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1259)
> > > at
> > >
> > >
> java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:317)
> > > at
> > >
> > >
> java.base/java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:373)
> > > at
> > >
> > >
> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:207)
> > > at
> > >
> > >
> org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
> > > at
> > >
> > >
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
> > > at
> > >
> > >
> org.apache.wicket.pageStore.AsynchronousPageStore$PageSavingRunnable.run(AsynchronousPageStore.java:225)
> > > at java.base/java.lang.Thread.run(Thread.java:844)
> > >
>
>
>
> --
> WBR
> Maxim aka solomax
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


error shutting down

2018-10-12 Thread Rob Audenaerde
Hi all,

I'm experiencing some jetty-shutdown problems after upgrading from 7.9 to
8.1. See the stacktrace below.

Is there a simple remedy for this? (or a known cause?) It is annoying
because this error prevents Jetty from shutting down, and I use this in my
tests, so my tests never end... :(

Btw. I'm on java 10.0.2 and jetty version 9.2.5.v20141112


2018-10-12 11:24:25,738 ERROR - AsynchronousDataStore  -
java.lang.InterruptedException
at
java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1259)
at
java.base/java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:317)
at
java.base/java.util.concurrent.LinkedBlockingQueue.offer(LinkedBlockingQueue.java:373)
at
org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:207)
at
org.apache.wicket.pageStore.AbstractPageStore.storePageData(AbstractPageStore.java:119)
at
org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:66)
at
org.apache.wicket.pageStore.AsynchronousPageStore$PageSavingRunnable.run(AsynchronousPageStore.java:225)
at java.base/java.lang.Thread.run(Thread.java:844)


Re: DatePicker in wicket 8

2018-05-09 Thread Rob Audenaerde
I actually kinda disliked the wicket date picker(and its dependencies) ,
and went with integrating PickADay.

https://github.com/dbushell/Pikaday


On Wed, May 9, 2018, 22:43 René Stolle  wrote:

> Hello everybody,
>
> I just realized the wicket-datetime module is gone in wicket 8 and with
> it my beloved DatePicker.
>
> Is it totally gone or just replaced or renamed?
>
> The Migration Guide for Wicket 8 does not mention anything about
> (wicket-)date/time.
>
> Best regards,
> René
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Modifying componentfeedbackpanel output

2018-02-22 Thread Rob Audenaerde
Can't your front end guy use CSS content to accomplish this?

On Feb 22, 2018 20:39, "Entropy"  wrote:

> I'm not sure what a quickstart would do to demonstrate what I'm after.
> It's
> not a bug I am trying to work through, I don't even know how to get control
> so I can add the tags.  The specific tags I'm adding don't even matter.
> It's static content, but it has to wrap the message.
>
> Just imagine I was trying to wrap the "This field is required" with any
> arbitrary content inside the innermost tags of the feedback panel.  Like
> maybe I wanted every message to be "[start]this field is required.[end]".
> Where would I get control to write that?
>
> --
> Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-
> f1842947.html
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: WicketTester#testComponentInPage and executeBehavior

2017-11-20 Thread Rob Audenaerde
Hi Sven,

Thanks for replying,

The difference is this, in the example you send the component is referenced
by its path:

tester.executeAjaxEvent("form:select", "inputchange change");

While I reference it by the component:

tester.executeAjaxEvent( on, "click" );


I'll try digging in the source to see what happens.

On Mon, Nov 20, 2017 at 10:05 PM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> here's an example usage:
>
> https://github.com/apache/wicket/blob/master/wicket-core/
> src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavi
> orTest.java#L47
>
> Please check what's different in your case.
>
> Have fun
> Sven
>
>
>
> Am 20.11.2017 um 13:33 schrieb Rob Audenaerde:
>
>> Hi all,
>>
>> I try to test a AjaxLink-based component using:
>>
>> MyComponent myComponent = new MyComponent("id");
>> wicketTester.startComponentInPage( myComponent);
>>
>> MyComponent contains some AjaxLinks, I want to click on them by:
>>
>> (uses a visitor to find the first child)
>> AjaxLink on = getFirstChild(myComponent, AjaxLink.class)
>> executeAjaxEvent( on, "click" );
>>
>> However, this gives me:
>>
>> org.apache.wicket.WicketRuntimeException: No Page found for component
>> [VcAjaxLink [Component id = sortza]]
>>
>> What is the correct wat to execute ajax behaviors in this approach?
>>
>> Thanks in advance,
>> -Rob
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: WicketTester#testComponentInPage and executeBehavior

2017-11-20 Thread Rob Audenaerde
Hi Sven,

Thanks for replying,

The difference is this, in the example you send the component is referenced
by its path:


On Mon, Nov 20, 2017 at 10:05 PM, Sven Meier <s...@meiers.net> wrote:

> Hi,
>
> here's an example usage:
>
> https://github.com/apache/wicket/blob/master/wicket-core/
> src/test/java/org/apache/wicket/ajax/form/OnChangeAjaxBehavi
> orTest.java#L47
>
> Please check what's different in your case.
>
> Have fun
> Sven
>
>
>
> Am 20.11.2017 um 13:33 schrieb Rob Audenaerde:
>
>> Hi all,
>>
>> I try to test a AjaxLink-based component using:
>>
>> MyComponent myComponent = new MyComponent("id");
>> wicketTester.startComponentInPage( myComponent);
>>
>> MyComponent contains some AjaxLinks, I want to click on them by:
>>
>> (uses a visitor to find the first child)
>> AjaxLink on = getFirstChild(myComponent, AjaxLink.class)
>> executeAjaxEvent( on, "click" );
>>
>> However, this gives me:
>>
>> org.apache.wicket.WicketRuntimeException: No Page found for component
>> [VcAjaxLink [Component id = sortza]]
>>
>> What is the correct wat to execute ajax behaviors in this approach?
>>
>> Thanks in advance,
>> -Rob
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


WicketTester#testComponentInPage and executeBehavior

2017-11-20 Thread Rob Audenaerde
Hi all,

I try to test a AjaxLink-based component using:

MyComponent myComponent = new MyComponent("id");
wicketTester.startComponentInPage( myComponent);

MyComponent contains some AjaxLinks, I want to click on them by:

(uses a visitor to find the first child)
AjaxLink on = getFirstChild(myComponent, AjaxLink.class)
executeAjaxEvent( on, "click" );

However, this gives me:

org.apache.wicket.WicketRuntimeException: No Page found for component
[VcAjaxLink [Component id = sortza]]

What is the correct wat to execute ajax behaviors in this approach?

Thanks in advance,
-Rob


Re: back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-11 Thread Rob Audenaerde
As a follow up:

Is there a way to test the back-button (without firing up jetty and
resorting to selenium / htmlunit)?

btw: I know WicketTester has trimmed-down versions of certain components
(MockApplication(), MockPageManager etc).  Maybe there is an implementation
that keeps track of the pages so I might implement a MyWicketTester.back()?

Thanks!
-Rob

On Tue, Oct 10, 2017 at 7:27 PM, Sven Meier <s...@meiers.net> wrote:

> Hi Rob,
>
> you're absolutely right: The issue's title should have been changed.
> I've missed the opportunity when I found the real error :(.
> Something to keep in mind for future changes!
>
> Sven
>
> Am 10. Oktober 2017 13:47:53 MESZ schrieb Rob Audenaerde <
> rob.audenae...@gmail.com>:
> >Hi Sven,
> >
> >Thanks for your reply!
> >
> >I was mistaken in believing 7.8.0 was still broken (perhaps not
> >cleaned-up
> >enough) and can confirm 7.8.0 fixes the issue.
> >
> >After reading it seems the title of the issue is slightly misleading
> >(as
> >you commented: This doesn't have anything to do with ModalWindow -
> >every
> >retrieval of previous pages from the page store fails:
> >)
> >
> >Maybe changing the title of the issue for the release notes is
> >something to
> >consider?
> >
> >Thanks,
> >-Rob
> >
> >On Tue, Oct 10, 2017 at 1:34 PM, Sven Meier <s...@meiers.net> wrote:
> >
> >> That's WICKET-6387 probably.
> >>
> >> Regards
> >> Sven
> >>
> >> Am 10. Oktober 2017 12:04:33 MESZ schrieb Rob Audenaerde <
> >> rob.audenae...@gmail.com>:
> >> >Hi all,
> >> >
> >> >We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now
> >we
> >> >see
> >> >that that back-button behaves differently?
> >> >Before, pressing back would return the page with all the ajax
> >> >modifications. After it seems to return an entirely new page.
> >> >
> >> >I could not find anything in the release notes that indicates a
> >change
> >> >here.
> >> >
> >> >Am I missing something?
> >> >
> >> >btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?
> >> >
> >> >-Rob
> >>
>


Re: back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-10 Thread Rob Audenaerde
Hi Sven,

Thanks for your reply!

I was mistaken in believing 7.8.0 was still broken (perhaps not cleaned-up
enough) and can confirm 7.8.0 fixes the issue.

After reading it seems the title of the issue is slightly misleading (as
you commented: This doesn't have anything to do with ModalWindow - every
retrieval of previous pages from the page store fails:
)

Maybe changing the title of the issue for the release notes is something to
consider?

Thanks,
-Rob

On Tue, Oct 10, 2017 at 1:34 PM, Sven Meier <s...@meiers.net> wrote:

> That's WICKET-6387 probably.
>
> Regards
> Sven
>
> Am 10. Oktober 2017 12:04:33 MESZ schrieb Rob Audenaerde <
> rob.audenae...@gmail.com>:
> >Hi all,
> >
> >We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now we
> >see
> >that that back-button behaves differently?
> >Before, pressing back would return the page with all the ajax
> >modifications. After it seems to return an entirely new page.
> >
> >I could not find anything in the release notes that indicates a change
> >here.
> >
> >Am I missing something?
> >
> >btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?
> >
> >-Rob
>


back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-10 Thread Rob Audenaerde
Hi all,

We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now we see
that that back-button behaves differently?
Before, pressing back would return the page with all the ajax
modifications. After it seems to return an entirely new page.

I could not find anything in the release notes that indicates a change
here.

Am I missing something?

btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?

-Rob


Re: NumberTextField and LambdaModel, typing goes wrong?

2017-10-05 Thread Rob Audenaerde
Thanks Bas,

For now I'll fix it with explicit class in the constructor

I'm not sure but maybe method-references in the LambdaModel could also
determine their type can the model could be modified to pass that on?

-Rob

On Wed, Oct 4, 2017 at 8:54 PM, Bas Gooren <b...@iswd.nl> wrote:

> Rob,
>
> This is because a property model provides certain metadata (when
> available);
> E.g. When the property model points to a field, it provides the type of
> field.
> Even when the model value is null this type information is still available.
>
> Since this metadata is not available when using lambdas wicket uses a
> default (String).
>
> The reason it also works with a regular Model is because you provide a
> value; thus, wicket can detect the type based on the value.
>
> When your lambda does not return a value, wicket cannot detect the type.
>
> // Bas
>
> Verstuurd vanaf mijn iPhone
>
> > Op 4 okt. 2017 om 16:58 heeft Rob Audenaerde <rob.audenae...@gmail.com>
> het volgende geschreven:
> >
> > We are preparing for migration to Wicket 8 (when it comes out). So we are
> > already replacing our old PropertyModels with a backported LambdaModel
> (we
> > use the implementation from Wicket 8).
> >
> > I noticed an odd behavior where the RangeValidator gets an empty String
> > from the input (in validatable.getValue()) if the input is not an integer
> > (for example, changing '2' to '2e' in the textfield).
> >
> > This results in a class cast exception.
> >
> > If I replace the Lambdamodel by a IModel = new Model(2)
> > it works fine.
> >
> > After adding the type Integer.class to the NumberTextField it works fine
> > again.
> >
> > Am I doing something wrong?
> >
> > Thanks!
> >
> > Here is the relevant code (see commented section):
> > --
> >
> > public class HomePage extends WebPage {
> > private static final long serialVersionUID = 1L;
> >
> > static class MyInt implements Serializable
> > {
> > Integer i=2;
> >
> > public Integer getI() {
> > return i;
> > }
> >
> > public void setI(Integer i) {
> > this.i = i;
> > }
> > }
> > public HomePage(final PageParameters parameters) {
> > super(parameters);
> >
> > IModel myInt = new Model(new MyInt());
> > IModel intModel = LambdaModel.of(myInt, MyInt::getI,
> MyInt::setI);
> > Form f = new Form("f") {
> >
> > };
> > //Next commented line does not work if you change the input for '2' to
> '2e'
> > and click outside the input box.
> > //NumberTextField ntf = new NumberTextField<>("tf", intModel);
> > NumberTextField ntf = new NumberTextField<>("tf", intModel,
> Integer.class);
> > ntf.setOutputMarkupId(true);
> > ntf.setMinimum( 1 ).setStep( 1 );
> > ntf.add( new OnChangeAjaxBehavior()
> > {
> > private static final long serialVersionUID = 1L;
> >
> > @Override
> > protected void onUpdate( AjaxRequestTarget target )
> > {
> > System.out.println("changed!");
> > }
> > }  );
> > f.add(ntf);
> > add(f);
> >
> > }
> > }
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


NumberTextField and LambdaModel, typing goes wrong?

2017-10-04 Thread Rob Audenaerde
We are preparing for migration to Wicket 8 (when it comes out). So we are
already replacing our old PropertyModels with a backported LambdaModel (we
use the implementation from Wicket 8).

I noticed an odd behavior where the RangeValidator gets an empty String
from the input (in validatable.getValue()) if the input is not an integer
(for example, changing '2' to '2e' in the textfield).

This results in a class cast exception.

If I replace the Lambdamodel by a IModel = new Model(2)
it works fine.

After adding the type Integer.class to the NumberTextField it works fine
again.

Am I doing something wrong?

Thanks!

Here is the relevant code (see commented section):
--

public class HomePage extends WebPage {
private static final long serialVersionUID = 1L;

static class MyInt implements Serializable
{
Integer i=2;

public Integer getI() {
return i;
}

public void setI(Integer i) {
this.i = i;
}
}
public HomePage(final PageParameters parameters) {
super(parameters);

IModel myInt = new Model(new MyInt());
IModel intModel = LambdaModel.of(myInt, MyInt::getI, MyInt::setI);
Form f = new Form("f") {

};
//Next commented line does not work if you change the input for '2' to '2e'
and click outside the input box.
//NumberTextField ntf = new NumberTextField<>("tf", intModel);
NumberTextField ntf = new NumberTextField<>("tf", intModel, Integer.class);
ntf.setOutputMarkupId(true);
ntf.setMinimum( 1 ).setStep( 1 );
ntf.add( new OnChangeAjaxBehavior()
{
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate( AjaxRequestTarget target )
{
System.out.println("changed!");
}
}  );
f.add(ntf);
add(f);

}
}


Re: FileUploadField with AJAX Behavior

2017-08-24 Thread Rob Audenaerde
I use this home brew Behavior:

import java.io.File;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.head.OnDomReadyHeaderItem;
import org.apache.wicket.request.cycle.RequestCycle;
import org.apache.wicket.request.http.WebRequest;
import org.apache.wicket.util.string.StringValue;

public abstract class FileSelectedBehavior extends
AbstractDefaultAjaxBehavior
{
public static final String FILE_SELECTED_REQUEST_PARAMETER_NAME = "val";

@Override
public void respond( AjaxRequestTarget target )
{
// get the web request
RequestCycle cycle = RequestCycle.get();
WebRequest webRequest = (WebRequest) cycle.getRequest();

// get the parameter
StringValue term = webRequest.getQueryParameters().getParameterValue(
FILE_SELECTED_REQUEST_PARAMETER_NAME );

// term contains full (fake) path
File file = new File( term.toString() );

// process the parameter
this.processRequest( target, file.getName() );
}

/**
* This method will be called when a file is selected.
*
* @param target
* @param fileName will contain the filename with extension (without path)
*/
public abstract void processRequest( AjaxRequestTarget target, String
fileName );

@Override
public void renderHead( Component component, IHeaderResponse response )
{
// after selecting a file the onRequest of this class is called
String script = "document.getElementById('" + component.getMarkupId() +
"').onchange = function () {  Wicket.Ajax.get({ 'u' : \""
+ this.getCallbackUrl() + "\", 'ep' : {'" +
FILE_SELECTED_REQUEST_PARAMETER_NAME + "' : this.value } });};";

// add the javascript
response.render( OnDomReadyHeaderItem.forScript( script ) );
}
}

On Thu, Aug 24, 2017 at 9:57 AM, lucast  wrote:

> I had the same requirement,I wanted to display the contents of the file,
> once
> the file has been selected.
> I found the code on
> https://github.com/apache/openmeetings/blob/4a5e859f886253086e51a2ac26bbc5
> 01d621e590/openmeetings-web/src/main/java/org/apache/
> openmeetings/web/common/UploadableImagePanel.java
>  4a5e859f886253086e51a2ac26bbc501d621e590/openmeetings-web/
> src/main/java/org/apache/openmeetings/web/common/UploadableImagePanel.java
> >
> , line 77, new AjaxFormSubmitBehavior(form, "change") to be extremely
> helpful and just what I was looking for.
>
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/FileUploadField-with-AJAX-Behavior-tp4677874p4678594.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
>
>


Re: Encrypt selected form data before submitting the request to Server

2017-01-16 Thread Rob Audenaerde
>
> Thanks Martin.
> Hi Rob, your approach looks interesting.
> Can you please elaborate on that?
>

Yes. Although I don't really see the point. The secret that is passed on
will be readable by an attacker if the attacker could otherwise access the
fields in the form, effectively rendering this 'security by obscuriry'. The
only way around this is to pass the secret by other means to the client and
have them provide it in the form, or use some other type of PKI (which is
what HTTPS is supposed to do).

-

I would create a Form with a hidden field and an extra attrribute, the
secret:

Form secretForm = new Form ( ) {  ... };

secretForm.setOutputMarkupId(true);
IModel encodedResult = new Model<>();
secretForm.add(AttributeModifier.append("secret",
Model.of("SuperDuperSecret"));
secretForm.add(new HiddenField("secret", encodedResult));
secretForm.add(AjaxButton asb= new AjaxButton("submit")
{
@Override
protected void updateAjaxAttributes( AjaxRequestAttributes attributes )
{
super.updateAjaxAttributes( attributes );
attributes.getAjaxCallListeners().add( new AjaxCallListener()
{
@Override
public CharSequence getBeforeHandler( Component component )
{
//I think you should do the encoding here, something with JSON, JQuery,
return "encryptFormToHiddenField( " + secretForm.getMarkupId() + " ) " ;
}
} );
}
}; );


In the onSubmit() of the form you can access the contents of the
encodedResult, use the ''SuperDuperSecret" to decode it.

Now that I'm writing it, I think you also want to prevent the other values
from being sent.. Maybe you could empy the values using JavaScript?



-Rob


Re: Encrypt selected form data before submitting the request to Server

2017-01-15 Thread Rob Audenaerde
Ah you wrote about the synchronous ajax at the same time as my message :)

(and sorry for the typo in your name, Martin!)


On Mon, Jan 16, 2017 at 8:45 AM, Rob Audenaerde <rob.audenae...@gmail.com>
wrote:

> @Marin I thought synchronous Ajax is actively discouraged now? Or is it
> supported through webworkers now? (see: https://xhr.spec.whatwg.org/#
> the-open()-method )
>
> I would just generate a random secret the moment the form is rendered.
> Then, in javascript, you can use your favorite symmetric block cipher to
> replace the values/encode them in json (for example in a hidden field.
> Server side you do the reverse
>
> -Rob
>
> On Mon, Jan 16, 2017 at 8:36 AM, James Selvakumar <ja...@mcruncher.com>
> wrote:
>
>> Hi Martin,
>>
>> Thanks a lot for your response.
>> Can I add this behavior directly to the form or should this be added to a
>> form component?
>> Will this work on Wicket 6.x?
>>
>> On Mon, Jan 16, 2017 at 3:29 PM, Martin Grigorov <mgrigo...@apache.org>
>> wrote:
>>
>> > Hi,
>> >
>> > The easiest way I see is to use onBeforeSend() callback listener on the
>> > Ajax submit behavior of the form.
>> > There you can do a **synchronous** Ajax call to get your key and then
>> > modify (i.e. encrypt) the data to be sent.
>> >
>> > Martin Grigorov
>> > Wicket Training and Consulting
>> > https://twitter.com/mtgrigorov
>> >
>> > On Mon, Jan 16, 2017 at 8:08 AM, James Selvakumar <ja...@mcruncher.com>
>> > wrote:
>> >
>> > > Hi all,
>> > >
>> > > I have this requirement where some of the data entered by the user
>> are to
>> > > be encrypted in the client side before the request is submitted to the
>> > > Wicket server even though the communication is over HTTPS.
>> > >
>> > > I am thinking of having some JavaScript code in the client which shall
>> > > intercept the form submission, request the Server for a randomly
>> > generated
>> > > key and encrypt the form data using the key received and then submit
>> the
>> > > form again.
>> > >
>> > > Any idea how to achieve this in Wicket?
>> > >
>> > > --
>> > > Thanks & regards
>> > > James
>> > >
>> >
>>
>>
>>
>> --
>> Thanks & regards
>> James Selvakumar
>>
>
>


Re: Encrypt selected form data before submitting the request to Server

2017-01-15 Thread Rob Audenaerde
@Marin I thought synchronous Ajax is actively discouraged now? Or is it
supported through webworkers now? (see:
https://xhr.spec.whatwg.org/#the-open()-method )

I would just generate a random secret the moment the form is rendered.
Then, in javascript, you can use your favorite symmetric block cipher to
replace the values/encode them in json (for example in a hidden field.
Server side you do the reverse

-Rob

On Mon, Jan 16, 2017 at 8:36 AM, James Selvakumar 
wrote:

> Hi Martin,
>
> Thanks a lot for your response.
> Can I add this behavior directly to the form or should this be added to a
> form component?
> Will this work on Wicket 6.x?
>
> On Mon, Jan 16, 2017 at 3:29 PM, Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > The easiest way I see is to use onBeforeSend() callback listener on the
> > Ajax submit behavior of the form.
> > There you can do a **synchronous** Ajax call to get your key and then
> > modify (i.e. encrypt) the data to be sent.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Mon, Jan 16, 2017 at 8:08 AM, James Selvakumar 
> > wrote:
> >
> > > Hi all,
> > >
> > > I have this requirement where some of the data entered by the user are
> to
> > > be encrypted in the client side before the request is submitted to the
> > > Wicket server even though the communication is over HTTPS.
> > >
> > > I am thinking of having some JavaScript code in the client which shall
> > > intercept the form submission, request the Server for a randomly
> > generated
> > > key and encrypt the form data using the key received and then submit
> the
> > > form again.
> > >
> > > Any idea how to achieve this in Wicket?
> > >
> > > --
> > > Thanks & regards
> > > James
> > >
> >
>
>
>
> --
> Thanks & regards
> James Selvakumar
>


Re: How to solve: Application and Wicket-select2 both use PageParameter 'q'.

2016-11-22 Thread Rob Audenaerde
Thanks, the issue is on its way!

On Tue, Nov 22, 2016 at 9:33 AM, Maxim Solodovnik <solomax...@gmail.com>
wrote:

> Will try to add setting tonight and will ask you to test
> Please create issue here [1] so we can track the progress :)
>
> [1] https://github.com/wicketstuff/core/issues
>
> On Tue, Nov 22, 2016 at 3:31 PM, Rob Audenaerde <rob.audenae...@gmail.com>
> wrote:
>
> > Additional setting would be great. I use wicket-select2 in a lot of
> > different places, so mounting all kinds of resources does not seem very
> > appealing. (or maybe I misunderstand how it would work stateless?)
> >
> > I took a look at the AbstractSelect2Choice and it seems not too hard to
> > migrate to a setting.
> >
> > Thanks for looking into this!
> >
> > -Rob
> >
> > On Tue, Nov 22, 2016 at 9:26 AM, Maxim Solodovnik <solomax...@gmail.com>
> > wrote:
> >
> > > Static mount would work, additional setting might help if it's not an
> > > option :)
> > >
> > > On Tue, Nov 22, 2016 at 3:24 PM, Pi P314 <picuda...@gmail.com> wrote:
> > >
> > > > https://github.com/wicketstuff/core/blob/master/
> > select2-parent/select2-
> > > > examples/src/main/java/org/wicketstuff/select2/
> > > WicketApplication.java#L29
> > > > https://github.com/wicketstuff/core/blob/master/
> > select2-parent/select2-
> > > > examples/src/main/java/org/wicketstuff/select2/HomePage.java#L158
> > > >
> > > > On Tue, Nov 22, 2016 at 9:19 AM, Pi P314 <picuda...@gmail.com>
> wrote:
> > > >
> > > > > you can also use selected to in stateless mode
> > > > >
> > > > > 1- Mount a resource
> > > > > 2- Point you select 2 to that resource.
> > > > >
> > > > > On Tue, Nov 22, 2016 at 9:16 AM, Rob Audenaerde <
> > > > rob.audenae...@gmail.com>
> > > > > wrote:
> > > > >
> > > > >> (question is also on StackOverflow:
> > > > >> http://stackoverflow.com/questions/40736742/wicket-and-wicke
> > > > >> t-select2-both-use-pageparameter-q-how-to-solve
> > > > >>  )
> > > > >>
> > > > >> I have a set of PageParameters for my page, one is q (for query).
> > This
> > > > >> allows for nice URLs like:
> > > > >>
> > > > >> http://myapplication/search?q=myquery.
> > > > >>
> > > > >> But when I have a wicket-select2 component on my page, it
> > initializes
> > > > the
> > > > >> query for the select2 with the same value of the PageParameter q.
> > > > >>
> > > > >> This causes the select2 to return an empty list of options, while
> > the
> > > > user
> > > > >> has not even select anything yet.
> > > > >>
> > > > >> I know I can change the name of my PageParameters (unfortunately,
> > some
> > > > >> clients will have to change urls). Or I can override the methods
> in
> > > > >> select2
> > > > >> that use the q parameter.
> > > > >>
> > > > >> I wondered if there is a better solution?
> > > > >>
> > > > >> Thanks!
> > > > >>
> > > > >> -Rob
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > 
> > > > >
> > > > > Regards,
> > > > >
> > > > > Pi Cuda
> > > > > Web Development with Java/Scala
> > > > > Wicket Consultant
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > 
> > > >
> > > > Regards,
> > > >
> > > > Pi Cuda
> > > > Web Development with Java/Scala
> > > > Wicket Consultant
> > > >
> > >
> > >
> > >
> > > --
> > > WBR
> > > Maxim aka solomax
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


Re: How to solve: Application and Wicket-select2 both use PageParameter 'q'.

2016-11-22 Thread Rob Audenaerde
Additional setting would be great. I use wicket-select2 in a lot of
different places, so mounting all kinds of resources does not seem very
appealing. (or maybe I misunderstand how it would work stateless?)

I took a look at the AbstractSelect2Choice and it seems not too hard to
migrate to a setting.

Thanks for looking into this!

-Rob

On Tue, Nov 22, 2016 at 9:26 AM, Maxim Solodovnik <solomax...@gmail.com>
wrote:

> Static mount would work, additional setting might help if it's not an
> option :)
>
> On Tue, Nov 22, 2016 at 3:24 PM, Pi P314 <picuda...@gmail.com> wrote:
>
> > https://github.com/wicketstuff/core/blob/master/select2-parent/select2-
> > examples/src/main/java/org/wicketstuff/select2/
> WicketApplication.java#L29
> > https://github.com/wicketstuff/core/blob/master/select2-parent/select2-
> > examples/src/main/java/org/wicketstuff/select2/HomePage.java#L158
> >
> > On Tue, Nov 22, 2016 at 9:19 AM, Pi P314 <picuda...@gmail.com> wrote:
> >
> > > you can also use selected to in stateless mode
> > >
> > > 1- Mount a resource
> > > 2- Point you select 2 to that resource.
> > >
> > > On Tue, Nov 22, 2016 at 9:16 AM, Rob Audenaerde <
> > rob.audenae...@gmail.com>
> > > wrote:
> > >
> > >> (question is also on StackOverflow:
> > >> http://stackoverflow.com/questions/40736742/wicket-and-wicke
> > >> t-select2-both-use-pageparameter-q-how-to-solve
> > >>  )
> > >>
> > >> I have a set of PageParameters for my page, one is q (for query). This
> > >> allows for nice URLs like:
> > >>
> > >> http://myapplication/search?q=myquery.
> > >>
> > >> But when I have a wicket-select2 component on my page, it initializes
> > the
> > >> query for the select2 with the same value of the PageParameter q.
> > >>
> > >> This causes the select2 to return an empty list of options, while the
> > user
> > >> has not even select anything yet.
> > >>
> > >> I know I can change the name of my PageParameters (unfortunately, some
> > >> clients will have to change urls). Or I can override the methods in
> > >> select2
> > >> that use the q parameter.
> > >>
> > >> I wondered if there is a better solution?
> > >>
> > >> Thanks!
> > >>
> > >> -Rob
> > >>
> > >
> > >
> > >
> > > --
> > > 
> > >
> > > Regards,
> > >
> > > Pi Cuda
> > > Web Development with Java/Scala
> > > Wicket Consultant
> > >
> > >
> > >
> >
> >
> > --
> > 
> >
> > Regards,
> >
> > Pi Cuda
> > Web Development with Java/Scala
> > Wicket Consultant
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


How to solve: Application and Wicket-select2 both use PageParameter 'q'.

2016-11-22 Thread Rob Audenaerde
(question is also on StackOverflow:
http://stackoverflow.com/questions/40736742/wicket-and-wicket-select2-both-use-pageparameter-q-how-to-solve
 )

I have a set of PageParameters for my page, one is q (for query). This
allows for nice URLs like:

http://myapplication/search?q=myquery.

But when I have a wicket-select2 component on my page, it initializes the
query for the select2 with the same value of the PageParameter q.

This causes the select2 to return an empty list of options, while the user
has not even select anything yet.

I know I can change the name of my PageParameters (unfortunately, some
clients will have to change urls). Or I can override the methods in select2
that use the q parameter.

I wondered if there is a better solution?

Thanks!

-Rob


Re: wicket datatable, row selection, update another component

2016-10-31 Thread Rob Audenaerde
Thanks Martin, I ended up with doing something like this, but then using
events so the components don't need to know each other.

On Oct 28, 2016 14:40, "Martin Grigorov" <mgrigo...@apache.org> wrote:

> Hi,
>
> You can do: DetailsComponent#onConfigure() {dataTable.configure();
> configureMyself();}
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Fri, Oct 28, 2016 at 1:33 PM, Rob Audenaerde <rob.audenae...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I have a DataTable which, in onConfigure(), sets a selected item. I want
> > another (detail) panel, outside of this component, to react on that
> > selection i.e. set it's visibility and render details of the selected
> item.
> >
> > What I see is that the onConfigure() of the detail component is called
> > BEFORE the DataTable, so I figure it renders before the DataTable is
> > rendered, so the detail.setVisible() in the onConfigure() in the
> DataTable
> > is called too late.
> >
> > How should I solve this? The only component that know which item is going
> > to be selected is the DataTable.
> >
> > Thanks,
> > Rob
> >
>


wicket datatable, row selection, update another component

2016-10-28 Thread Rob Audenaerde
Hi all,

I have a DataTable which, in onConfigure(), sets a selected item. I want
another (detail) panel, outside of this component, to react on that
selection i.e. set it's visibility and render details of the selected item.

What I see is that the onConfigure() of the detail component is called
BEFORE the DataTable, so I figure it renders before the DataTable is
rendered, so the detail.setVisible() in the onConfigure() in the DataTable
is called too late.

How should I solve this? The only component that know which item is going
to be selected is the DataTable.

Thanks,
Rob


Re: ModalWindow and OnDomReady

2016-10-20 Thread Rob Audenaerde
The panel is created and added with setContent just before the modal window
is shown.

On Oct 20, 2016 10:40 AM, "Ernesto Reinaldo Barreiro" <reier...@gmail.com>
wrote:

> is this panel initially added to the mcdal? When page is created?
>
> On Thu, Oct 20, 2016 at 10:13 AM, Rob Audenaerde <rob.audenae...@gmail.com
> >
> wrote:
>
> > It is the Panel that I put on the ModalWindow.
> >
> > On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov <mgrigo...@apache.org>
> > wrote:
> >
> > > Hi,
> > >
> > > It depends on what you add the OnDomReady header item.
> > > Is it the ModalWindow ? Or its content (Panel or Page) ?
> > >
> > > Martin Grigorov
> > > Wicket Training and Consulting
> > > https://twitter.com/mtgrigorov
> > >
> > > On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <
> > rob.audenae...@gmail.com>
> > > wrote:
> > >
> > > > Hi all,
> > > >
> > > > I have a panel that needs some JavaScript for sizing etc. to run
> after
> > a
> > > > ModalWindow is shown, but as I now see it the Javascript is run
> > *before*
> > > > the modal window is shown.
> > > >
> > > > What is the proper way to run javascript after a ModalWindow is
> shown?
> > It
> > > > seems OnDomReady is not sufficient here?
> > > >
> > > > Thanks,
> > > >
> > > > Rob
> > > >
> > >
> >
>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: ModalWindow and OnDomReady

2016-10-20 Thread Rob Audenaerde
It is the Panel that I put on the ModalWindow.

On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> It depends on what you add the OnDomReady header item.
> Is it the ModalWindow ? Or its content (Panel or Page) ?
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <rob.audenae...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I have a panel that needs some JavaScript for sizing etc. to run after a
> > ModalWindow is shown, but as I now see it the Javascript is run *before*
> > the modal window is shown.
> >
> > What is the proper way to run javascript after a ModalWindow is shown? It
> > seems OnDomReady is not sufficient here?
> >
> > Thanks,
> >
> > Rob
> >
>


ModalWindow and OnDomReady

2016-10-19 Thread Rob Audenaerde
Hi all,

I have a panel that needs some JavaScript for sizing etc. to run after a
ModalWindow is shown, but as I now see it the Javascript is run *before*
the modal window is shown.

What is the proper way to run javascript after a ModalWindow is shown? It
seems OnDomReady is not sufficient here?

Thanks,

Rob


Re: Busy indicator delay with IAjaxIndicatorAware?

2016-10-06 Thread Rob Audenaerde
Hi Lars,

I use a CSS animation for this:

.wicket-ajax-indicator
{
visibility:hidden;
animation: appear 0s ease-in 0.5s forwards;
}

-Rob

On Thu, Oct 6, 2016 at 10:58 AM, Lars Törner  wrote:

> Hi everyone!
>
> Is there a best practice in wicket for adding a busy indicator with a delay
> for an ajax request?
>
> Or should it be done with a before handler that executes a javascript that
> shows the busy indicator after a configured time, and abort this
> "busy-indicator-script" with an after-handler when the request returns?
>
> Example:
> 1. User clicks an ajax-link.
> 2. A busy indicator is displayed only if the call takes more than a second
> to complete.
>
> Cheers
> Lasse
>


Re: examples7x.wicket.apache.org not available

2016-06-08 Thread Rob Audenaerde
Confirmed working!

On Wed, Jun 8, 2016 at 11:18 AM, Andrea Del Bene 
wrote:

> Restarted! Should  shortly be available.
>
> Andrea.
>
>
> On 08/06/2016 11:11, Marc Ende wrote:
>
>> Hi,
>>
>> I've seen that the http://examples7x.wicket.apache.org/ is currently not
>> available. There is an proxy error.
>> It would be great if the examples would be available soon, they're a
>> great resource. ;)
>>
>> Cheers
>> Marc
>>
>> -
>> 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 7 + cglib + asm: net.sf.cglib.core.CodeGenerationException

2016-03-30 Thread Rob Audenaerde
I have had some similar issue in the past (and finally decided to ditch
spring :).

IIRC, the maven-shade-plugin could be used to relocate packages of classes
of dependencies. But it is kind of black magic :/

-Rob

On Wed, Mar 30, 2016 at 4:20 PM, Marieke Vandamme 
wrote:

> Hi,
>
> That's something I first tried, but other libraries we use (like
> org.apache.tika.tika-parsers) set version of asm or cglib.
> I also see that asm-util is used, but with version 5.0.3.
> Is there no standard dependencies I can use to solve this? I do not have to
> possibility to not set the version, because I then end up with multiple
> version of asm in my war-file.
> Thanks again.
>
>
> 2016-03-30 16:08 GMT+02:00 Martin Grigorov :
>
> > Hi,
> >
> > The versions were "latest" at the time Wicket 7 was in development (ASM
> > 5.0.x, CGLIB 3.1.x).
> > The current latest of ASM and CGLIB are targeted for Java 8 (ASM 5.1.x,
> > CGLIB 3.2.x).
> > Both ASM and CGLIB do not follow semantic versioning and this leads to
> > confusions like this one.
> >
> > The solution is simple: do not set the versions in your pom.xml but just
> > use the transitive dependencies coming with wicket-spring.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Mar 30, 2016 at 4:00 PM, Marieke Vandamme <
> > marieke.vanda...@tvh.com>
> > wrote:
> >
> > > ​Hi,
> > >
> > > I'm trying to use wicket 7.2.0 and saw in the migration guide ​that
> other
> > > libraries also changed to the latest stable version.
> > > So I also tried this, and the following are used by me now:
> > > - Spring Framework 4.2.5
> > > - ASM 5.1
> > > - CGLIB 3.2.1
> > >
> > > I get the following stacktrace, on which I'm really lost, and could not
> > > find any answer on the internet on..
> > > Thanks for any help. Kind Regards, Marieke
> > >
> > > javax.servlet.ServletException:
> > net.sf.cglib.core.CodeGenerationException:
> > > java.lang.reflect.InvocationTargetException-->null
> > > at
> > org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:455)
> > > at
> > org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:353)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
> > > at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
> > > at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
> > > at
> > >
> > >
> >
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
> > > at
> > >
> > >
> >
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1744)
> > > at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > > at
> > >
> > >
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > > at
> > >
> > >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > > at java.lang.Thread.run(Thread.java:722)
> > > Caused by: net.sf.cglib.core.CodeGenerationException:
> > > java.lang.reflect.InvocationTargetException-->null
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:320)
> > > at net.sf.cglib.proxy.Enhancer.generate(Enhancer.java:445)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:82)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:80)
> > > at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
> > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > > at
> > >
> net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
> > > at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:102)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:275)
> > > at 

Re: Ajax Editable Label -> Request Entity Too Large

2016-03-09 Thread Rob Audenaerde
Thanks Matrin for your quick reply.

Changing to POST seems to work fine, thanks!

On Tue, Mar 8, 2016 at 1:20 PM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> You can use #updateAjaxAttributes() (
>
> https://github.com/apache/wicket/blob/fa83afe98a91d384737e0cc05395348242cdd8e8/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/AjaxEditableLabel.java#L189
> )
> to set POST as a request method.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Tue, Mar 8, 2016 at 12:52 PM, Rob Audenaerde <rob.audenae...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I'm testing my application on unexpected user-input, and I am now facing
> > this error:
> >
> > "Wicket.Ajax:  Wicket.Ajax.Call.failure: Error while parsing response:
> > Request Entity Too Large"
> >
> > I triggered this by pasting 10 paragaphs of "Lorem Ipsum" into an
> > AjaxEditableLabel. Is this expected behavior?
> >
> > What would be a good work-around/method of limiting this length?
> >
> > Thx!
> > -Rob
> >
>


Ajax Editable Label -> Request Entity Too Large

2016-03-08 Thread Rob Audenaerde
Hi all,

I'm testing my application on unexpected user-input, and I am now facing
this error:

"Wicket.Ajax:  Wicket.Ajax.Call.failure: Error while parsing response:
Request Entity Too Large"

I triggered this by pasting 10 paragaphs of "Lorem Ipsum" into an
AjaxEditableLabel. Is this expected behavior?

What would be a good work-around/method of limiting this length?

Thx!
-Rob


relative or absolute redirects (use in proxy?)

2015-12-10 Thread Rob Audenaerde
Hi all,

I'm trying to host a Wicket Application in an Azure cloud environment. A
third party with Azure knowledge (which I lack atm) put up a proxy for us
that enforces 2factor authentication. If the user is allowed in, the
traffic is send to our application.

That way we don't have to spend too much time internet-hardening* our
application, while still being able to run it in the cloud.

However, it seems Wicket (/Jetty?) is redirecting to browser to absolute
urls, and these are not reachable from the browser.

For example, our app runs at somemagicurl222343.cloud.net, and is available
at proxy url: client-proxy.cloud.net.  Redirects are given to
somemagicurl222343.cloud.net, which is not directly reachable.

What would be the 'proper' solution?

I think the proxy might rewrite redirects (not sure how), but maybe
relative redirects would solve the issue as well?



*we stick to OWASP etc. as much as possible, but it is sensitive data so we
try to be on the safer side by keeping the application behind a fence.


Re: relative or absolute redirects (use in proxy?)

2015-12-10 Thread Rob Audenaerde
Hi Martin,

Thanks for the reply, I will look into it!

-Rob

Verstuurd vanaf mijn iPad

> Op 10 dec. 2015 om 21:42 heeft Martin Grigorov <mgrigo...@apache.org> het 
> volgende geschreven:
> 
> Hi,
> 
> In short: you need a reverse proxy.
> 
> Longer story:
> 
> It is a bit blurry for me now because I did it one year ago but here is
> what I did for one of my applications that is deployed at Azure:
> 1) created 3 images (Ubuntu), named "ubuntu1", "ubuntu2", ...
> 2) each of them runs Tomcat (for the Wicket app) on ports 8081, 8082, 8083
> respectively. Tomcat listen on somemagicurl.cloud.net
> 2.1) these ports are opened only in my Azure account (don't remember the
> exact term for my private network at Azure)
> 3) each image also runs Nginx at port 80, as a proxy.
> 3.1) each Nginx knows about the three Tomcat (for failover)
> 3.2) Azure load balancer balances the Nginx instances, so they serve
> www.myrealapp.com
> 3.3) Nginx config uses reverse proxy to fix the urls coming from Tomcats
> 
> 
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
> 
> On Thu, Dec 10, 2015 at 8:48 PM, Rob Audenaerde <rob.audenae...@gmail.com>
> wrote:
> 
>> Hi all,
>> 
>> I'm trying to host a Wicket Application in an Azure cloud environment. A
>> third party with Azure knowledge (which I lack atm) put up a proxy for us
>> that enforces 2factor authentication. If the user is allowed in, the
>> traffic is send to our application.
>> 
>> That way we don't have to spend too much time internet-hardening* our
>> application, while still being able to run it in the cloud.
>> 
>> However, it seems Wicket (/Jetty?) is redirecting to browser to absolute
>> urls, and these are not reachable from the browser.
>> 
>> For example, our app runs at somemagicurl222343.cloud.net, and is
>> available
>> at proxy url: client-proxy.cloud.net.  Redirects are given to
>> somemagicurl222343.cloud.net, which is not directly reachable.
>> 
>> What would be the 'proper' solution?
>> 
>> I think the proxy might rewrite redirects (not sure how), but maybe
>> relative redirects would solve the issue as well?
>> 
>> 
>> 
>> *we stick to OWASP etc. as much as possible, but it is sensitive data so we
>> try to be on the safer side by keeping the application behind a fence.
>> 

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



Re: Why is Wicket called Wicket?

2015-11-26 Thread Rob Audenaerde
utfs :)

http://osdir.com/ml/java-wicket-user/2008-10/msg01066.html


On Thu, Nov 26, 2015 at 9:38 AM, Tobias Soloschenko <
tobiassolosche...@googlemail.com> wrote:

> Catch question? :-D
>
> kind regards
>
> Tobias
>
> > Am 26.11.2015 um 09:32 schrieb Ernesto Reinaldo Barreiro <
> reier...@gmail.com>:
> >
> > Small door in a big door of J2EE?
> >
> > On Thu, Nov 26, 2015 at 9:29 AM, Tobias Soloschenko <
> > tobiassolosche...@googlemail.com> wrote:
> >
> >> Hi guys,
> >>
> >> I just wondered why the framework is called Wicket?
> >>
> >> Mea culpa! :-)
> >>
> >> kind regards
> >>
> >> Tobias
> >>
> >> -
> >> 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 in wicket 7.1.0

2015-11-06 Thread Rob Audenaerde
Has anyone got this working?

-Rob


Re: wicketstuff-select2 in wicket 7.1.0

2015-11-06 Thread Rob Audenaerde
Thanks!
On Nov 6, 2015 12:00, "Maxim Solodovnik" <solomax...@gmail.com> wrote:

> Main fixes are in https://github.com/wicketstuff/core/issues/411
> Hopefully will address all issues this week
>
> On Fri, Nov 6, 2015 at 4:55 PM, Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > Hi,
> >
> > See https://github.com/wicketstuff/core/issues/429 and
> > https://github.com/wicketstuff/core/issues/430.
> > It is working in 7.2.0-SNAPSHOT. And 7.0.0 (with Select2 3.x)
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Fri, Nov 6, 2015 at 11:51 AM, Rob Audenaerde <
> rob.audenae...@gmail.com>
> > wrote:
> >
> > > Has anyone got this working?
> > >
> > > -Rob
> > >
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>


2 factor authentication, AuthenticatedWebSession, best practice?

2015-10-07 Thread Rob Audenaerde
Hi all,

I'm looking into 2 factor authentication for my Wicket Application.

Currently, I have a simple implementation where the user prepends a code to
his password and the authenticate method uses that part as second factor.

However, I would like a nicer interface (like, for example, google uses).
In this interface, the user first enters his username and password. If they
match, the user is taken to a second login-screen where he can enter a code
/ pick an option (app/text/call) to get a code.

I want to implement something similar in Wicket (using the
AuthenticatedWebapplication), but I'm not sure how to handle the Session.

I have thought of two options:

1. On successful username/password, set a role and redirect to the
CodePage. The user is 'signedIn' in the session (but not really, so this
seems a bit hacky)
2. Create a custom SignIn page, where username and password are checked in
the backend, passed on the the CodePage, and have the CodePage call
authenticate().

But there might be better alternatives as well.

What do you think is the best approach?

-Rob


StringValidator does not fail?

2015-09-28 Thread Rob Audenaerde
Hi all

I have a change-password-page with a PasswordField with
a StringValidator.lengthBetween( 3, 20 ).

I ran into an error where I could paste a long password (>20 chars), and
Wicket not throwing errors, but cutting the password to length 20.

Wicket version: 7.0
Chrome: 45

The maxlength is rendered as attribute on the element.




Is this a desired behavior? I found it rather confusing..


Re: StringValidator does not fail?

2015-09-28 Thread Rob Audenaerde
Hi Martin,

Thanks you the quick reply, I have created an issue and quickstart:

https://issues.apache.org/jira/browse/WICKET-5987

-Rob

On Mon, Sep 28, 2015 at 10:57 AM, Martin Grigorov <mgrigo...@apache.org>
wrote:

> Hi,
>
> I looks like a bug.
> Please create a ticket with a quickstart and/or unit test.
> Thanks!
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
>
> On Mon, Sep 28, 2015 at 10:54 AM, Rob Audenaerde <rob.audenae...@gmail.com
> >
> wrote:
>
> > Hi all
> >
> > I have a change-password-page with a PasswordField with
> > a StringValidator.lengthBetween( 3, 20 ).
> >
> > I ran into an error where I could paste a long password (>20 chars), and
> > Wicket not throwing errors, but cutting the password to length 20.
> >
> > Wicket version: 7.0
> > Chrome: 45
> >
> > The maxlength is rendered as attribute on the element.
> >
> >  > maxlength="20" minlength="3">
> >
> >
> > Is this a desired behavior? I found it rather confusing..
> >
>


Re: 6.0.x Docs Down?

2015-07-08 Thread Rob Audenaerde
Thanks Martin!

On Wed, Jul 8, 2015 at 9:08 AM, Martin Grigorov mgrigo...@apache.org
wrote:

 The javadocs [1] and guide [2] are available again!

 As I said we use JDK 7.x for the build as a workaround.

 1. http://ci.apache.org/projects/wicket/apidocs/6.x/
 2. http://ci.apache.org/projects/wicket/guide/6.x/

 Martin Grigorov
 Freelancer. Available for hire!
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Wed, Jul 8, 2015 at 9:34 AM, Martin Grigorov mgrigo...@apache.org
 wrote:

  The problem is in OpenSSL. The Nexus server has been updated with a
 better
  SSL certificate and now JDK 1.6 cannot connect to it:
  https://issues.apache.org/jira/browse/BUILDS-85
 
  As a temporary workaround I'll switch our Wicket 6.x build to use JDK
 7.x.
  There is a suggestion to use Maven toolchains, so Maven is run with JDK
 7,
  but the compilation is done with JDK 1.6.
  I'll do it as soon as I have the time.
 
  Martin Grigorov
  Freelancer. Available for hire!
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Wed, Jul 8, 2015 at 4:39 AM, gump lee zeno@gmail.com wrote:
 
  The link for 6.0 api still down.
 
  http://ci.apache.org/projects/wicket/apidocs/6.x/
 
  Where would I found the API document?
 
 
  Thanks and best regards,
  Gump
 
 
  On Tue, Jun 30, 2015 at 1:54 PM, Martin Grigorov mgrigo...@apache.org
  wrote:
 
  
 https://blogs.apache.org/infra/entry/buildbot_master_currently_off_line
   On Jun 30, 2015 6:00 AM, kyabe_JP okabe.wic...@gmail.com wrote:
  
I have failed to access to any apidocs page, e.g
http://ci.apache.org/projects/wicket/apidocs/6.x/
http://ci.apache.org/projects/wicket/apidocs/6.x/  .
   
According to the past conversation, the BuildBot servers had been
  back.
   
Am I looking wrong address or if it down again ?
   
   
--
View this message in context:
   
  
 
 http://apache-wicket.1842946.n4.nabble.com/6-0-x-Docs-Down-tp4665501p4671417.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
   
   
  
 
 
 



Re: Best Practice - Create component by entity type?

2015-07-03 Thread Rob Audenaerde
Hi Per,

You can do something like this:

Create a set of compontents that will be your panels to display specific
Persons.

Let's call them PersonPanels.

You can introduce a PersonPanelFactory, which might give you the
appropriate PersonPanel based on the class of the Person (
 person.getClass() ) . This is however not yet nicely extensible, but you
decoupled the logic for creating panels from your list-code.

Next step: you need to register the classes somehow so you can provide
panels for in the factory, so the factory can for example use a map to
provide the proper PersonPanel. You can use reflection to call the
constructors, which will need to have the same arguments for their
constructors. This is the biggest disadvantage I think in this approach.

Somewhat like this:

class PersonPanelFactory
{
   public PersonPanel getPanelFor( ClassT extends personClass) ...
  public registerPanelFor ( ClassT extends Person personClass, ClassT
extends PersonPanel personPanelClass ...
}



On Fri, Jul 3, 2015 at 2:32 PM, Per Newgro per.new...@gmx.ch wrote:

 Hi,

 i think about that problem for some time now. Maybe someone alrady has a
 good solution.

 Let's assume we have a Manager entity and a Tainee entity. Both are Person
 entities.
 In Model we ask for all persons. So we get a mix from Managers and
 Trainees in a list.

 Both concrete entity types shall be displayed in their own component (a
 custom panel for every1).

 I would ask for simple, decoupled (extendible) solution of this problem.
 So far i've tried the obvious instance of approach. But this is not
 extendible.
 Maybe someone can send me some ideas.

 Thanks for your support
 Per

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




AjaxSelfUpdatingTimerBehavior memory?

2014-03-14 Thread Rob Audenaerde
I have a question on the AjaxSelfUpdatingTimerBehavior
I have some memory issues and wondered in the behavior could cause this (on 
Jetty)
When connected with jvisualvm I see the heap increasing each time the 
AjaxSelfUpdatingTimerBehavior is fired (with about 3M per request)
Is that what I should see?


?Thx

-Rob


RE: AjaxSelfUpdatingTimerBehavior memory?

2014-03-14 Thread Rob Audenaerde
On Fri, Mar 14, 2014 at 3:29 PM, Rob Audenaerde rob.audenae...@valuecare.nl
 wrote:

 I have a question on the AjaxSelfUpdatingTimerBehavior
 I have some memory issues and wondered in the behavior could cause this
 (on Jetty)
 When connected with jvisualvm I see the heap increasing each time the
 AjaxSelfUpdatingTimerBehavior is fired (with about 3M per request)
 Is that what I should see?



I have reproduced it in a quickstart.

The screenshot is here: http://www.audenaerde.org/ajax/screenshot.png
The quickstart can be found here: http://www.audenaerde.org/ajax/ajaxmemory.zip

Note that I am running in debug mode; but that should not matter I suppose. 
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Wicket dataprovider query / search time

2013-02-04 Thread Rob Audenaerde
Hi All,

I'm displaying (Lucene)search results in Wicket using a DataTable. The 
Datatable uses a IDataProvider to populate the toolbars and cells.

I try to figure out the amount of time it took to do the query. A typical query 
involves calls to

* size(...)
* iterator(...)
* model(..)

What would be a good approach to count the time spend in these methods? I can 
implement stuff like System.currentTimeMillis() in each of these calls, but 
what would be the 'proper' place to do this? 

And also, I would like to display this time in a Toolbar, so somehow I should 
make sure when the 'dataloading' part is done. Any hints? 

http://stackoverflow.com/questions/14686739/wicket-dataprovider-query-search-time


Thanks!

-Rob

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



Re: Wicket dataprovider query / search time

2013-02-04 Thread Rob Audenaerde
The problem is that there are two calls to the DAO,  one for size and one for 
iterator. They both take time. I can make these methods return compound objects 
that also return the call duration, or wrap the calls in the DataProvider. I 
would also need a call to collect this total amount of time. For this I could 
use a model that wraps a time collector variable in the DataProvider. 



Op 4 feb. 2013 om 17:44 heft Francois Meillet francois.meil...@gmail.com 
het volgende geschreven:

 Try to collect the search method's duration in your DAO.
 
 François
 
 Le 4 févr. 2013 à 16:36, Rob Audenaerde rob.audenae...@valuecare.nl a écrit 
 :
 
 Hi All,
 
 I'm displaying (Lucene)search results in Wicket using a DataTable. The 
 Datatable uses a IDataProvider to populate the toolbars and cells.
 
 I try to figure out the amount of time it took to do the query. A typical 
 query involves calls to
 
 * size(...)
 * iterator(...)
 * model(..)
 
 What would be a good approach to count the time spend in these methods? I 
 can implement stuff like System.currentTimeMillis() in each of these calls, 
 but what would be the 'proper' place to do this? 
 
 And also, I would like to display this time in a Toolbar, so somehow I 
 should make sure when the 'dataloading' part is done. Any hints? 
 
 http://stackoverflow.com/questions/14686739/wicket-dataprovider-query-search-time
 
 
 Thanks!
 
 -Rob
 
 -
 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