Re: Wicket 10 - not finding "el" properties

2024-05-27 Thread Martin Grigorov
Hi Marios,

On Mon, May 27, 2024 at 9:33 AM mscoon  wrote:

> Hi all,
>
> We have an application in greek. We recently to wicket 10 and messages for
> the build-in validators (e.g. Required) stopped appearing in greek and
> started appearing in english.
>
> We noticed that the name of the properties file in wicket-core
> (wicket-core\src\main\java\org\apache\wicket) is
> Applcation_el.properties.utf8.properties (notice it has twice the word
> "properties"), and this seems to be the culprit.
>
> Should I submit a PR for this?
>

Yes, please!
Thank you!



>
> Thanks
> Marios
>


Re: Wicket & Quarkus

2024-03-22 Thread Martin Grigorov
Hi,

I am not aware of anything "official".
You may take a look at https://github.com/brunoborges/wicket-with-quarkus
but it is rather an example than integration.

On Fri, Mar 22, 2024 at 11:59 AM Robert Palm 
wrote:

>
> Hi list!
>
> I am looking into wicket 10 and wonder how to use it with quarkus.io
>
> Is there any "official integration" available ?
>
> Thanks
>
> Robert
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AbstractAjaxBehavior#getCallbackUrl returning HTTP URLs instead of HTTPS

2024-03-19 Thread Martin Grigorov
Hi,

Can you put a breakpoint at
https://github.com/apache/wicket/blob/wicket-9.x/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebResponse.java#L176
(#encodeURL(Url)) and see what is going on?
Wicket should return a relative url and let the browser resolve it to full.

On Mon, Mar 18, 2024 at 7:35 PM Tomasz Pluskiewicz 
wrote:

> Hello
>
> I’m troubleshooting a problem which suddenly appeared on my instance of
> INCEpTION [1]. It is using wicket 9.16
>
> I am running behind a reverse proxy and seemingly out of the blue page
> navigation goes over HTTPS-HTTP-HTTPS redirects [2]. Alone, that would not
> be an issue but the application sends some URLs constructed by wicket [2]
> to fetch and they fail security checks in the browser.
>
> I tracked them to AbstractAjaxBehavior#getCallbackUrl but am at a loss as
> to why the returned URLs are not HTTPS…
>
> The server is running a managed nginx on cloud66.com. It is doing SSL
> termination as expected, adding the X-Forwarded-* headers. I’ve been
> running a number of apps there and never had this kind of problems.
> Strangest part is that initially the app worked fine and this started
> happening only after some time, with no apparent reason that I con think of
> in terms of server reconfiguration etc.
>
> Thanks,
> Tom
>
> [1]: https://github.com/inception-project/inception
> [2]: https://github.com/inception-project/inception/issues/4630
> [3]:
> https://github.com/inception-project/inception/blob/inception-31.3/inception/inception-pdf-editor2/src/main/java/de/tudarmstadt/ukp/inception/pdfeditor2/view/PdfDocumentIFrameView.java#L165-L166
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Question about Wicket 10.0.0-M2

2024-02-06 Thread Martin Grigorov
Hi Tom,

It seems that you run your application with modulePath (JPMS) instead of
classpath.
But your application is not a JPMS module itself - "unnamed module".
I guess you just need to disable JPMS for Maven Surefire plugin -
https://stackoverflow.com/a/73654342/497381

On Tue, Feb 6, 2024 at 3:36 PM Tom Benjamins 
wrote:

> Hello,
>
> I was wondering whether this is the correct mailinglist to send a
> quiestion about upgrading a Wicket 9 application to
> Wicket 10.
> I have upgraded from Wicket 9.15 to 10.0.0-M2, Java 17 and Spring Boot 3.2
>
> I have a regression/ test which uses a CachingPageStore and during the
> adding of any page to the store
>
> I get the following exception:
>
> java.lang.reflect.InaccessibleObjectException: Unable to make static
> java.io.ObjectStreamClass
> java.io.ObjectStreamClass.lookup(java.lang.Class,boolean) accessible:
> module java.base does not "opens java.io" to unnamed module @21bcffb5
>
> at
>
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
>
> at
>
> java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
>
> at
> java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
>
> at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
>
> at
>
> org.apache.wicket.core.util.objects.checker.CheckingObjectOutputStream.(CheckingObjectOutputStream.java:253)
>
> at
>
> org.apache.wicket.serialize.java.JavaSerializer$SerializationCheckerObjectOutputStream.writeObjectOverride(JavaSerializer.java:387)
>
> at
> java.base/java.io
> .ObjectOutputStream.writeObject(ObjectOutputStream.java:350)
>
> at
>
> org.apache.wicket.serialize.java.JavaSerializer.serialize(JavaSerializer.java:97)
>
> at
>
> org.apache.wicket.pageStore.SerializingPageStore.addPage(SerializingPageStore.java:80)
>
> at
>
> org.apache.wicket.pageStore.CachingPageStore.addPage(CachingPageStore.java:73)
>
> at
>
> org.apache.wicket.pageStore.RequestPageStore.detach(RequestPageStore.java:114)
>
> at org.apache.wicket.page.PageManager.detach(PageManager.java:91)
>
>
> Is this a error that anybody has seen before? Does this merit an issue?
>
> --
> Lost Lemon B.V.T: +31(0)85 489 
> Kennemerplein 1E:tombenjam...@lostlemon.nl
> 2011 MH HaarlemW:www.lostlemon.nl
>


Re: Wicket 9 + Jetty 12: Lots of exceptions due to modification of read-only response

2024-01-23 Thread Martin Grigorov
https://issues.apache.org/jira/browse/WICKET-7075
I will backport it to 9.x !

On Tue, Jan 23, 2024 at 10:26 AM Martin Grigorov 
wrote:

> Hi,
>
> On Mon, Jan 22, 2024 at 6:09 PM Martin Simons 
> wrote:
>
>> Hey everyone,
>>
>> I started a gnarly migration of a really old Wicket 6 application to
>> Wicket 9 last week. One of the objectives was to move away from a
>> .war-based deployment to a Tomcat app server, and instead go with an
>> embedded server which runs within a Docker file. The choice here fell on
>> Jetty 12 using the EE8 environment.
>>
>
> Are you still able to deploy to Tomcat ? If YES then it would be good to
> check whether your app will experience the same errors there too!
>
>
>>
>> So far, so good. After getting all the API changes sorted out, most
>> things work as expected. But what puzzles me is that I get the logs flooded
>> with exceptions because different pieces of code try to write to the web
>> response at a point in the web request cycle when it has already been
>> committed.
>>
>> For Wicket itself, this affects the COOP and COEP filters when handling
>> HEAD requests.
>>
>
> COOP and COEP are new in Wicket 9.x, so it is quite possible that they
> might have issues with HEAD requests.
> Please provide failing unit tests and/or a quickstart and/or at least
> stacktraces!
>
>
>>
>> My one code is affected (for example) when trying to set a cookie at the
>> end of a request cycle.
>>
>> So two questions:
>>
>>   1.  I am likely missing something obvious. Does anyone see what it
>> might be?
>>   2.  Regarding my own code: I get that I can’t write to a response
>> that’s been committed, but what’s “the Wicket way” to modify a response
>> header after the response has been processed but before it is written?
>> RequestCycleListener::onEndRequest() seems to be too late.
>
>
> RequestCycle[Listener]#onEndRequest() is called before
> HttpServletResponse#flush(), so it shouldn't be that late. But I need to
> debug the app to tell whether the response is buffering or not.
> See org.apache.wicket.protocol.http.HeaderBufferingWebResponse
>
>
> If you were using Wicket 10.x + servlet-api 6.x then you could use
> https://jakarta.ee/specifications/servlet/6.0/apidocs/jakarta.servlet/jakarta/servlet/http/httpservletresponse#setTrailerFields(java.util.function.Supplier)
>
>
>
>
>>
>> I found surprisingly little on this problem when googling, so I am almost
>> certain it’s my mistake. But after looking at it for days, I am sort of
>> stuck. I would greatly appreciate a few pointers.
>>
>> Thank you very much,
>> Martin
>>
>


Re: Wicket 9 + Jetty 12: Lots of exceptions due to modification of read-only response

2024-01-23 Thread Martin Grigorov
Hi,

On Mon, Jan 22, 2024 at 6:09 PM Martin Simons 
wrote:

> Hey everyone,
>
> I started a gnarly migration of a really old Wicket 6 application to
> Wicket 9 last week. One of the objectives was to move away from a
> .war-based deployment to a Tomcat app server, and instead go with an
> embedded server which runs within a Docker file. The choice here fell on
> Jetty 12 using the EE8 environment.
>

Are you still able to deploy to Tomcat ? If YES then it would be good to
check whether your app will experience the same errors there too!


>
> So far, so good. After getting all the API changes sorted out, most things
> work as expected. But what puzzles me is that I get the logs flooded with
> exceptions because different pieces of code try to write to the web
> response at a point in the web request cycle when it has already been
> committed.
>
> For Wicket itself, this affects the COOP and COEP filters when handling
> HEAD requests.
>

COOP and COEP are new in Wicket 9.x, so it is quite possible that they
might have issues with HEAD requests.
Please provide failing unit tests and/or a quickstart and/or at least
stacktraces!


>
> My one code is affected (for example) when trying to set a cookie at the
> end of a request cycle.
>
> So two questions:
>
>   1.  I am likely missing something obvious. Does anyone see what it might
> be?
>   2.  Regarding my own code: I get that I can’t write to a response that’s
> been committed, but what’s “the Wicket way” to modify a response header
> after the response has been processed but before it is written?
> RequestCycleListener::onEndRequest() seems to be too late.


RequestCycle[Listener]#onEndRequest() is called before
HttpServletResponse#flush(), so it shouldn't be that late. But I need to
debug the app to tell whether the response is buffering or not.
See org.apache.wicket.protocol.http.HeaderBufferingWebResponse


If you were using Wicket 10.x + servlet-api 6.x then you could use
https://jakarta.ee/specifications/servlet/6.0/apidocs/jakarta.servlet/jakarta/servlet/http/httpservletresponse#setTrailerFields(java.util.function.Supplier)




>
> I found surprisingly little on this problem when googling, so I am almost
> certain it’s my mistake. But after looking at it for days, I am sort of
> stuck. I would greatly appreciate a few pointers.
>
> Thank you very much,
> Martin
>


Re: wicket 10 production ready plan

2024-01-09 Thread Martin Grigorov
Hi,

We work on the non-technical tasks (press release, announcement, etc.).
IMO it should be released in the next few weeks!

Martin

On Wed, Jan 10, 2024 at 7:13 AM any sdk  wrote:

> Hello wicket team,
>
> May I ask you when the wicket 10 production ready version will be released?
>
>
> https://stackoverflow.com/questions/77790782/apache-wicket-10-production-release-date
>


Re: Reg: Content security policy

2024-01-03 Thread Martin Grigorov
Could you please open a ticket in JIRA with this information ?
Thanks!

On Thu, Jan 4, 2024 at 9:46 AM sundar saba 
wrote:

> Hi all,
>   Thanks for your quick reply. This is the info message get from
> Kali Linux
>
> DirectiveValue
> script-src 'nonce-QmsK_uBjkJ84B3bGJIX'
> style-src   'nonce-QmsK_uBjkJ84B3bGJIX'
>
>


Re: Reg: Content security policy

2024-01-03 Thread Martin Grigorov
Hi,

https://github.com/apache/wicket/blob/e9461b0d115a7dbf4992596823521f6e038817d9/wicket-core/src/main/java/org/apache/wicket/core/random/ISecureRandomSupplier.java#L60

This is the relevant code. It looks OK to me.
Attachments are not allowed in the mailing list. Could you please
copy/paste a nonce instance which is non-base64 according to Kali Linux ?

Also please check that you don't use a custom NonceCreator -
https://github.com/apache/wicket/blob/e9461b0d115a7dbf4992596823521f6e038817d9/wicket-core/src/main/java/org/apache/wicket/csp/ContentSecurityPolicySettings.java#L102

Martin

On Thu, Jan 4, 2024 at 4:51 AM sundar saba 
wrote:

> Hi all,
>   I  applied a strict content security policy to my application
> using wicket after I tested my application using Kali Linux to check for
> vulnerabilities. The tool provides the report with an info message "Nonces
> should only use the base64 charset" regarding the info message needed to
> configure any properties in CSP. I attached the report screenshot . Can you
> all please give your suggestions.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


Re: wicket 10

2023-12-15 Thread Martin Grigorov
Please check
https://lists.apache.org/thread/5shcr43foncvt237wmp1fr8lponx4z9h

On Fri, Dec 15, 2023 at 10:53 AM xuwei zhang 
wrote:

> Hello Wicket Team,
>
>
> Do we have any plans for the release date of the Wicket 10 stable version?
>
>
> BR.
>


Re: Odd behaviour with StatelessForm and onInitialize()

2023-11-24 Thread Martin Grigorov
Hi,

I don't have time to debug the problem right now but could you try
something: swap these two lines -
https://gist.github.com/TekkiWuff/824e820427c16e204bde68e95fd566a6#file-homepage-java-L25-L26
I.e. first add() the components to the page and then call
super.onInitialize()

On Thu, Nov 23, 2023 at 5:09 PM  wrote:

> Hello,
> upon working with StatelessForms for the first time I stumbled up an odd
> behavior in regards to when the corresponding models are updated.
>
> Following setup:
>
> The base for this is a wicket quickstart 9.15.0. I modified the two
> HomePage files, which can be found here:
> https://gist.github.com/TekkiWuff/824e820427c16e204bde68e95fd566a6
>
> In this I have a Page with a StatelessForm with a single TextField and a
> Label. The TextField and Label share a single String-Model. The Label has a
> Behavior which sets the visibility of the attached component to false in
> the configure-phase if the String-Model is empty.
> Here this is needed to hide the whole HTML-tag instead of rendering an
> empty li-tag. In my actual application this applies to much bigger and more
> complex panels and lists which need to be hidden/shown when certain form
> values are set/not set.
>
>
> Now the to me odd behavior:
>
> If I initialise all components in the constructor of the page, everything
> works as expected.
> The request of the form submit gets processed, the model updated and then
> afterwards the page gets rendered among which also the Behaviour is run to
> set the visibility of the label.
> So the visibility is decided on the just submitted form value.
>
> Now if I initialise all components in the onInitialize() method, which by
> my understanding is supposed to work like the constructor, the order of
> execution seems wrong.
> First, my Behaviour is run to set the visibility. Then the request of the
> form submit gets processed, the model updated and the page rendered.
> So here now the visibility is suddenly decided on the old value, which in
> my case initially is an empty Model, so my Label is always hidden.
>
> It's not a matter of using GET or POST and only seems to happen with
> StatelessForm. Using a normal statefull Form is working just fine.
>
> Is this a bug or an expected behaviour? I couldn't find anything about
> this in the description of the StatelessForm about this.
> I am exclusivly using the onInitialize() method for constructing all my
> pages, so before having to change several hundred pages to using the
> constructor, I rather ask first if it's maybe something that can be fixed.
>
> Regards
> Daniel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 10 Release Plans

2023-10-16 Thread Martin Grigorov
https://lists.apache.org/thread/p0gjllpk7zh8wwz3jm3r4v495ylp47rz
Now is the moment to test the candidate and vote for it!

On Tue, Sep 19, 2023 at 12:19 PM Martin Grigorov 
wrote:

> You might be interested in
> https://issues.apache.org/jira/browse/WICKET-7072
> This refactoring may require one more milestone/release candidate.
> Your input is very welcome!
>
> On Tue, Sep 12, 2023 at 3:09 PM Martin Grigorov 
> wrote:
>
>>
>>
>> On Tue, Sep 12, 2023 at 2:11 PM Andrea Del Bene 
>> wrote:
>>
>>> That's the right spirit!  I can start working on an official
>>> announcement
>>> right after M2. This time the process should be faster as I learnt
>>> something with the previous release...爛
>>>
>>
>> That would be great!
>> Thank you, Andrea!
>>
>>
>>
>>>
>>> On Mon, Sep 11, 2023 at 4:36 PM Thomas Heigl 
>>> wrote:
>>>
>>> > +1 for M2 and a final release as soon as possible.
>>> >
>>> > I also have no plans of adding anything to Wicket 10 before the
>>> release.
>>> >
>>> > I would have deployed M1 to production already if my Jakarta migration
>>> > wasn't blocked by performance issues in Hibernate 6 ,)
>>> >
>>> > Best,
>>> >
>>> > Thomas
>>> >
>>> > On Mon, Sep 11, 2023 at 3:30 PM Martin Grigorov 
>>> > wrote:
>>> >
>>> > > On Mon, Sep 11, 2023 at 4:13 PM Korbinian Bachl <
>>> > > korbinian.ba...@whiskyworld.de> wrote:
>>> > >
>>> > > > +1 for M2 or maybe even a RC1 if no big changes are outstanding?
>>> > > >
>>> > > > Usually I dont care for latest wicket versions (we stayed on 6 way
>>> too
>>> > > > long :D),
>>> > > > but since the JavaEE -> JakartaEE this is a showstopper for us as
>>> you
>>> > > even
>>> > > > cant access anything HTTPSession related as you include the
>>> jakarta-api
>>> > > on
>>> > > > jakarta.*
>>> > > > namespace but wicket 9 only delivers javax.* results
>>> > > >
>>> > > > Or if this really takes a year to release maybe a wicket-9-jakarta
>>> > > version?
>>> > > >
>>> > >
>>> > > Anyone can migrate his/her Javax based application to Jakarta now via
>>> > > migration tools like
>>> > https://github.com/apache/tomcat-jakartaee-migration
>>> > > It is a bytecode translator and has been tested with Wicket
>>> application
>>> > > several years ago!
>>> > >
>>> > >
>>> > >
>>> > > >
>>> > > >
>>> > > > - Ursprüngliche Mail -
>>> > > > > Von: "Martin Grigorov" 
>>> > > > > An: "users" 
>>> > > > > Gesendet: Montag, 11. September 2023 13:00:46
>>> > > > > Betreff: Re: Wicket 10 Release Plans
>>> > > >
>>> > > > > On Mon, Sep 11, 2023 at 11:06 AM Andrea Del Bene <
>>> > an.delb...@gmail.com
>>> > > >
>>> > > > > wrote:
>>> > > > >
>>> > > > >> Hi,
>>> > > > >>
>>> > > > >> as usual it's not easy making precise plans for the future since
>>> > many
>>> > > > of us
>>> > > > >> (probably all of us) works on Wicket on a voluntary base.
>>> However,
>>> > for
>>> > > > the
>>> > > > >> imminent future we are about to release Wicket 10 M2 and check
>>> that
>>> > > > >> everything is fine with the new dependency on Commons
>>> FileUpload M1.
>>> > > > After
>>> > > > >>
>>> > > > >
>>> > > > > +1 for M2 to re-test the latest dependencies updates (fileupload
>>> and
>>> > > > > others) !
>>> > > > >
>>> > > > >
>>> > > > >> this step we might be ready for a GA release of Wicket 10, but
>>> there
>>> > > are
>>> > > > >> some necessary steps (make a public announce, update the site,
>>> > etc...)
>>> > > > that
>>> > > > &g

Re: Wicket 10 Release Plans

2023-09-19 Thread Martin Grigorov
You might be interested in https://issues.apache.org/jira/browse/WICKET-7072
This refactoring may require one more milestone/release candidate.
Your input is very welcome!

On Tue, Sep 12, 2023 at 3:09 PM Martin Grigorov 
wrote:

>
>
> On Tue, Sep 12, 2023 at 2:11 PM Andrea Del Bene 
> wrote:
>
>> That's the right spirit!  I can start working on an official
>> announcement
>> right after M2. This time the process should be faster as I learnt
>> something with the previous release...爛
>>
>
> That would be great!
> Thank you, Andrea!
>
>
>
>>
>> On Mon, Sep 11, 2023 at 4:36 PM Thomas Heigl  wrote:
>>
>> > +1 for M2 and a final release as soon as possible.
>> >
>> > I also have no plans of adding anything to Wicket 10 before the release.
>> >
>> > I would have deployed M1 to production already if my Jakarta migration
>> > wasn't blocked by performance issues in Hibernate 6 ,)
>> >
>> > Best,
>> >
>> > Thomas
>> >
>> > On Mon, Sep 11, 2023 at 3:30 PM Martin Grigorov 
>> > wrote:
>> >
>> > > On Mon, Sep 11, 2023 at 4:13 PM Korbinian Bachl <
>> > > korbinian.ba...@whiskyworld.de> wrote:
>> > >
>> > > > +1 for M2 or maybe even a RC1 if no big changes are outstanding?
>> > > >
>> > > > Usually I dont care for latest wicket versions (we stayed on 6 way
>> too
>> > > > long :D),
>> > > > but since the JavaEE -> JakartaEE this is a showstopper for us as
>> you
>> > > even
>> > > > cant access anything HTTPSession related as you include the
>> jakarta-api
>> > > on
>> > > > jakarta.*
>> > > > namespace but wicket 9 only delivers javax.* results
>> > > >
>> > > > Or if this really takes a year to release maybe a wicket-9-jakarta
>> > > version?
>> > > >
>> > >
>> > > Anyone can migrate his/her Javax based application to Jakarta now via
>> > > migration tools like
>> > https://github.com/apache/tomcat-jakartaee-migration
>> > > It is a bytecode translator and has been tested with Wicket
>> application
>> > > several years ago!
>> > >
>> > >
>> > >
>> > > >
>> > > >
>> > > > - Ursprüngliche Mail -
>> > > > > Von: "Martin Grigorov" 
>> > > > > An: "users" 
>> > > > > Gesendet: Montag, 11. September 2023 13:00:46
>> > > > > Betreff: Re: Wicket 10 Release Plans
>> > > >
>> > > > > On Mon, Sep 11, 2023 at 11:06 AM Andrea Del Bene <
>> > an.delb...@gmail.com
>> > > >
>> > > > > wrote:
>> > > > >
>> > > > >> Hi,
>> > > > >>
>> > > > >> as usual it's not easy making precise plans for the future since
>> > many
>> > > > of us
>> > > > >> (probably all of us) works on Wicket on a voluntary base.
>> However,
>> > for
>> > > > the
>> > > > >> imminent future we are about to release Wicket 10 M2 and check
>> that
>> > > > >> everything is fine with the new dependency on Commons FileUpload
>> M1.
>> > > > After
>> > > > >>
>> > > > >
>> > > > > +1 for M2 to re-test the latest dependencies updates (fileupload
>> and
>> > > > > others) !
>> > > > >
>> > > > >
>> > > > >> this step we might be ready for a GA release of Wicket 10, but
>> there
>> > > are
>> > > > >> some necessary steps (make a public announce, update the site,
>> > etc...)
>> > > > that
>> > > > >> make it quite unlikely to release it before the end of the year.
>> At
>> > > the
>> > > > >>
>> > > > >
>> > > > > Next year ?!
>> > > > > I really do not understand why it has to be delayed so much when
>> > there
>> > > is
>> > > > > almost no active work on Wicket!
>> > > > > Kudos to Maxim for working on the FileUpload issue! But apart from
>> > > that I
>> > > > > don't see any plans for working on anything major that could not
>> be
>> > > 

Re: Wicket 10 Release Plans

2023-09-12 Thread Martin Grigorov
On Tue, Sep 12, 2023 at 2:11 PM Andrea Del Bene 
wrote:

> That's the right spirit!  I can start working on an official announcement
> right after M2. This time the process should be faster as I learnt
> something with the previous release...爛
>

That would be great!
Thank you, Andrea!



>
> On Mon, Sep 11, 2023 at 4:36 PM Thomas Heigl  wrote:
>
> > +1 for M2 and a final release as soon as possible.
> >
> > I also have no plans of adding anything to Wicket 10 before the release.
> >
> > I would have deployed M1 to production already if my Jakarta migration
> > wasn't blocked by performance issues in Hibernate 6 ,)
> >
> > Best,
> >
> > Thomas
> >
> > On Mon, Sep 11, 2023 at 3:30 PM Martin Grigorov 
> > wrote:
> >
> > > On Mon, Sep 11, 2023 at 4:13 PM Korbinian Bachl <
> > > korbinian.ba...@whiskyworld.de> wrote:
> > >
> > > > +1 for M2 or maybe even a RC1 if no big changes are outstanding?
> > > >
> > > > Usually I dont care for latest wicket versions (we stayed on 6 way
> too
> > > > long :D),
> > > > but since the JavaEE -> JakartaEE this is a showstopper for us as you
> > > even
> > > > cant access anything HTTPSession related as you include the
> jakarta-api
> > > on
> > > > jakarta.*
> > > > namespace but wicket 9 only delivers javax.* results
> > > >
> > > > Or if this really takes a year to release maybe a wicket-9-jakarta
> > > version?
> > > >
> > >
> > > Anyone can migrate his/her Javax based application to Jakarta now via
> > > migration tools like
> > https://github.com/apache/tomcat-jakartaee-migration
> > > It is a bytecode translator and has been tested with Wicket application
> > > several years ago!
> > >
> > >
> > >
> > > >
> > > >
> > > > - Ursprüngliche Mail -
> > > > > Von: "Martin Grigorov" 
> > > > > An: "users" 
> > > > > Gesendet: Montag, 11. September 2023 13:00:46
> > > > > Betreff: Re: Wicket 10 Release Plans
> > > >
> > > > > On Mon, Sep 11, 2023 at 11:06 AM Andrea Del Bene <
> > an.delb...@gmail.com
> > > >
> > > > > wrote:
> > > > >
> > > > >> Hi,
> > > > >>
> > > > >> as usual it's not easy making precise plans for the future since
> > many
> > > > of us
> > > > >> (probably all of us) works on Wicket on a voluntary base. However,
> > for
> > > > the
> > > > >> imminent future we are about to release Wicket 10 M2 and check
> that
> > > > >> everything is fine with the new dependency on Commons FileUpload
> M1.
> > > > After
> > > > >>
> > > > >
> > > > > +1 for M2 to re-test the latest dependencies updates (fileupload
> and
> > > > > others) !
> > > > >
> > > > >
> > > > >> this step we might be ready for a GA release of Wicket 10, but
> there
> > > are
> > > > >> some necessary steps (make a public announce, update the site,
> > etc...)
> > > > that
> > > > >> make it quite unlikely to release it before the end of the year.
> At
> > > the
> > > > >>
> > > > >
> > > > > Next year ?!
> > > > > I really do not understand why it has to be delayed so much when
> > there
> > > is
> > > > > almost no active work on Wicket!
> > > > > Kudos to Maxim for working on the FileUpload issue! But apart from
> > > that I
> > > > > don't see any plans for working on anything major that could not be
> > > > > introduced in a minor version!
> > > > > The official announcement (coordinated with press@a.o) has proved
> to
> > > be
> > > > an
> > > > > issue for the last few major releases! I'd rather go without it
> than
> > > > delay
> > > > > the release for half a year.
> > > > >
> > > > >
> > > > >> moment I don't have elements to be more precise, but probably
> after
> > > the
> > > > M2
> > > > >> we will have a clearer view of the next steps toward a final
> > release.
> > > > >

Re: Wicket 10 Release Plans

2023-09-11 Thread Martin Grigorov
On Mon, Sep 11, 2023 at 4:13 PM Korbinian Bachl <
korbinian.ba...@whiskyworld.de> wrote:

> +1 for M2 or maybe even a RC1 if no big changes are outstanding?
>
> Usually I dont care for latest wicket versions (we stayed on 6 way too
> long :D),
> but since the JavaEE -> JakartaEE this is a showstopper for us as you even
> cant access anything HTTPSession related as you include the jakarta-api on
> jakarta.*
> namespace but wicket 9 only delivers javax.* results
>
> Or if this really takes a year to release maybe a wicket-9-jakarta version?
>

Anyone can migrate his/her Javax based application to Jakarta now via
migration tools like https://github.com/apache/tomcat-jakartaee-migration
It is a bytecode translator and has been tested with Wicket application
several years ago!



>
>
> - Ursprüngliche Mail -
> > Von: "Martin Grigorov" 
> > An: "users" 
> > Gesendet: Montag, 11. September 2023 13:00:46
> > Betreff: Re: Wicket 10 Release Plans
>
> > On Mon, Sep 11, 2023 at 11:06 AM Andrea Del Bene 
> > wrote:
> >
> >> Hi,
> >>
> >> as usual it's not easy making precise plans for the future since many
> of us
> >> (probably all of us) works on Wicket on a voluntary base. However, for
> the
> >> imminent future we are about to release Wicket 10 M2 and check that
> >> everything is fine with the new dependency on Commons FileUpload M1.
> After
> >>
> >
> > +1 for M2 to re-test the latest dependencies updates (fileupload and
> > others) !
> >
> >
> >> this step we might be ready for a GA release of Wicket 10, but there are
> >> some necessary steps (make a public announce, update the site, etc...)
> that
> >> make it quite unlikely to release it before the end of the year. At the
> >>
> >
> > Next year ?!
> > I really do not understand why it has to be delayed so much when there is
> > almost no active work on Wicket!
> > Kudos to Maxim for working on the FileUpload issue! But apart from that I
> > don't see any plans for working on anything major that could not be
> > introduced in a minor version!
> > The official announcement (coordinated with press@a.o) has proved to be
> an
> > issue for the last few major releases! I'd rather go without it than
> delay
> > the release for half a year.
> >
> >
> >> moment I don't have elements to be more precise, but probably after the
> M2
> >> we will have a clearer view of the next steps toward a final release.
> >>
> >> Andrea.
> >>
> >> On Mon, Sep 11, 2023 at 8:18 AM Korbinian Bachl <
> >> korbinian.ba...@whiskyworld.de> wrote:
> >>
> >> > Hi Fellow Wicket-Devs!
> >> >
> >> > I'd like to also ask this question as wicket is the only part that
> holds
> >> > us back from jumping up to JakartaEE (currently JavaEE 8).
> >> >
> >> > Any eta on final release?
> >> >
> >> > - Ursprüngliche Mail -
> >> > > Von: "Tony Tkacik" 
> >> > > An: "users" 
> >> > > Gesendet: Donnerstag, 7. September 2023 13:54:41
> >> > > Betreff: Wicket 10 Release Plans
> >> >
> >> > > Hi,
> >> > > we are using Wicket 10 M1 for few months and we plan to release LTS
> of
> >> > our open
> >> > > source project midPoint 4.8 on 17 October 2023,
> >> > > are there any concrete plans about release timeframe of Wicket 10?
> >> > >
> >> > > Thanks
> >> > > Anton Tkacik
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >> --
> >> Andrea Del Bene.
> >> Apache Wicket committer.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket 10 Release Plans

2023-09-11 Thread Martin Grigorov
On Mon, Sep 11, 2023 at 11:06 AM Andrea Del Bene 
wrote:

> Hi,
>
> as usual it's not easy making precise plans for the future since many of us
> (probably all of us) works on Wicket on a voluntary base. However, for the
> imminent future we are about to release Wicket 10 M2 and check that
> everything is fine with the new dependency on Commons FileUpload M1. After
>

+1 for M2 to re-test the latest dependencies updates (fileupload and
others) !


> this step we might be ready for a GA release of Wicket 10, but there are
> some necessary steps (make a public announce, update the site, etc...) that
> make it quite unlikely to release it before the end of the year. At the
>

Next year ?!
I really do not understand why it has to be delayed so much when there is
almost no active work on Wicket!
Kudos to Maxim for working on the FileUpload issue! But apart from that I
don't see any plans for working on anything major that could not be
introduced in a minor version!
The official announcement (coordinated with press@a.o) has proved to be an
issue for the last few major releases! I'd rather go without it than delay
the release for half a year.


> moment I don't have elements to be more precise, but probably after the M2
> we will have a clearer view of the next steps toward a final release.
>
> Andrea.
>
> On Mon, Sep 11, 2023 at 8:18 AM Korbinian Bachl <
> korbinian.ba...@whiskyworld.de> wrote:
>
> > Hi Fellow Wicket-Devs!
> >
> > I'd like to also ask this question as wicket is the only part that holds
> > us back from jumping up to JakartaEE (currently JavaEE 8).
> >
> > Any eta on final release?
> >
> > - Ursprüngliche Mail -
> > > Von: "Tony Tkacik" 
> > > An: "users" 
> > > Gesendet: Donnerstag, 7. September 2023 13:54:41
> > > Betreff: Wicket 10 Release Plans
> >
> > > Hi,
> > > we are using Wicket 10 M1 for few months and we plan to release LTS of
> > our open
> > > source project midPoint 4.8 on 17 October 2023,
> > > are there any concrete plans about release timeframe of Wicket 10?
> > >
> > > Thanks
> > > Anton Tkacik
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> --
> Andrea Del Bene.
> Apache Wicket committer.
>


Re: Question about log warning: "IndicatingAjaxButton should be applied on a 'button' tag"

2023-06-29 Thread Martin Grigorov
https://github.com/sebfz1/wicket-jquery-ui/issues/359

On Thu, Jun 29, 2023 at 2:43 PM Shawn McKinney  wrote:

>
> > On Jun 29, 2023, at 6:30 AM, Shawn McKinney  wrote:
> >
> >
> > Which begs the question. What happens when we use the wicket extensions
> instead?
> >
> > (Don’t know but I’ll find out)
>
> The answer is it works as expected (with no warnings).
>
> The solution: use wicket extensions not googlecode.
>
> Very nice.
>
> —
> Shawn
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Question about log warning: "IndicatingAjaxButton should be applied on a 'button' tag"

2023-06-29 Thread Martin Grigorov
On Wed, Jun 28, 2023 at 4:08 PM Shawn McKinney  wrote:

> Howdy,
>
> I’m a little embarrassed to be asking. It seems so basic, should know it
> already.
>
> But, I’ve already spent a fair amount of time digging with no answers.
>
> My usage of Ajax buttons generates this warning in the logs:
>
> ```
> WARN  - 28 Jun 2023 07:35:56,704 - IndicatingAjaxButton   -
> IndicatingAjaxButton should be applied on a 'button’ tag
> ```
>
> Looking at the wicket source, I see:
>
>
> ```
> public abstract class IndicatingAjaxButton extends AjaxButton
> ...
> @Override
> protected void onComponentTag(ComponentTag tag)
> {
>   super.onComponentTag(tag);
>   if (!"button".equalsIgnoreCase(tag.getName()))
>   {
> LOG.warn("IndicatingAjaxButton should be applied on a 'button' tag”);
>

I don't see such code at
https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/IndicatingAjaxButton.java
Is your IndicatingAjaxButton.java part of some third party library ?



>   }
> }
> ```
>
> A head scratcher to me why that warning is in place.
>
> Obviously, there’s something I’m missing.
>
> Here’s my code. It all “seems" to work just fine (other than the warning).
> What am I doing wrong?
>
> ```java
> public Page1Form( String id )
> {
> …
>
> add( new IndicatingAjaxButton( "wspage1.button1" )
> {
>   @Override protected void onSubmit( AjaxRequestTarget target )
>   {
> logIt( target, “..." );
>   }
> }
> ...
> ```
>
> ```html
>
> class="ui-button ui-widget ui-state-default ui-corner-all
> ui-button-text-only”
>   wicket:id="wspage1.button1” value="wspage1.button1"
> name="wspage1.button1"/>
>
> ```
>
> I’m using the latest Wicket (v10). This behavior (log warnings) was
> present on earlier versions as well.
>
> Thanks
>
> —
> Shawn
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Question about log warning: "IndicatingAjaxButton should be applied on a 'button' tag"

2023-06-28 Thread Martin Grigorov
For me the real question is why  is not supported too
?!
IMO this is a bug!

On Wed, Jun 28, 2023 at 4:28 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> By the way... in almost all wicket applications I have worked with we had a
> blocking div covering the page and activated/deactivated via global AJAX
> listeners.
>
> On Wed, Jun 28, 2023 at 4:24 PM Shawn McKinney 
> wrote:
>
> >
> > > On Jun 28, 2023, at 8:11 AM, Bas Gooren  wrote:
> > >
> > > Hi Shawn,
> > >
> > > The code basically checks if you apply the behavior to a 
> > element.
> > >
> > > In other words:
> > >
> > >  is considered an “invalid” element for this
> > behavior.
> > >
> > >  is considered “valid”.
> > >
> >
> > Hello,
> >
> > As part of my scientific ‘poke and hope’ methodology;-), I had tried
> that.
> >
> > Now, the warning has disappeared. But, the button renders on the page as
> a
> > tiny dot, that actually works. I doubt my users would be a big fan of it
> > (tiny buttons), although their eye doctors might?
> >
> > Anyway, all kidding aside, here’s what the html looks like:
> >
> > ```
> >  >wicket:id="wspage1.button1"
> > value="wspage1.button1" name="wspage1.button1”/>
> > ```
> >
> > Best
> >
> > —
> > Shawn
> >
> > > Met vriendelijke groet,
> > > Kind regards,
> > >
> > > Bas Gooren
> >
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: Plans for Wicket 10 Release

2023-06-07 Thread Martin Grigorov
The PR has been merged!

On Wed, Jun 7, 2023 at 3:32 PM Greb Lindqvist 
wrote:

> I am looking forward to testing RC1 in several projects.
>
> Thank you for moving this forward!
>
> On Wed, Jun 7, 2023 at 6:00 AM Martin Grigorov 
> wrote:
>
> > On Wed, May 31, 2023 at 7:37 AM Maxim Solodovnik 
> > wrote:
> >
> > > Should be fixed with this: https://github.com/apache/wicket/pull/591
> :)
> > >
> >
> > If no one has a better solution than I suggest to merge this PR and
> release
> > Wicket 10 RC1
> >
> >
> >
> > >
> > > On Tue, 30 May 2023 at 22:16, Maxim Solodovnik 
> > > wrote:
> > > >
> > > >
> > > >
> > > > from mobile (sorry for typos ;)
> > > >
> > > >
> > > > On Tue, May 30, 2023, 20:05 Jeroen Steenbeeke <
> > j.steenbeeke...@gmail.com>
> > > wrote:
> > > >>
> > > >> The current wicket-commons-fileupload 10.0.0-M1-SNAPSHOT jar in the
> > > Apache
> > > >> snapshots repo duplicates classes from commons-io, Jakarta Servlet
> and
> > > >> SLF4J and is triggering my Maven Enforcer's BanDuplicateClasses
> rule.
> > > >
> > > >
> > > > Sounds interesting
> > > > Could you share details? :)
> > > >
> > > >>
> > > >> Op za 27 mei 2023 om 21:53 schreef Martin Grigorov <
> > > mgrigo...@apache.org>:
> > > >>
> > > >> > On Sat, May 27, 2023 at 8:18 PM smallufo 
> > wrote:
> > > >> >
> > > >> > > Hi
> > > >> > > Where can I get wicket-10 snapshot ?
> > > >> > >
> > > >> >
> > > >> >
> > > >> >
> > >
> >
> https://github.com/apache/wicket/blob/master/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml#L175-L186
> > > >> >
> > > >> > I cannot find it in mvnrepository.com ...
> > > >> >
> > > >> > I've upgrade all subsystems from javax to jakarta , and spring 5
> to
> > > spring
> > > >> > 6
> > > >> > > But a lot of incompatibility issues are in wicket 9
> > > >> > > Since it has no major issues , how about releasing it ASAP ?
> > > >> > > Thanks.
> > > >> > >
> > > >> > >
> > > >> > > János Cserép  於 2023年5月25日 週四 下午3:51寫道:
> > > >> > >
> > > >> > > > Just a thought...
> > > >> > > >
> > > >> > > > I've been using Wicket 10 snapshot builds in production for
> over
> > > a year
> > > >> > > now
> > > >> > > > with latest Spring and Jakarta libs without any major issues,
> so
> > > if
> > > >> > that
> > > >> > > is
> > > >> > > > an option for you, go ahead. You can mitigate risks by
> creating
> > > release
> > > >> > > > from a known git rev yourself if your release process does not
> > > like
> > > >> > > > SNAPSHOT dependencies.
> > > >> > > >
> > > >> > > > j
> > > >> > > >
> > > >> > > >
> > > >> > > > On Thu, 25 May 2023 at 09:15, Tony Tkacik <
> > > tony.tka...@evolveum.com
> > > >> > > > .invalid>
> > > >> > > > wrote:
> > > >> > > >
> > > >> > > > > Hi,
> > > >> > > > > I would like to ask about your timeline / plans regarding
> > > release of
> > > >> > > > > Wicket 10?
> > > >> > > > >
> > > >> > > > > We are in process of upgrading our open-source project
> > midPoint
> > > to
> > > >> > > latest
> > > >> > > > > Spring releases and that requires Wicket to be updated to
> > > version 10
> > > >> > > > > in order to support Spring 6.
> > > >> > > > >
> > > >> > > > > Thanks,
> > > >> > > > > Anton Tkacik
> > > >> > > > >
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > > >>
> > > >> --
> > > >> Jeroen Steenbeeke
> > >
> > >
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
>


Re: Plans for Wicket 10 Release

2023-06-07 Thread Martin Grigorov
On Wed, May 31, 2023 at 7:37 AM Maxim Solodovnik 
wrote:

> Should be fixed with this: https://github.com/apache/wicket/pull/591 :)
>

If no one has a better solution than I suggest to merge this PR and release
Wicket 10 RC1



>
> On Tue, 30 May 2023 at 22:16, Maxim Solodovnik 
> wrote:
> >
> >
> >
> > from mobile (sorry for typos ;)
> >
> >
> > On Tue, May 30, 2023, 20:05 Jeroen Steenbeeke 
> wrote:
> >>
> >> The current wicket-commons-fileupload 10.0.0-M1-SNAPSHOT jar in the
> Apache
> >> snapshots repo duplicates classes from commons-io, Jakarta Servlet and
> >> SLF4J and is triggering my Maven Enforcer's BanDuplicateClasses rule.
> >
> >
> > Sounds interesting
> > Could you share details? :)
> >
> >>
> >> Op za 27 mei 2023 om 21:53 schreef Martin Grigorov <
> mgrigo...@apache.org>:
> >>
> >> > On Sat, May 27, 2023 at 8:18 PM smallufo  wrote:
> >> >
> >> > > Hi
> >> > > Where can I get wicket-10 snapshot ?
> >> > >
> >> >
> >> >
> >> >
> https://github.com/apache/wicket/blob/master/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml#L175-L186
> >> >
> >> > I cannot find it in mvnrepository.com ...
> >> >
> >> > I've upgrade all subsystems from javax to jakarta , and spring 5 to
> spring
> >> > 6
> >> > > But a lot of incompatibility issues are in wicket 9
> >> > > Since it has no major issues , how about releasing it ASAP ?
> >> > > Thanks.
> >> > >
> >> > >
> >> > > János Cserép  於 2023年5月25日 週四 下午3:51寫道:
> >> > >
> >> > > > Just a thought...
> >> > > >
> >> > > > I've been using Wicket 10 snapshot builds in production for over
> a year
> >> > > now
> >> > > > with latest Spring and Jakarta libs without any major issues, so
> if
> >> > that
> >> > > is
> >> > > > an option for you, go ahead. You can mitigate risks by creating
> release
> >> > > > from a known git rev yourself if your release process does not
> like
> >> > > > SNAPSHOT dependencies.
> >> > > >
> >> > > > j
> >> > > >
> >> > > >
> >> > > > On Thu, 25 May 2023 at 09:15, Tony Tkacik <
> tony.tka...@evolveum.com
> >> > > > .invalid>
> >> > > > wrote:
> >> > > >
> >> > > > > Hi,
> >> > > > > I would like to ask about your timeline / plans regarding
> release of
> >> > > > > Wicket 10?
> >> > > > >
> >> > > > > We are in process of upgrading our open-source project midPoint
> to
> >> > > latest
> >> > > > > Spring releases and that requires Wicket to be updated to
> version 10
> >> > > > > in order to support Spring 6.
> >> > > > >
> >> > > > > Thanks,
> >> > > > > Anton Tkacik
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >>
> >> --
> >> Jeroen Steenbeeke
>
>
>
> --
> Best regards,
> Maxim
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Where is ModalWindow in wicket-10 ?

2023-05-28 Thread Martin Grigorov
On Sun, May 28, 2023 at 12:27 PM smallufo  wrote:

> I found that all my ModalWindow cannot compile because ModalWindow is
> removed.
> Is there any reason for this?
> And it seems there is a modelDialog ( to replace ModalWindow ?) ,
>

https://github.com/apache/wicket/blob/wicket-9.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L126
ModalWindow has been deprecated in 9.x and removed in 10.x
The migration guide also mentions it -
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+9.0#MigrationtoWicket9.0-DeprecateModalWindowfromwicket-extensionASFJIRAkey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution5aa69414-a9e9-3523-82ec-879b028fb15bWICKET-
But there is no really a guide how to replace ModalWindow with ModalDialog.
The best is to check the demo pages:
https://github.com/apache/wicket/tree/wicket-9.x/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal



> but it doesn't accept model object.
> Any migration guide ? thanks.
> [image: 截圖 2023-05-28 17.22.43.png]
>


Re: Plans for Wicket 10 Release

2023-05-27 Thread Martin Grigorov
On Sat, May 27, 2023 at 8:18 PM smallufo  wrote:

> Hi
> Where can I get wicket-10 snapshot ?
>

https://github.com/apache/wicket/blob/master/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml#L175-L186

I cannot find it in mvnrepository.com ...

I've upgrade all subsystems from javax to jakarta , and spring 5 to spring 6
> But a lot of incompatibility issues are in wicket 9
> Since it has no major issues , how about releasing it ASAP ?
> Thanks.
>
>
> János Cserép  於 2023年5月25日 週四 下午3:51寫道:
>
> > Just a thought...
> >
> > I've been using Wicket 10 snapshot builds in production for over a year
> now
> > with latest Spring and Jakarta libs without any major issues, so if that
> is
> > an option for you, go ahead. You can mitigate risks by creating release
> > from a known git rev yourself if your release process does not like
> > SNAPSHOT dependencies.
> >
> > j
> >
> >
> > On Thu, 25 May 2023 at 09:15, Tony Tkacik  > .invalid>
> > wrote:
> >
> > > Hi,
> > > I would like to ask about your timeline / plans regarding release of
> > > Wicket 10?
> > >
> > > We are in process of upgrading our open-source project midPoint to
> latest
> > > Spring releases and that requires Wicket to be updated to version 10
> > > in order to support Spring 6.
> > >
> > > Thanks,
> > > Anton Tkacik
> > >
> >
>


Re: Plans for Wicket 10 Release

2023-05-25 Thread Martin Grigorov
Since we use a local copy of commons-fileupload2 I see no stopper for a
release! A milestone one or a release candidate.

The last problem is in the CDI module - several dependencies still miss
jakarta impls (e.g. cdi-unit). I cannot say how big of an issue this is for
a Wicket itself.

On Thu, May 25, 2023 at 11:01 AM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> As far as I know release of wicket 10 is blocked by commons upload project.
> That project has been cloned as part of wicket 10.x branch and we have
> fixed at least one bug in it (and in parallel in the original project).
> Maybe other more experienced committers can comment?
>
> On Thu, May 25, 2023 at 10:52 AM János Cserép 
> wrote:
>
> > Just a thought...
> >
> > I've been using Wicket 10 snapshot builds in production for over a year
> now
> > with latest Spring and Jakarta libs without any major issues, so if that
> is
> > an option for you, go ahead. You can mitigate risks by creating release
> > from a known git rev yourself if your release process does not like
> > SNAPSHOT dependencies.
> >
> > j
> >
> >
> > On Thu, 25 May 2023 at 09:15, Tony Tkacik  > .invalid>
> > wrote:
> >
> > > Hi,
> > > I would like to ask about your timeline / plans regarding release of
> > > Wicket 10?
> > >
> > > We are in process of upgrading our open-source project midPoint to
> latest
> > > Spring releases and that requires Wicket to be updated to version 10
> > > in order to support Spring 6.
> > >
> > > Thanks,
> > > Anton Tkacik
> > >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: Wicket 10 + Commons FileUpload

2023-04-04 Thread Martin Grigorov
The build should be fixed with
https://github.com/apache/wicket/commit/8f8951b64db7006b131f7acfc8ad8f32bc6dca8a
Please review it and let us know if you see a problem!

On Mon, Apr 3, 2023 at 11:01 AM Martin Grigorov 
wrote:

> Well, that's good news, I think!
> The commons team is doing something !
>
> Let's wait a bit and see whether we should depend on a stable release or
> contibue with the PR that copies the classes.
>
> On Mon, Apr 3, 2023 at 10:59 AM Francesco Chicchiriccò <
> ilgro...@apache.org> wrote:
>
>> As far as I can see the class
>>
>> org.apache.commons.fileupload2.pub.FileSizeLimitExceededException
>>
>> imported here:
>>
>>
>> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L29
>>
>> is not present anymore in
>>
>> https://github.com/apache/commons-fileupload
>>
>> hence the stacktrace reported below might deserve some trust after all.
>>
>> Regards.
>>
>> On 2023/04/03 07:49:32 Francesco Chicchiriccò wrote:
>> > I see several recent commits on FileUpload, however:
>> >
>> > https://github.com/apache/commons-fileupload/commits/master
>> >
>> > and AFAICT Wicket 10.0.0-M1-SNAPSHOT depends on Commons FileUpload
>> 2.0-SNAPSHOT no?
>> >
>> > Last Friday all was working on Syncope side as well:
>> >
>> >
>> https://github.com/apache/syncope/commit/c65cbde960768ca370a6757d423ccb2c013b4704
>> >
>> > Regards.
>> >
>> > On 2023/04/03 07:33:57 Martin Grigorov wrote:
>> > > Hi Francesco,
>> > >
>> > > There are no new commits in master since Mar 24 -
>> > > https://github.com/apache/wicket/commits/master.
>> > > The PR about commons-fileupload2 is not yet merged to master -
>> > > https://github.com/apache/wicket/pull/565.
>> > > I see no reasons in Wicket for this exception ...
>> > >
>> > > One possible way to break the -SNAPSHOTs at Nexus is someone (Maxim
>> ?!) to
>> > > `mvn deploy`-ed PR 565 from his dev machine, but I doubt it.
>> > >
>> > >
>> > > On Mon, Apr 3, 2023 at 10:04 AM Francesco Chicchiriccò <
>> ilgro...@apache.org>
>> > > wrote:
>> > >
>> > > > Hi there,
>> > > > FTR this morning I've started receiving the following exception from
>> > > > Syncope Console 4.0.0-SNAPSHOT, based on Wicket 10.0.0-M1-SNAPSHOT:
>> > > >
>> > > > java.lang.ClassNotFoundException:
>> > > > org.apache.commons.fileupload2.pub.FileSizeLimitExceededException
>> > > > at
>> > > >
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
>> > > > at
>> > > >
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
>> > > > at
>> > > >
>> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:431)
>> > > > at
>> > > >
>> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1461)
>> > > > at
>> > > >
>> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
>> > > > at
>> > > >
>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:202)
>> > > > at
>> > > >
>> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:139)
>> > > > at
>> > > >
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:630)
>> > > > at
>> > > >
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:300)
>> > > > at
>> > > >
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:274)
>> > > > at
>> > > >
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
>> > > > at
>> > > >
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:202)
>> > > > at
>> > > >
>> org.apache.wicket.request.cycle.RequestCycle

Re: Wicket 10 + Commons FileUpload

2023-04-03 Thread Martin Grigorov
Well, that's good news, I think!
The commons team is doing something !

Let's wait a bit and see whether we should depend on a stable release or
contibue with the PR that copies the classes.

On Mon, Apr 3, 2023 at 10:59 AM Francesco Chicchiriccò 
wrote:

> As far as I can see the class
>
> org.apache.commons.fileupload2.pub.FileSizeLimitExceededException
>
> imported here:
>
>
> https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/markup/html/form/Form.java#L29
>
> is not present anymore in
>
> https://github.com/apache/commons-fileupload
>
> hence the stacktrace reported below might deserve some trust after all.
>
> Regards.
>
> On 2023/04/03 07:49:32 Francesco Chicchiriccò wrote:
> > I see several recent commits on FileUpload, however:
> >
> > https://github.com/apache/commons-fileupload/commits/master
> >
> > and AFAICT Wicket 10.0.0-M1-SNAPSHOT depends on Commons FileUpload
> 2.0-SNAPSHOT no?
> >
> > Last Friday all was working on Syncope side as well:
> >
> >
> https://github.com/apache/syncope/commit/c65cbde960768ca370a6757d423ccb2c013b4704
> >
> > Regards.
> >
> > On 2023/04/03 07:33:57 Martin Grigorov wrote:
> > > Hi Francesco,
> > >
> > > There are no new commits in master since Mar 24 -
> > > https://github.com/apache/wicket/commits/master.
> > > The PR about commons-fileupload2 is not yet merged to master -
> > > https://github.com/apache/wicket/pull/565.
> > > I see no reasons in Wicket for this exception ...
> > >
> > > One possible way to break the -SNAPSHOTs at Nexus is someone (Maxim
> ?!) to
> > > `mvn deploy`-ed PR 565 from his dev machine, but I doubt it.
> > >
> > >
> > > On Mon, Apr 3, 2023 at 10:04 AM Francesco Chicchiriccò <
> ilgro...@apache.org>
> > > wrote:
> > >
> > > > Hi there,
> > > > FTR this morning I've started receiving the following exception from
> > > > Syncope Console 4.0.0-SNAPSHOT, based on Wicket 10.0.0-M1-SNAPSHOT:
> > > >
> > > > java.lang.ClassNotFoundException:
> > > > org.apache.commons.fileupload2.pub.FileSizeLimitExceededException
> > > > at
> > > >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> > > > at
> > > >
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> > > > at
> > > >
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:431)
> > > > at
> > > >
> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1461)
> > > > at
> > > >
> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
> > > > at
> > > >
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:202)
> > > > at
> > > >
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:139)
> > > > at
> > > >
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:630)
> > > > at
> > > >
> org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:300)
> > > > at
> > > >
> org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:274)
> > > > at
> > > >
> org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
> > > > at
> > > >
> org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:202)
> > > > at
> > > >
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:910)
> > > > at
> > > >
> org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
> > > > at
> > > >
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:294)
> > > > at
> > > >
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:255)
> > > > at
> > > >
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:277)
> > > > at org.apache.wicket.protocol.ws
> > > >

Re: Wicket 10 + Commons FileUpload

2023-04-03 Thread Martin Grigorov
https://repository.apache.org/content/repositories/snapshots/org/apache/wicket/wicket-util/10.0.0-M1-SNAPSHOT/wicket-util-10.0.0-M1-20230324.080605-197.pom
is the last version and it contains the dependency to commons-fileupload2

On Mon, Apr 3, 2023 at 10:33 AM Martin Grigorov 
wrote:

> Hi Francesco,
>
> There are no new commits in master since Mar 24 -
> https://github.com/apache/wicket/commits/master.
> The PR about commons-fileupload2 is not yet merged to master -
> https://github.com/apache/wicket/pull/565.
> I see no reasons in Wicket for this exception ...
>
> One possible way to break the -SNAPSHOTs at Nexus is someone (Maxim ?!) to
> `mvn deploy`-ed PR 565 from his dev machine, but I doubt it.
>
>
> On Mon, Apr 3, 2023 at 10:04 AM Francesco Chicchiriccò <
> ilgro...@apache.org> wrote:
>
>> Hi there,
>> FTR this morning I've started receiving the following exception from
>> Syncope Console 4.0.0-SNAPSHOT, based on Wicket 10.0.0-M1-SNAPSHOT:
>>
>> java.lang.ClassNotFoundException:
>> org.apache.commons.fileupload2.pub.FileSizeLimitExceededException
>> at
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
>> at
>> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
>> at
>> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:431)
>> at
>> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1461)
>> at
>> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
>> at
>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:202)
>> at
>> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:139)
>> at
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:630)
>> at
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:300)
>> at
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:274)
>> at
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
>> at
>> org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:202)
>> at
>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:910)
>> at
>> org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:294)
>> at
>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:255)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:277)
>> at org.apache.wicket.protocol.ws
>> .AbstractUpgradeFilter.processRequestCycle(AbstractUpgradeFilter.java:67)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:208)
>> at
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:307)
>>
>> Regards.
>>
>> On 2023/03/31 07:55:27 Andrea Del Bene wrote:
>> > Habemus (almost...) FileUpload 2.0!
>> > https://lists.apache.org/thread/kknw9bn2t8dzpbwojpg2hcqbgqf1qyzc
>> > Thanks again to Maxim, although I'm sorry he had to spend time working
>> to
>> > the PR 
>> >
>> >
>> >
>> >
>> > On Sat, Mar 25, 2023 at 5:02 PM Greb Lindqvist <
>> greb.lindqv...@gmail.com>
>> > wrote:
>> >
>> > > Thank you! 
>> > >
>> > > On Sat, Mar 25, 2023 at 6:05 AM Maxim Solodovnik <
>> solomax...@gmail.com>
>> > > wrote:
>> > >
>> > > > https://github.com/apache/wicket/pull/565 :))
>> > > >
>> > > > On Thu, 23 Mar 2023 at 19:49, Martin Grigorov > >
>> > > > wrote:
>> > > > >
>> > > > > Hi,
>> > > > >
>> > > > > The plan is to copy the fileupload classes in Wicket.
>> > > > > Do you want to help with a PR ?
>> > > > > Just create a new Maven module, e.g. wicket-commons-fileupload,
>> and
>> > > copy
>> > > > > the Jakarta related classes into
>> org/apache/wicket/commons/fil

Re: Wicket 10 + Commons FileUpload

2023-04-03 Thread Martin Grigorov
Hi Francesco,

There are no new commits in master since Mar 24 -
https://github.com/apache/wicket/commits/master.
The PR about commons-fileupload2 is not yet merged to master -
https://github.com/apache/wicket/pull/565.
I see no reasons in Wicket for this exception ...

One possible way to break the -SNAPSHOTs at Nexus is someone (Maxim ?!) to
`mvn deploy`-ed PR 565 from his dev machine, but I doubt it.


On Mon, Apr 3, 2023 at 10:04 AM Francesco Chicchiriccò 
wrote:

> Hi there,
> FTR this morning I've started receiving the following exception from
> Syncope Console 4.0.0-SNAPSHOT, based on Wicket 10.0.0-M1-SNAPSHOT:
>
> java.lang.ClassNotFoundException:
> org.apache.commons.fileupload2.pub.FileSizeLimitExceededException
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1437)
> at
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1245)
> at
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:431)
> at
> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1461)
> at
> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:793)
> at
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:202)
> at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:139)
> at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:630)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:300)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:274)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:202)
> at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:910)
> at
> org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
> at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:294)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:255)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:277)
> at org.apache.wicket.protocol.ws
> .AbstractUpgradeFilter.processRequestCycle(AbstractUpgradeFilter.java:67)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:208)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:307)
>
> Regards.
>
> On 2023/03/31 07:55:27 Andrea Del Bene wrote:
> > Habemus (almost...) FileUpload 2.0!
> > https://lists.apache.org/thread/kknw9bn2t8dzpbwojpg2hcqbgqf1qyzc
> > Thanks again to Maxim, although I'm sorry he had to spend time working to
> > the PR 
> >
> >
> >
> >
> > On Sat, Mar 25, 2023 at 5:02 PM Greb Lindqvist  >
> > wrote:
> >
> > > Thank you! 
> > >
> > > On Sat, Mar 25, 2023 at 6:05 AM Maxim Solodovnik  >
> > > wrote:
> > >
> > > > https://github.com/apache/wicket/pull/565 :))
> > > >
> > > > On Thu, 23 Mar 2023 at 19:49, Martin Grigorov 
> > > > wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > The plan is to copy the fileupload classes in Wicket.
> > > > > Do you want to help with a PR ?
> > > > > Just create a new Maven module, e.g. wicket-commons-fileupload, and
> > > copy
> > > > > the Jakarta related classes into
> org/apache/wicket/commons/fileupload
> > > > > package, i.e. to shade them.
> > > > > Then update wicket-core to make use of the new module and classes.
> > > > >
> > > > > On Thu, Mar 23, 2023 at 1:46 PM Greb Lindqvist <
> > > greb.lindqv...@gmail.com
> > > > >
> > > > > wrote:
> > > > >
> > > > > > Hello again,
> > > > > >
> > > > > > Like you, I've been watching
> > > > > >
> > > >
> https://issues.apache.org/jira/projects/FILEUPLOAD/issues/FILEUPLOAD-309
> > > > > >
> > > > > > If the FileUpload maintainers continue to be u

Re: Wicket 10 + Commons FileUpload

2023-03-23 Thread Martin Grigorov
Hi,

The plan is to copy the fileupload classes in Wicket.
Do you want to help with a PR ?
Just create a new Maven module, e.g. wicket-commons-fileupload, and copy
the Jakarta related classes into org/apache/wicket/commons/fileupload
package, i.e. to shade them.
Then update wicket-core to make use of the new module and classes.

On Thu, Mar 23, 2023 at 1:46 PM Greb Lindqvist 
wrote:

> Hello again,
>
> Like you, I've been watching
> https://issues.apache.org/jira/projects/FILEUPLOAD/issues/FILEUPLOAD-309
>
> If the FileUpload maintainers continue to be unresponsive, does the Wicket
> team have a plan?
> Are you willing to wait indefinitely or might you commit to an alternative?
> If the latter, do you have a feel for when that might be?
>
> Thanks for any info.
>


Re: addying support for upload to resource

2023-03-15 Thread Martin Grigorov
On Wed, Mar 15, 2023 at 2:16 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Ok. Then I will create an issue... Things I will try to achieve:
>
>
>- Upload to a resource in an asynchronous non page blocking request
>- Add an optional way to block the user from leaving the page while the
>upload is happening
>- Ways to cancel the upload
>- Adapt the upload progress bar to work with this new "component" and
>improve its code as in some corner cases it is producing client side
> errors
>(I created an issue for that some time ago).
>- Maybe useful too:  create a web socket based progress bar, as the
>upload progress bar now works pulling the server every second.
>
> Shall this work be done for 10.x only or two for 9.x? I think both would be
> good.
>

Both is fine!

I think it would be good also to add an example to wicket-examples that
uses a smart JS uploader, llike in the blog.
This way you will verify that the new APIs are easily extendable.


>
> On Wed, Mar 15, 2023 at 1:59 PM Martin Grigorov 
> wrote:
>
> > On Wed, Mar 15, 2023 at 12:25 PM Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > In our application we are heavily using web socket push (repainting web
> > > wicket components via web-socket push). One problem we found is that in
> > > some pages we have some uploads and those uploads can be very large,
> and
> > > while they are happening the page is "frozen" and no new web socket
> > > messages are received. Because of that, I have implemented a custom
> > upload
> > > to a wicket resource. In essence some adaptation of
> > >
> > >
> > >
> >
> https://github.com/martin-g/blogs/blob/master/file-upload/src/main/java/com/mycompany/fileupload/AbstractFileUploadResource.java
> > >
> > >
> > > But I also had to adapt the upload progress bar in order to be able to
> > > report progress upload. Would this be something interesting to have in
> > > a "generic" way in Wicket itself?
> > >
> >
> > +1
> > I think it would be a good addition!
> >
> >
> >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: addying support for upload to resource

2023-03-15 Thread Martin Grigorov
On Wed, Mar 15, 2023 at 12:25 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Hi,
>
> In our application we are heavily using web socket push (repainting web
> wicket components via web-socket push). One problem we found is that in
> some pages we have some uploads and those uploads can be very large, and
> while they are happening the page is "frozen" and no new web socket
> messages are received. Because of that, I have implemented a custom upload
> to a wicket resource. In essence some adaptation of
>
>
> https://github.com/martin-g/blogs/blob/master/file-upload/src/main/java/com/mycompany/fileupload/AbstractFileUploadResource.java
>
>
> But I also had to adapt the upload progress bar in order to be able to
> report progress upload. Would this be something interesting to have in
> a "generic" way in Wicket itself?
>

+1
I think it would be a good addition!



>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>


Re: does spring-boot migration require wicket-spring-boot

2023-01-29 Thread Martin Grigorov
We have documentation how to integrate Wicket with Spring -
https://nightlies.apache.org/wicket/guide/9.x/single.html#_integrating_wicket_with_spring
How to "upgrade" from Spring to Spring-Boot you should advice with Spring
Boot ocumentation.

On Mon, Jan 30, 2023 at 3:04 AM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Thank you Martin Grigorov.
> Is there any document/guide/sample to integrate Apache Wicket framework
> with Spring-Boot?
> Please share the links
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Fri, Jan 20, 2023 at 5:32 PM Martin Grigorov 
> wrote:
>
> > On Fri, Jan 20, 2023 at 11:16 AM Arunachalam Sibisakkaravarthi <
> > arunacha...@mcruncher.com> wrote:
> >
> > > Hi guys,
> > > We develop Wicket + Spring based web applications.
> > > Now we are working to migrate the Spring framework to Spring Boot. Does
> > > this require wicket-spring-boot migration?
> > > Is it mandatory to migrate Wicket framework to wicket-spring-boot?
> > >
> >
> > No.
> > Wicket-Spring-Boot may help you to configure the Wicket settings via
> Spring
> > boot settings, but it is not mandatory at all.
> >
> >
> >
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> >
>


Re: data persistence using hibernate

2023-01-23 Thread Martin Grigorov
On Tue, Jan 24, 2023 at 8:50 AM James Pollard 
wrote:

> I've managed to make some progress with database connectivity, ended up
> using hikaricp instead
>

HikariCP is a just a connection pool.
I am not sure what exactly you mean with "instead". A connection pool is
not a replacement of an ORM framework like Hibernate.



>
> However, I can't workout where the most appropriate place to put the
> connection pool close call, is there a close or shutdown function
> I can override so that the connection pool can be closed cleanly. I
> haven't had any luck in my search so far
>
> Additionally, I keep running into the following error:
>  java.lang.IllegalStateException: Illegal access: this web
> application instance has been stopped already.
> Could not load [META-INF/services/org.mariadb.jdbc.plugin.Codec].
> The following stack trace is thrown for debugging purposes as well as to
> attempt to terminate the thread which caused the illegal access.
>
> I'm assuming this is a error more to do hikaricp so I'll enquire among
> their community about it, but if someone has encountered this before feel
> to volunteer any suggestions or recommended actions. The odd thing is I
> still seem to be able to send queries to the database from what I can
> tell
>

MyWicketApplication#onDestroy()
https://github.com/apache/wicket/blob/4affb7b18424e40663239ac9c93d9ec33a432541/wicket-core/src/main/java/org/apache/wicket/Application.java#L569



>
> Best Regards
> James Pollard
> james.poll...@iinet.net.au
>
> On 27/12/22 8:23 am, Vit Rozkovec wrote:
> >
> >>
> >> But I'm not sure where to put the following parts
> >> Session sess = sessionFactory.openSession();
> >> ManagedSessionContext.bind(sess);
> >
> > This is done in some utility method when you retrieve the session for
> > the first time in the request.
> >
> > You should also check if the session is already bound by calling
> >
> > ManagedSessionContext.hasBind(SessionFactory factory)
> >
> > and binding it only once per request.
> >
> >
> >>
> >> unbindSessionFactory
> >
> > I have this in my custom implementation of
> > IRequestCycleListener.onEndRequest(RequestCycle cycle)
> >
> > that you add in Application.init() method
> >
> > getRequestCycleListeners().add(new DataRequestCycleListener());
> >
> > To be honest, I've until now stayed away from Spring as it still seems
> > to me as a too much of a black box that I didn't find a time to invest
> > in learning it, so I may not be the right person to give you advice,
> > because my solution may not be the best one either, although it seems
> > to be as javadoc of the ManagedSessionContext suggests. The solution I
> > now use took heavy inspiration in old old, now nonexistent, Databinder
> > that came around the time Wicket 1.2 or so and when I was tasked to
> > select new java framework after landing my first job and found Wicket.
> > Old times :D.
> >
> > Vit
> >
> >
> >>
> >>
> >> Thank you for the help so far both of you, I've probably made
> >> mistakes with implement parts
> >> of the previously outlined process.
> >> I've come from experimenting with javafx so wicket has been a radical
> >> change of direction for me
> >> so far. But since there is very little in the way of examples for
> >> database integration I'm struggling
> >> to get my head around how to implement it correctly, as well as
> >> knowing for sure whether I've
> >> done it correctly
> >>
> >> Best Regards
> >> James Pollard
> >> james.poll...@iinet.net.au
> >>
> >> On 23/12/22 10:16 am, Ernesto Reinaldo Barreiro wrote:
> >>> Hi James,
> >>>
> >>> On Thu, Dec 22, 2022 at 2:24 PM James 
> >>> wrote:
> >>>
>  Thanks for the guidance so far, that pointed me to find additional
>  resources on JPA
>  I believe I have this configured correctly, but I'm confused about how
>  to integrate JPA/Hibernate into a
>  pure wicket authenticated web application project since the
>  resource you
>  directed me to previously
>  seems to be more heavily on the spring side of things.
> 
> >>> This is true. I have used Hibernate/JPA without the SpringBoot
> >>> parts... But
> >>> those projects are private: some owned by me, others no.
> >>>
> >>>
>  Thank you for accommodating all my questions and misunderstandings so
>  far, I tend to use a reverse
>  engineer learning style so it's helped me immensely.
> 
>  Glad to be of some help. This is why this place is for.
> >>>
>  I've included screenshots of the project file list and the application
>  class in the hopes that it makes
> 
> >>> They didn't
> >>>
> >>>
>  understanding what I'm trying to convey easier
> 
>  Best Regards
>  James Pollard
>  james.poll...@iinet.net.au
> 
>  On 20/12/22 12:58 pm, Ernesto Reinaldo Barreiro wrote:
> 
> https://github.com/MarcGiffing/wicket-spring-boot/blob/master/wicket-spring-boot-starter-example/src/main/java/com/giffing/wicket/spring/boot/example/model/Customer.java

Re: FormComponent and FormComponentPanel ClassCast Issue

2023-01-23 Thread Martin Grigorov
Hi,

On Mon, Jan 23, 2023 at 5:09 PM Eric Hamel  wrote:

> Good morning,
>
> We are running into intermittent issues on our WebSphere 8.5 environment.
> The server keeps crashing and we see no cause in our logs. With that said,
> admins have seen the following error in our logs and I can’t make sense out
> of it.
>
> 07:48:51.632 ERROR [CVIENS | 10.79.49.41 | 5uRaDK6Hu4gj0ABIXyNTo76]
> o.a.wicket.DefaultExceptionMapper [DefaultExceptionMapper.java:170] -
> Unexpected error occurred
> java.lang.ClassCastException:
> gov.osc.ouf.web.components.document.search.DocumentSearchPanel$ClassificationsPanel$1
> incompatible with org.apache.wicket.markup.html.form.FormComponent
>at
> de.agilecoders.wicket.core.markup.html.bootstrap.form.FormGroup.findFormComponents(FormGroup.java:255)
> ~[wicket-bootstrap-core-0.9.22.jar:0.9.22]
>at
> de.agilecoders.wicket.core.markup.html.bootstrap.form.FormGroup.onInitialize(FormGroup.java:175)
> ~[wicket-bootstrap-core-0.9.22.jar:0.9.22]
>at
> org.apache.wicket.Component.fireInitialize(Component.java:877)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.MarkupContainer$3.component(MarkupContainer.java:967)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.MarkupContainer$3.component(MarkupContainer.java:963)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:144)
> ~[wicket-util-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162)
> ~[wicket-util-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162)
> ~[wicket-util-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:162)
> ~[wicket-util-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:123)
> ~[wicket-util-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.util.visit.Visits.visitChildren(Visits.java:192)
> ~[wicket-util-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:875)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.MarkupContainer.internalInitialize(MarkupContainer.java:962)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at org.apache.wicket.Page.isPageStateless(Page.java:463)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.getPageInfo(AbstractBookmarkableMapper.java:465)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapHandler(AbstractBookmarkableMapper.java:409)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.core.request.mapper.MountedMapper.mapHandler(MountedMapper.java:395)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:215)
> ~[wicket-request-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.cycle.RequestCycle.mapUrlFor(RequestCycle.java:429)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:281)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:175)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890)
> ~[wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
> ~[wicket-request-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
> [wicket-core-6.24.0.jar:6.24.0]
>at
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
> [com.ibm.ws.webcontainer.jar:na]
>at
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
> 

Re: does spring-boot migration require wicket-spring-boot

2023-01-20 Thread Martin Grigorov
On Fri, Jan 20, 2023 at 11:16 AM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Hi guys,
> We develop Wicket + Spring based web applications.
> Now we are working to migrate the Spring framework to Spring Boot. Does
> this require wicket-spring-boot migration?
> Is it mandatory to migrate Wicket framework to wicket-spring-boot?
>

No.
Wicket-Spring-Boot may help you to configure the Wicket settings via Spring
boot settings, but it is not mandatory at all.



>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>


Re: Wicket on low end hardware

2023-01-06 Thread Martin Grigorov
Please explain what you did exactly

On Fri, Jan 6, 2023 at 3:53 PM  wrote:

> Hi Martin,
>
> Sadly, that does not make any difference.
>
>
> Martin Grigorov schreef op 2023-01-06 13:19:
>
> > In the preloading code please try with:
> >
> > Application.get()
> > .getResourceSettings()
> > .getResourceStreamLocator()
> > .locate(clazz, path, style, variation, locale,  (String) null, false)
> >
> > where
> > clazz is AnyOfYourPagesAndMarkupContainersWithProperties.class
> > path is clazz.getName().replace('.', '/')
> > locale is NL
> > style is null
> > variation is null
> >
> > does it help ?
> >
> > On Fri, Jan 6, 2023 at 2:10 PM  wrote:
> >
> > Hi Martin,
> >
> > My system locale is nl.
> >
> > The application's default language is English. But all properties files
> > have '_nl' counterparts, so the application runs in Dutch as well as it
> > does in English. Most users use the Dutch locale.
> >
> > Every WebPage has an English (default) properties file, and a Dutch
> > one.
> > There also is a MyApplication.properties and a
> > MyApplication_nl.properties. I also add an extra resource bundle that I
> > use to rebrand the application for a subcontractor if that is
> > necessary.
> > That one is being added in the app.init() code using:
> >
> > getResourceSettings().getStringResourceLoaders().add(new
> > BundleStringResourceLoader("RebrandSubcontractorName"));
> >
> > A quick count tells me that my application has about 85 *.properties
> > files.
> >
> > Stan
> >
> > Martin Grigorov schreef op 2023-01-06 12:59:
> >
> > On Fri, Jan 6, 2023 at 11:44 AM  wrote:
> >
> > Hi all,
> >
> > As I was implementing markup caching by adding it directly to the
> > MarkupCache, I found my gains weren't as big as I had expected (I
> > guess
> > premature optimization really is the root of all evil...). My tests
> > using ComponentRenderer were much more promising.
> >
> > So I started to dig into this deeper and found that the first call to
> > Localizer->getString() on our hardware takes between 1500 and 2000ms.
> > I
> > then started to investigate if this can also be preloaded but I am
> > having a hard time coming up with something effective.
> >
> > Does anyone have experience with this?
> > What is the system locale ?
> > And what resource bunldes does your application use ? E.g.
> > MyApplication_nl.properties and MyApplication.properties
> >
> > Thanks.
> >
> > Stan
> >
> > Martin Grigorov schreef op 2023-01-06 09:52:
> >
> > Hi,
> >
> > Here is the minimum for preloading the markup of any MarkupContainer:
> >
> > MarkupFactory markupFactory =
> > Application.get().getMarkupSettings().getMarkupFactory();
> > markupFactory.getMarkup(new AnyMarkupContainer(), false);
> >
> > AnyMarkupContainer could be a Page, Panel, Border, ..., any
> > MarkupContainer
> > impl.
> > The Markup will be stored in the MarkupCache for the following needs.
> >
> > On Fri, Jan 6, 2023 at 5:56 AM Maxim Solodovnik 
> > wrote:
> >
> > You can render components, not just pages
> >
> > According to the list
> > You can create the list of all HTML files, find correspondent Java
> > files
> > and try to render them
> >
> > from mobile (sorry for typos ;)
> >
> > On Fri, Jan 6, 2023, 01:20 Chris Colman
> >  wrote:
> >
> > In my case I have lots of modal forms (using Wicketstuff ModalX) that
> > can be potentially opened by the user.
> >
> > Doing a 'pre-fetch' of each page won't 'pre-warm' the markup cache for
> > all of those modal forms as the page markup has no reference to the
> > modal form contents/markup as it is using ModalX's generic modal dialog
> > feature so there's no need to specify which form you wish to open in
> > the
> > markup of the page that will open it.
> >
> > I wonder if it would be possible to develop a 'parse all markup' that
> > would pick up the markup for these forms as well, not just for the
> > pages.
> >
> > On 5/01/2023 12:31 am, Martin Grigorov wrote: On Wed, Jan 4, 2023 at
> > 2:48 PM  wrote:
> >
> > Hi Anna,
> >
> > I attempted this, and ended up with a method like this:
> >
> > private void preloadPages(Collection > IRequestablePage>>
> >
> > pages) {
> > final Supplier oldSessionStoreProvider =
> > getSessionStoreProvider();

Re: Wicket on low end hardware

2023-01-06 Thread Martin Grigorov
In the preloading code please try with:

Application.get()
   .getResourceSettings()
   .getResourceStreamLocator()
   .locate(clazz, path, style, variation, locale,  (String) null, false)

where
clazz is AnyOfYourPagesAndMarkupContainersWithProperties.class
path is clazz.getName().replace('.', '/')
locale is NL
style is null
variation is null

does it help ?



On Fri, Jan 6, 2023 at 2:10 PM  wrote:

> Hi Martin,
>
> My system locale is nl.
>
> The application's default language is English. But all properties files
> have '_nl' counterparts, so the application runs in Dutch as well as it
> does in English. Most users use the Dutch locale.
>
> Every WebPage has an English (default) properties file, and a Dutch one.
> There also is a MyApplication.properties and a
> MyApplication_nl.properties. I also add an extra resource bundle that I
> use to rebrand the application for a subcontractor if that is necessary.
> That one is being added in the app.init() code using:
>
> getResourceSettings().getStringResourceLoaders().add(new
> BundleStringResourceLoader("RebrandSubcontractorName"));
>
> A quick count tells me that my application has about 85 *.properties
> files.
>
> Stan
>
>
> Martin Grigorov schreef op 2023-01-06 12:59:
>
> > On Fri, Jan 6, 2023 at 11:44 AM  wrote:
> >
> >> Hi all,
> >>
> >> As I was implementing markup caching by adding it directly to the
> >> MarkupCache, I found my gains weren't as big as I had expected (I
> >> guess
> >> premature optimization really is the root of all evil...). My tests
> >> using ComponentRenderer were much more promising.
> >>
> >> So I started to dig into this deeper and found that the first call to
> >> Localizer->getString() on our hardware takes between 1500 and 2000ms.
> >> I
> >> then started to investigate if this can also be preloaded but I am
> >> having a hard time coming up with something effective.
> >>
> >> Does anyone have experience with this?
> >
> > What is the system locale ?
> > And what resource bunldes does your application use ? E.g.
> > MyApplication_nl.properties and MyApplication.properties
> >
> > Thanks.
> >
> > Stan
> >
> > Martin Grigorov schreef op 2023-01-06 09:52:
> >
> > Hi,
> >
> > Here is the minimum for preloading the markup of any MarkupContainer:
> >
> > MarkupFactory markupFactory =
> > Application.get().getMarkupSettings().getMarkupFactory();
> > markupFactory.getMarkup(new AnyMarkupContainer(), false);
> >
> > AnyMarkupContainer could be a Page, Panel, Border, ..., any
> > MarkupContainer
> > impl.
> > The Markup will be stored in the MarkupCache for the following needs.
> >
> > On Fri, Jan 6, 2023 at 5:56 AM Maxim Solodovnik 
> > wrote:
> >
> > You can render components, not just pages
> >
> > According to the list
> > You can create the list of all HTML files, find correspondent Java
> > files
> > and try to render them
> >
> > from mobile (sorry for typos ;)
> >
> > On Fri, Jan 6, 2023, 01:20 Chris Colman
> >  wrote:
> >
> > In my case I have lots of modal forms (using Wicketstuff ModalX) that
> > can be potentially opened by the user.
> >
> > Doing a 'pre-fetch' of each page won't 'pre-warm' the markup cache for
> > all of those modal forms as the page markup has no reference to the
> > modal form contents/markup as it is using ModalX's generic modal dialog
> > feature so there's no need to specify which form you wish to open in
> > the
> > markup of the page that will open it.
> >
> > I wonder if it would be possible to develop a 'parse all markup' that
> > would pick up the markup for these forms as well, not just for the
> > pages.
> >
> > On 5/01/2023 12:31 am, Martin Grigorov wrote: On Wed, Jan 4, 2023 at
> > 2:48 PM  wrote:
> >
> > Hi Anna,
> >
> > I attempted this, and ended up with a method like this:
> >
> > private void preloadPages(Collection > IRequestablePage>>
> >
> > pages) {
> > final Supplier oldSessionStoreProvider =
> > getSessionStoreProvider();
> >
> > try {
> > setSessionStoreProvider(() -> new MockSessionStore());
> >
> > final RequestCycle rc = createRequestCycle(new   MockWebRequest(new
> >
> > Url()), new MockWebResponse());
> > ThreadContext.setRequestCycle(rc);
> >
> > for (Class p : pages)
> > ComponentRenderer.renderPage(new PageProvider(p));
> > }
> > finally {
> > setSessionStor

Re: Wicket on low end hardware

2023-01-06 Thread Martin Grigorov
On Fri, Jan 6, 2023 at 11:44 AM  wrote:

> Hi all,
>
> As I was implementing markup caching by adding it directly to the
> MarkupCache, I found my gains weren't as big as I had expected (I guess
> premature optimization really is the root of all evil...). My tests
> using ComponentRenderer were much more promising.
>
> So I started to dig into this deeper and found that the first call to
> Localizer->getString() on our hardware takes between 1500 and 2000ms. I
> then started to investigate if this can also be preloaded but I am
> having a hard time coming up with something effective.
>
> Does anyone have experience with this?
>

What is the system locale ?
And what resource bunldes does your application use ? E.g.
MyApplication_nl.properties and MyApplication.properties



>
> Thanks.
>
> Stan
>
>
> Martin Grigorov schreef op 2023-01-06 09:52:
>
> > Hi,
> >
> > Here is the minimum for preloading the markup of any MarkupContainer:
> >
> > MarkupFactory markupFactory =
> > Application.get().getMarkupSettings().getMarkupFactory();
> > markupFactory.getMarkup(new AnyMarkupContainer(), false);
> >
> > AnyMarkupContainer could be a Page, Panel, Border, ..., any
> > MarkupContainer
> > impl.
> > The Markup will be stored in the MarkupCache for the following needs.
> >
> > On Fri, Jan 6, 2023 at 5:56 AM Maxim Solodovnik 
> > wrote:
> >
> > You can render components, not just pages
> >
> > According to the list
> > You can create the list of all HTML files, find correspondent Java
> > files
> > and try to render them
> >
> > from mobile (sorry for typos ;)
> >
> > On Fri, Jan 6, 2023, 01:20 Chris Colman
> >  wrote:
> >
> > In my case I have lots of modal forms (using Wicketstuff ModalX) that
> > can be potentially opened by the user.
> >
> > Doing a 'pre-fetch' of each page won't 'pre-warm' the markup cache for
> > all of those modal forms as the page markup has no reference to the
> > modal form contents/markup as it is using ModalX's generic modal dialog
> > feature so there's no need to specify which form you wish to open in
> > the
> > markup of the page that will open it.
> >
> > I wonder if it would be possible to develop a 'parse all markup' that
> > would pick up the markup for these forms as well, not just for the
> > pages.
> >
> > On 5/01/2023 12:31 am, Martin Grigorov wrote: On Wed, Jan 4, 2023 at
> > 2:48 PM  wrote:
> >
> > Hi Anna,
> >
> > I attempted this, and ended up with a method like this:
> >
> > private void preloadPages(Collection   IRequestablePage>>
>
> > pages) {
> > final Supplier oldSessionStoreProvider =
> > getSessionStoreProvider();
> >
> > try {
> > setSessionStoreProvider(() -> new MockSessionStore());
> >
> > final RequestCycle rc = createRequestCycle(new
>   MockWebRequest(new
>
> > Url()), new MockWebResponse());
> > ThreadContext.setRequestCycle(rc);
> >
> > for (Class p : pages)
> > ComponentRenderer.renderPage(new PageProvider(p));
> > }
> > finally {
> > setSessionStoreProvider(oldSessionStoreProvider);
> > }
> > }
> >
> > Which I have not been able to test on more than one page yet, because
>   I
>
> > still need to implement something to render my other pages with an
> > AuthenticatedWebSession. My login page's first load time has been
> > reduced to about 10% of what it was though.
> >
> > I call that method from app.init().
> >
> > I have some doubts over Martin's claim that it is possible to do this
>   on
>
> > a different thread. As you may notice, I had to change the
> > SessionStoreProvider to make this work. If I am correct that means
>   that
>
> > as long as this method runs, all sessions will be handled by the
> > MockSessionStore.
> >
> > Stan
> >
> > Anna Eileen Eileen schreef op 2023-01-04 01:22:
> >
> > Dear Martin
> >
> > I don't know how to do "pre-touch", do you have any example?
> >
> > From: Martin Terra
> > Date: Tuesday, January 3, 2023 at 11:37 PM
> > To:s...@stantastic.nl  
> > Cc:users@wicket.apache.org  
> > Subject: Re: Wicket on low end hardware
> > Just a note, you don't need to make the startup "pre-touching"
>   process
>
> > a
> > blocking one so that if a user were to interact with the app, they
> > could do
> > so while startup pretouch is doing its thing.
> >
> > And you could profile whether you want to do th

Re: Wicket on low end hardware

2023-01-06 Thread Martin Grigorov
Hi,

Here is the minimum for preloading the markup of any MarkupContainer:

MarkupFactory markupFactory =
Application.get().getMarkupSettings().getMarkupFactory();
markupFactory.getMarkup(new AnyMarkupContainer(), false);

AnyMarkupContainer could be a Page, Panel, Border, ..., any MarkupContainer
impl.
The Markup will be stored in the MarkupCache for the following needs.

On Fri, Jan 6, 2023 at 5:56 AM Maxim Solodovnik 
wrote:

> You can render components, not just pages
>
> According to the list
> You can create the list of all HTML files, find correspondent Java files
> and try to render them
>
> from mobile (sorry for typos ;)
>
>
> On Fri, Jan 6, 2023, 01:20 Chris Colman
>  wrote:
>
> > In my case I have lots of modal forms (using Wicketstuff ModalX) that
> > can be potentially opened by the user.
> >
> > Doing a 'pre-fetch' of each page won't 'pre-warm' the markup cache for
> > all of those modal forms as the page markup has no reference to the
> > modal form contents/markup as it is using ModalX's generic modal dialog
> > feature so there's no need to specify which form you wish to open in the
> > markup of the page that will open it.
> >
> > I wonder if it would be possible to develop a 'parse all markup' that
> > would pick up the markup for these forms as well, not just for the pages.
> >
> > On 5/01/2023 12:31 am, Martin Grigorov wrote:
> > > On Wed, Jan 4, 2023 at 2:48 PM  wrote:
> > >
> > >> Hi Anna,
> > >>
> > >> I attempted this, and ended up with a method like this:
> > >>
> > >> private void preloadPages(Collection IRequestablePage>>
> > >> pages) {
> > >> final Supplier oldSessionStoreProvider =
> > >> getSessionStoreProvider();
> > >>
> > >> try {
> > >>   setSessionStoreProvider(() -> new MockSessionStore());
> > >>
> > >>   final RequestCycle rc = createRequestCycle(new
> MockWebRequest(new
> > >> Url()), new MockWebResponse());
> > >>   ThreadContext.setRequestCycle(rc);
> > >>
> > >>   for (Class p : pages)
> > >> ComponentRenderer.renderPage(new PageProvider(p));
> > >>   }
> > >> finally {
> > >>   setSessionStoreProvider(oldSessionStoreProvider);
> > >> }
> > >> }
> > >>
> > >> Which I have not been able to test on more than one page yet, because
> I
> > >> still need to implement something to render my other pages with an
> > >> AuthenticatedWebSession. My login page's first load time has been
> > >> reduced to about 10% of what it was though.
> > >>
> > >> I call that method from app.init().
> > >>
> > >> I have some doubts over Martin's claim that it is possible to do this
> on
> > >> a different thread. As you may notice, I had to change the
> > >> SessionStoreProvider to make this work. If I am correct that means
> that
> > >> as long as this method runs, all sessions will be handled by the
> > >> MockSessionStore.
> > >>
> > >> Stan
> > >>
> > >>
> > >>
> > >>
> > >> Anna Eileen Eileen schreef op 2023-01-04 01:22:
> > >>
> > >>> Dear Martin
> > >>>
> > >>> I don't know how to do "pre-touch", do you have any example?
> > >>>
> > >>> From: Martin Terra
> > >>> Date: Tuesday, January 3, 2023 at 11:37 PM
> > >>> To:s...@stantastic.nl  
> > >>> Cc:users@wicket.apache.org  
> > >>> Subject: Re: Wicket on low end hardware
> > >>> Just a note, you don't need to make the startup "pre-touching"
> process
> > >>> a
> > >>> blocking one so that if a user were to interact with the app, they
> > >>> could do
> > >>> so while startup pretouch is doing its thing.
> > >>>
> > >>> And you could profile whether you want to do the pre-touch in single
> > >>> thread
> > >>> or multi-thraded.
> > >>>
> > >>> **
> > >>> Martin
> > >>>
> > >>> ti 3. tammik. 2023 klo 16.58s...@stantastic.nl  kirjoitti:
> > >>>
> > >>> Thanks everyone. I did not expect the amount of feedback that I got.
> It
> > >>> is much appreciated.
> > >>>
> > >>> I s

Re: Wicket on low end hardware

2023-01-04 Thread Martin Grigorov
On Wed, Jan 4, 2023 at 2:48 PM  wrote:

> Hi Anna,
>
> I attempted this, and ended up with a method like this:
>
> private void preloadPages(Collection>
> pages) {
>final Supplier oldSessionStoreProvider =
> getSessionStoreProvider();
>
>try {
>  setSessionStoreProvider(() -> new MockSessionStore());
>
>  final RequestCycle rc = createRequestCycle(new MockWebRequest(new
> Url()), new MockWebResponse());
>  ThreadContext.setRequestCycle(rc);
>
>  for (Class p : pages)
>ComponentRenderer.renderPage(new PageProvider(p));
>  }
>finally {
>  setSessionStoreProvider(oldSessionStoreProvider);
>}
> }
>
> Which I have not been able to test on more than one page yet, because I
> still need to implement something to render my other pages with an
> AuthenticatedWebSession. My login page's first load time has been
> reduced to about 10% of what it was though.
>
> I call that method from app.init().
>
> I have some doubts over Martin's claim that it is possible to do this on
> a different thread. As you may notice, I had to change the
> SessionStoreProvider to make this work. If I am correct that means that
> as long as this method runs, all sessions will be handled by the
> MockSessionStore.
>
> Stan
>
>
>
>
> Anna Eileen Eileen schreef op 2023-01-04 01:22:
>
> > Dear Martin
> >
> > I don't know how to do "pre-touch", do you have any example?
> >
> > From: Martin Terra 
> > Date: Tuesday, January 3, 2023 at 11:37 PM
> > To: s...@stantastic.nl 
> > Cc: users@wicket.apache.org 
> > Subject: Re: Wicket on low end hardware
> > Just a note, you don't need to make the startup "pre-touching" process
> > a
> > blocking one so that if a user were to interact with the app, they
> > could do
> > so while startup pretouch is doing its thing.
> >
> > And you could profile whether you want to do the pre-touch in single
> > thread
> > or multi-thraded.
> >
> > **
> > Martin
> >
> > ti 3. tammik. 2023 klo 16.58 s...@stantastic.nl kirjoitti:
> >
> > Thanks everyone. I did not expect the amount of feedback that I got. It
> > is much appreciated.
> >
> > I spent most of my day profiling with VisualVM and it strengthened by
> > beliefs that my problems do not appear to be related to anything but
> > Wicket combined with our dated hardware. Please do not consider this a
> > criticism. I understand that not a lot of people run servlet containers
> > on this kind of hardware nowadays.
> >
> > My database queries all run quickly and my domain classes are hardly
> > even touched when the system starts. Our rather simple login page -
> > which is stateless and does not query the database when the form is
> > empty - takes 5-15 seconds to load on the first try. Subsequent
> > requests
> > take about 40-120ms (browser caching disabled). Once logged in, the
> > other pages do not take as long, but they do feel sluggish until they
> > have been requested once.
> >
> > I tried to only load the quickstart example as Martijn suggested. It
> > starts more quickly than our own application but all things considered,
> > its performance did not impress me and that application really is super
> > simple. The first page load of the quickstart took about 2 seconds,
> > after that it normalized to about 30ms per request.
> >
> > When all pages have been loaded once, things are absolutely fine. So I
> > am considering Martin's approach of preloading components. That still
> > leaves me with the considerable startup time but we will learn to live
> > with that. Or we might switch from Tomcat to Jetty eventually.
>

You may want to check the implementation of Wicket Native WebSocket module
[1]
WebSocket messages come in a TCP connection, i.e. there is no HTTP
session/request/response.
Because of that Wicket Native WebSocket stores the app name, session id,
page id / resource name at the handshake time and later fetches /
re-creates those to process any websocket message.

I agree that the setup is not something simple. Loading a page may depend
on external resources (like a user in your case, or an open DB connection,
...).
Maybe you can simplify the preloading to just populate the Markup cache
instead of fully render all pages.
IMO this deserves to be added to Wicket APIs as a helper or something!
1.
https://github.com/apache/wicket/blob/master/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/AbstractWebSocketProcessor.java#L234



> >
> > If anyone thinks I might be leaving some stuff on the table, I would be
> > open to hire someone to do some consulting work on this. Please get in
> > touch with me if you are interested.
> >
> > Cheers.
> >
> > Stan
> >
> > Martin Terra schreef op 2023-01-02 04:29:
> >
> > Anything in wicket can be preloaded,  but as premature optimization is
> > evil, you should profile your application.
> >
> > If you do not have debug access to a real/simulated environment then
> > the
> > least you can do is make your own thread logger to 

Re: Wicket on low end hardware

2023-01-03 Thread Martin Grigorov
On Tue, Jan 3, 2023 at 4:58 PM  wrote:

> Thanks everyone. I did not expect the amount of feedback that I got. It
> is much appreciated.
>
> I spent most of my day profiling with VisualVM and it strengthened by
> beliefs that my problems do not appear to be related to anything but
> Wicket combined with our dated hardware. Please do not consider this a
> criticism. I understand that not a lot of people run servlet containers
> on this kind of hardware nowadays.
>

No criticism taken! The rest of your message does not show any evidence it
is actually a problem in Wicket!
I'd expect to see a call trace with the time of each method call that shows
where the most of the time is spent.
At the moment we have a guess that it is the markup loading, but we have no
idea whether it is the parsing (i.e. Wicket) or the file system read (i.e.
Java std APIs/slow disks), or something else.


>
> My database queries all run quickly and my domain classes are hardly
> even touched when the system starts. Our rather simple login page -
> which is stateless and does not query the database when the form is
> empty - takes 5-15 seconds to load on the first try. Subsequent requests
> take about 40-120ms (browser caching disabled). Once logged in, the
> other pages do not take as long, but they do feel sluggish until they
> have been requested once.
>
> I tried to only load the quickstart example as Martijn suggested. It
> starts more quickly than our own application but all things considered,
> its performance did not impress me and that application really is super
> simple. The first page load of the quickstart took about 2 seconds,
> after that it normalized to about 30ms per request.
>
> When all pages have been loaded once, things are absolutely fine. So I
> am considering Martin's approach of preloading components. That still
> leaves me with the considerable startup time but we will learn to live
> with that. Or we might switch from Tomcat to Jetty eventually.
>
> If anyone thinks I might be leaving some stuff on the table, I would be
> open to hire someone to do some consulting work on this. Please get in
> touch with me if you are interested.
>
> Cheers.
>
> Stan
>
>
> Martin Terra schreef op 2023-01-02 04:29:
>
> > Anything in wicket can be preloaded,  but as premature optimization is
> > evil, you should profile your application.
> >
> > If you do not have debug access to a real/simulated environment then
> > the
> > least you can do is make your own thread logger to log what the threads
> > are
> > doing.
> >
> > **
> > Martin
> >
> > ma 2. tammik. 2023 klo 3.19 Anna Eileen (shengchehs...@gmail.com)
> > kirjoitti:
> >
> >> Hello
> >>
> >> Would you please describe your web application components? Database ?
> >> What services ran on the device?
> >>
> >> From: s...@stantastic.nl 
> >> Date: Monday, January 2, 2023 at 5:23 AM
> >> To: users@wicket.apache.org 
> >> Subject: Wicket on low end hardware
> >>
> >> Hi,
> >>
> >> My use case for Wicket is a quite unconventional one. I use it as the
> >> framework for the web interface of an appliance that runs on low end
> >> hardware. The appliance doesn't have gigabytes of memory to waste or
> >> tens of CPU cores. It's more like Celeron powered hardware with maybe
> >> one or two gigabytes of RAM.
> >>
> >> I general this all works and customers are happy once the device is
> >> running. But I find that deployment is quite slow, and so are the
> >> first
> >> couple of page loads of the day. Just to be clear: I cannot really
> >> claim
> >> that my performance problems are all Wicket related. They may be, but
> >> they probably also are down to other underlying issues. A badly
> >> optimized database, or a badly configured servlet container come to
> >> mind...
> >>
> >> However, I was wondering if anyone has experience in using Wicket on
> >> low
> >> end hardware. I would be very interested in how to optimize for this.
> >>
> >> Thanks,
> >>
> >> Stan
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket on low end hardware

2023-01-03 Thread Martin Grigorov
On Tue, Jan 3, 2023 at 10:12 AM Chris Colman
 wrote:

> We have lots of markup files (>1000) and have customized the markup and
> component resolution to support a kind of "markup driven" layout
> capability.
>
> There are times when the system will appear to hang but it's just that a
> form that has not been loaded since the last restart of the app is first
> loaded - it can take a good 10 seconds to show the form - but it always
> eventually shows so never actually "hung". When the form is opened again
> it opens instantly.
>
> It's not an ideal experience for end users.
>
> How many markup files does your app have?
>
> I often thought that it might be nice if there was a way to "pre-warm"
> the markup cache with every possible markup file during app start up so
> that no end user experiences this delay. If such a 'pre-warm' was
> available we would probably turn this on in production but not in dev.
>

I see no problem using ComponentRenderer to do this at App#init() time or
asynchronously if you want the app to be marked as "ready" by the servlet
container earlier.


>
> Regards,
> Chris
>
> On 2/01/2023 8:23 am, s...@stantastic.nl wrote:
> >
> >
> > Hi,
> >
> > My use case for Wicket is a quite unconventional one. I use it as the
> > framework for the web interface of an appliance that runs on low end
> > hardware. The appliance doesn't have gigabytes of memory to waste or
> > tens of CPU cores. It's more like Celeron powered hardware with maybe
> > one or two gigabytes of RAM.
> >
> > I general this all works and customers are happy once the device is
> > running. But I find that deployment is quite slow, and so are the
> > first couple of page loads of the day. Just to be clear: I cannot
> > really claim that my performance problems are all Wicket related. They
> > may be, but they probably also are down to other underlying issues. A
> > badly optimized database, or a badly configured servlet container come
> > to mind...
> >
> > However, I was wondering if anyone has experience in using Wicket on
> > low end hardware. I would be very interested in how to optimize for this.
> >
> > Thanks,
> >
> > Stan
> --
> Regards,
>
> Chris Colman
> *Feezily*,
> A product of /Step Ahead/ *Software* Pty Ltd
> Web: feezily.com.au  Em: chr...@stepahead.com.au
> Ph: 02 9656 1278


Re: wicket-bean-validation 10.0.0-M1-SNAPSHOT not available?

2023-01-03 Thread Martin Grigorov
https://repository.apache.org/service/local/repo_groups/snapshots-group/content/org/apache/wicket/wicket-devutils/10.0.0-M1-SNAPSHOT/wicket-devutils-10.0.0-M1-20221118.110647-169.pom
https://repository.apache.org/service/local/repo_groups/snapshots-group/content/org/apache/wicket/wicket-bean-validation/10.0.0-M1-SNAPSHOT/wicket-bean-validation-10.0.0-M1-20221118.110647-167.pom

Both seem to be there.


On Tue, Jan 3, 2023 at 9:35 AM Francesco Chicchiriccò 
wrote:

> Forgot to add that the same happens with wicket-devutils.
>
> Regards.
>
> On 2023/01/03 07:33:36 Francesco Chicchiriccò wrote:
> > Hi there,
> > I am working to upgrade our Wicket apps to Spring Boot 3 and found that
> 10.0.0-M1-SNAPSHOT plays nicely with it.
> >
> > It seems however, that
> >
> > org.apache.wicket:wicket-bean-validation:10.0.0-M1-SNAPSHOT
> >
> > is not available from
> >
> > https://repository.apache.org/
> >
> > while the module seems to be regularly present in the source tree at
> >
> > https://github.com/apache/wicket/tree/master/wicket-bean-validation
> >
> > Maybe something bad with CI deployment?
> >
> > Regards.
> >
> > --
> > Francesco Chicchiriccò
> >
> > Tirasa - Open Source Excellence
> > http://www.tirasa.net/
> >
> > Member at The Apache Software Foundation
> > Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> > http://home.apache.org/~ilgrosso/
> >
> >
> > -
> > 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 MVVM

2022-11-17 Thread Martin Grigorov
Hi,

I am not sure how much helpful my answer is to you but
https://isis.apache.org/ does something similar.
Isis defines a model based on your naked objects.
And then different viewers visualize the objectis/collections. Apache
Wicket is one of the available viewers. REST is another. AFAIK there is no
POI viewer but there is a plugin for the Wicket viewer that adds "export to
Excel" button next to the tables.

On Thu, Nov 17, 2022 at 11:48 AM Martin Terra <
martin.te...@koodaripalvelut.com> wrote:

> Hi!
>
> Is there a library/example/experience for doing MVVM with wicket (or
> something close enough to serve as a useful reference)?
>
> A practical goal would be to decouple the Wicket stack from other layers
> and automate gui code generation based on predefined patterns & layout
> design (benefits would be stabilty, testability, predictability, standard
> practices, maintainability, upgradeability, code generation/ai code
> copilot, etc.).
>
> Preferably it would work even so far that we could plug/attach either
> jakarta poi or wicket to the same model and get as output (for example)
> either a html table or excel sheet.
>
> How it works is, basically you would have a wicket plugin that
> "interprets/implements" the model. Alternatively you could have a jakarta
> poi plugin as well.
>
> You could also have a mix of the two, for example: an instruction in the
> model for an action (link, button, etc. rendered by the wicket plugin) has
> an "embedded instruction" to further render an excel sheet via (a different
> plugin) jakarta poi as a result of the wicket action (so that when the user
> clicks the link, the user can download the sheet generated by the model via
> a wicket download stream associated with the defined link/action).
>
>
> **
> Martin
>


Re: Host Header Injection Solution

2022-11-08 Thread Martin Grigorov
Hi Jonathan,

On Tue, Nov 8, 2022 at 4:39 AM Jonathan P. Babie 
wrote:

> Hello,
>
> Our Wicket web application went through an app scan.  We understand most
> problems that came back from the report and have solutions, but one that's
> troubling us is:
>
>
> I've omitted our URLs, but essentially it seems they were able to
> manipulate the hostname to a different url.
>
> Unfortunately we weren't given much context aside from this report.
>
> We assume that there are three avenues for us to resolve this:
>
>1. Wicket configuration
>2. Server configuration
>3. Non-issue (if this problem is addressed with the framework itself
>and we don't need to worry about it)
>
> We did come across this filter that might be a solution:
>
> getRequestCycleListeners().add(new
> CsrfPreventionRequestCycleListener().addAcceptedOrigin("[domain]"));
>
> Would adding this to our application resolve the above problem?
>

Yes!
This should be the solution!



>
> If there's any information you could provide as to how we can address it,
> we would greatly appreciate it.
>
> Thank you,
>
> Jonathan Babie
>
> Java Applications Developer
>
> Work: (838) 910-4274
>
> Personal: (518) 331-8758
> Notice: This communication, including any attachments, is intended solely
> for the use of the individual or entity to which it is addressed. This
> communication may contain information that is protected from disclosure
> under State and/or Federal law. Please notify the sender immediately if you
> have received this communication in error and delete this email from your
> system. If you are not the intended recipient, you are requested not to
> disclose, copy, distribute or take any action in reliance on the contents
> of this information.
>


Re: Ajax - component not rendered.

2022-11-08 Thread Martin Grigorov
Hi,

Please try to reproduce the problem in a mini application and share it with
us!

On Tue, Nov 8, 2022 at 9:41 AM Laurent Duparchy  wrote:

> Hi,
>
> I got rid of this javascript error, that was due to incorrect design, I
> think.
>
> devicesGroup is a CheckGroup
>
> devicesGroup = new CheckGroup("devicesGroup", new ArrayList()) {
> @Override
> public boolean isVisible() {
> super.isVisible();
>.
> };
> };
>
>
>
> but it contained also what seems to be a useless CheckGroupSelector.
>
> // devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));
>
>
> So, the javascript error is gone but the Ajax rendering is still flawed.
>
> When I add both feedbackpanel and devicesGroup, nothing is rendered the
> Ajax response is as follow
>
>
>
> id5 being the feedbackpanel (which is empty in the response)
> id7 being the devicesGroup which still contains the deleted line.
>
> All in all, this response does not take into account the added component
> for repainting. I added them to the Ajax "target" but perhaps I need to add
> them to a "parent" ?
>
> I recall that if I add only the feedbackpanel for Ajax rendering, it is
> well painted.
>
> generated markup :
>
>id="header">WakeOnLan Utility  Utility to 
> start / wake up a computer   href="./?6-2.-signOut">Sign Out id="feedbackContainer">
> action="./?6-2.-wakeUpForm"> class="hidden-fields">
> 
>   
>
>
>
>
>
>
>
>
>
>
>
>
> *Laurent Duparchy ESRF - The European Synchrotron MIS Unit 04 76 88 22 56*
> Martin Grigorov wrote on 07/11/2022 20:57:
>
> Hi Laurent,
>
> The problem is the JavaScript error: Uncaught TypeError: b is null.
>
> It seems there is some bug in
> "Wicket.CheckboxSelector.updateSelectorState(c,e)},initializeSelector:function(c,d){var
> b=document.getElementById(c); ..."
>
> Due to this JS error Wicket cannot replace neither the feedback panel nor
> any other component.
>
> You should focus on debugging the JavaScript. If you don't know how to do
> it then please create a quickstart app that reproduces the problem and
> share it with us.
>
>
> On Mon, Nov 7, 2022 at 6:37 PM Laurent Duparchy  
>  wrote:
>
>
> If I add the entire page (which is defeating the entire "Ajax" idea I
> think.), it works. The new list is painted
>  > target.get().add(getPage());
>
> If I add only the feedback panel, it is is painted.
>  > target.get().add(feedbackPanel);
>
> If I add both, the feedbackpanel is not painted... Go figure.
>
> I probably don't understand what a "target" is and I'm giving up that.
> Sorry for being an annoyance.
>
>
> *Laurent Duparchy
> ESRF - The European Synchrotron
> MIS Unit
> 04 76 88 22 56*
> Laurent Duparchy wrote on 03/11/2022 10:11:
>
> Yes I corrected that HTML too. (which was auto-corrected by browsers I
>
> think, at least by Firefox).
>
> I looked for errors in Firefox debugger.  The console reports a warning
>
> then an error in a generated js :
>
> Warning :
>
> jQuery.Deferred exception: b is null updateSelectorState@
>
> https://xx/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:392
> attachUpdateHandlers@https://xx.esrf.fr/misapps/wakeOnLan/wicket/resource/org.apache.wicket.markup.html.form.AbstractCheckSelector/CheckSelector-ver-1CE61F040D59ED57EADC3FBB51E1E02C.js:1:598
>
> Error :
>
>
> Uncaught TypeError: b is null
>
>  in
>
>
>
> (function(a){if(typeof(Wicket.CheckboxSelector)==="object"){return}Wicket.CheckboxSelector={updateAllCheckboxes:function(f,e){var
> d=e();for(var b=0;b c=d[b];if(c.checked!==f){c.click()}}},updateSelectorState:function(e,g){var
> f=g(),c=f.length>0;for(var
> d=0;d b=document.getElementById(e);b.checked=c},attachUpdateHandlers:function(c,e){var
> d=e(),f=function(){Wicket.CheckboxSelector.updateSelectorState(c,e)};for(var
> b=0;b b=document.getElementById(c);Wicket.Event.add(b,"click",function(){Wicket.CheckboxSelector.updateAllCheckboxes(b.checked,d)})},findCheckboxesFunction:function(c,b){return
> function(){var d=[];var
> g=document.getElementById(c).getElementsByTagName("input");for(var
> e=0;e
> d}},getC

Re: Ajax - component not rendered.

2022-11-07 Thread Martin Grigorov
gt;>>>>
> >>>>> When I add only the *feedbackpanel*, it is correctly added and
> painted with the correct feedback message
> >>>>> When I add *devicesGroup*, nothing is repainted, including the
> *feedbackpanel*.
> >>>>>
> >>>>> I tried to add only the *userDevicesListView *for repaint, but there
> is an error saying that it's not possible to add a repeater and to add its
> parent... which is devicesGroup.
> >>>>>
> >>>>> There's probably a flaw in the devicesGroup design. Basically it
> contains a list of items w/ two possible ajax action : "check" and "delete".
> >>>>>
> >>>>> "Check" will only gives a result in the feedback panel and is
> working fine.
> >>>>> "Delete" will, you guessed, delete the item and repaint the list.
> The item is truly deleted, in the database and /userDevices /list is
> reloaded.
> >>>>>
> >>>>>
> >>>>> it is designed as follow (worked fined w/ Wicket 1.4)
> >>>>> /
> >>>>> private class UserDevicesLoadableDetachableModel extends
> LoadableDetachableModel {
> >>>>>
> >>>>> private List userDevices ;
> >>>>> ...
> >>>>> }
> >>>>>
> >>>>> private class UserDevicesListView extends ListView {
> >>>>>
> >>>>> public UserDevicesListView(String id,
> UserDevicesLoadableDetachableModel imodel) {
> >>>>> super(id, imodel);
> >>>>> }
> >>>>> ...
> >>>>> }
> >>>>> /
> >>>>>
> >>>>> /userDevicesListView = new
> UserDevicesListView("userDevicesListView",
> userDevicesLoadableDetachableModel);//
> >>>>> /
> >>>>> /devicesGroup = new CheckGroup("devicesGroup", new
> ArrayList<>()){//
> >>>>> //public boolean isVisible() {...}//
> >>>>> //} /
> >>>>> /devicesGroup.setOutputMarkupId(true);//
> >>>>> //devicesGroup.setOutputMarkupPlaceholderTag(true);//
> >>>>> //devicesGroup.setRenderBodyOnly(false);//
> >>>>> //devicesGroup.add(new CheckGroupSelector("devicesGroupSelector"));//
> >>>>> //devicesGroup.add(userDevicesListView);//
> >>>>> //
> >>>>>
> >>>>> //
> >>>>> /
> >>>>> *Laurent Duparchy
> >>>>> ESRF - The European Synchrotron
> >>>>> MIS Unit
> >>>>> 04 76 88 22 56*
> >>>>> Ernesto Reinaldo Barreiro wrote on 29/10/2022 04:06:
> >>>>>> Hi,
> >>>>>>
> >>>>>> is devicesGroup initially visible? if not you need to
> >>>>>> setOutputMarkupplaceHolder(true) in it. Because otherwise wicket
> will not
> >>>>>> output anything for it and AJAX replacement will fail at client
> side.
> >>>>>>
> >>>>>> On Fri, Oct 28, 2022 at 4:27 PM Martin Grigorov<
> mgrigo...@apache.org>
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi Laurent,
> >>>>>>>
> >>>>>>> Few questions:
> >>>>>>> 1) is the Ajax call actually executed ?
> >>>>>>> Set a breakpoint inside #onClick() and see whether it breaks
> >>>>>>> 2) Is there any error (Java or JavaScript) ?
> >>>>>>> Check both the server logs and the browser console
> >>>>>>>
> >>>>>>>
> >>>>>>> On Fri, Oct 28, 2022 at 10:45 AM Laurent Duparchy >
> >>>>>>> wrote:
> >>>>>>>
> >>>>>>>> Hi,
> >>>>>>>>
> >>>>>>>> Sorry for the basic question If this is the wrong place to
> ask,
> >>>>>>> please
> >>>>>>>> tell me.
> >>>>>>>> If there is a relevant documentation to read, tell me as well.
> >>>>>>>>
> >>>>>>>> I'm upgrading a very old & small app from Wicket 1.4 to Wicket 9.
> >>>>>>>>
> >>>>>>>> Following an Ajax call, one component is not refreshed as it was
> before.
> >>>>>>>>
> >>>>>>>> This is the "userDevicesListView" which is inside the
> "devicesGroup"
> >>>>>>>> component. See below.
> >>>>>>>>
> >>>>>>>>> 
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>
> >>>>>>>>>  
> >>>>>>>>>  
> >>>>>>>>>  
> >>>>>>>>>  
> >>>>>>>>>  
> >>>>>>>>>  
> >>>>>>>>>   
> >>>>>>>>> ...
> >>>>>>>>>  
> >>>>>>>> Upon the Ajax call the userDevicesListView is changed and
> devicesGroup is
> >>>>>>>> added to the target and should be rendered / repainted but it is
> not.
> >>>>>>>>
> >>>>>>>>> public void onClick(Optional target) {
> >>>>>>>>>  Device deviceToRemove = (Device) getModelObject();
> >>>>>>>>>  try {
> >>>>>>>>>  removeDevice(deviceToRemove, user);
> >>>>>>>>>  info(deviceToRemove.getHostName() + " " +
> >>>>>>>> getString("device.removed"));
> >>>>>>>>>  } catch (Exception e) {
> >>>>>>>>>
> >>>>>>>>>  LOG.error("error while deleting" +
> >>>>>>>> deviceToRemove.getHostName(), e);
> >>>>>>>>>  error(e);
> >>>>>>>>>
> >>>>>>>>>  }
> >>>>>>>>>
> >>>>>>>>>  target.get().add(devicesGroup);
> >>>>>>>>>  target.get().add(feedbackPanel);
> >>>>>>>>>  }
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>
> -
> >>>>>>>> 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: Ajax - component not rendered.

2022-10-28 Thread Martin Grigorov
Hi Laurent,

Few questions:
1) is the Ajax call actually executed ?
Set a breakpoint inside #onClick() and see whether it breaks
2) Is there any error (Java or JavaScript) ?
Check both the server logs and the browser console


On Fri, Oct 28, 2022 at 10:45 AM Laurent Duparchy  wrote:

> Hi,
>
> Sorry for the basic question If this is the wrong place to ask, please
> tell me.
> If there is a relevant documentation to read, tell me as well.
>
> I'm upgrading a very old & small app from Wicket 1.4 to Wicket 9.
>
> Following an Ajax call, one component is not refreshed as it was before.
>
> This is the "userDevicesListView" which is inside the "devicesGroup"
> component. See below.
>
> > 
> >   
> >   
> >
> >   
> > 
> > 
> > 
> > 
> > 
> > 
> >  
> > ...
> > 
>
> Upon the Ajax call the userDevicesListView is changed and devicesGroup is
> added to the target and should be rendered / repainted but it is not.
>
> > public void onClick(Optional target) {
> > Device deviceToRemove = (Device) getModelObject();
> > try {
> > removeDevice(deviceToRemove, user);
> > info(deviceToRemove.getHostName() + " " +
> getString("device.removed"));
> > } catch (Exception e) {
> >
> > LOG.error("error while deleting" +
> deviceToRemove.getHostName(), e);
> > error(e);
> >
> > }
> >
> > target.get().add(devicesGroup);
> > target.get().add(feedbackPanel);
> > }
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Spring Boot 3, Wicket 10, Roadmap?

2022-10-20 Thread Martin Grigorov
Hi,

On Wed, Oct 19, 2022 at 11:53 PM Greb Lindqvist 
wrote:

> Hello,
>
> My organization has several internal apps running with Spring Boot 2.7 and
> Wicket 9. We are planning ahead for updating to Spring Boot 3. My
> understanding is that we'll need to wait for Wicket 10.
>

I haven't tried it but I guess you could use javax-to-jakarta migrator like
https://github.com/apache/tomcat-jakartaee-migration with Wicket 9.x


>
> Is there a Wicket Roadmap page? Any guesses for when Wicket 10 milestone
> releases might start appearing?
>

We track the changes in Wicket 10.x at
https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+10.0.
The major theme is javax->jakarta and Java 11 -> 17.
The only stopper I am aware of is Apache Commons FileUpload - we need a
stable release of 2.x (https://issues.apache.org/jira/browse/FILEUPLOAD-309
).
Once this issue is resolved we could release a milestone/RC version easily.

Martin



>
> Thank you
>


Re: Catch start and finish of upload process on MultiFileUploadField

2022-10-18 Thread Martin Grigorov
On Tue, Oct 18, 2022 at 1:19 PM Sandor Feher  wrote:

> Okay, the process is  clear now. Thank you.
> The question is which method should I override to inject my code and
> show my panel when indicator shows up.
>

1. Override updateAjaxAttributes() -
https://github.com/apache/wicket/blob/3a29e91665a66dc0dadadcd1edd1abcb124d40b8/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/form/AjaxButton.java#L170
2. Add an IAjaxCallListener to the attributes -
https://github.com/apache/wicket/blob/3a29e91665a66dc0dadadcd1edd1abcb124d40b8/wicket-core/src/main/java/org/apache/wicket/ajax/attributes/AjaxRequestAttributes.java#L258
3. Add JS logic to be called onBeforeSend() callback to show your panel



>
>
>
> 2022.10.18. 10:08 keltezéssel, Martin Grigorov írta:
> > On Tue, Oct 18, 2022 at 10:50 AM Sandor Feher 
> wrote:
> >
> >> Hi,
> >>
> >> On Mon, Oct 17, 2022 at 1:23 PM Sandor Feher 
> wrote:
> >>
> >>>> Now I use IndicatingAjaxButton for that but catching it within
> onSubmit
> >>>> is late.
> >>>>
> >>> What do you mean with "is late" ?
> >> As I realized when the first line of onSubmit function is executed the
> >> file(s)  already get
> >> uploaded.
> >>
> >>> When exactly do you need the notifications ?
> >> When uploading process is started.
> >>
> > IndicatingAjaxButton starts showing the indicator before the form
> > submittion (i.e. when the process starts), then the files are uploaded,
> and
> > then when all the data is sent to the server the Form#onSubmit or onError
> > is called, and finally when the Ajax response is returned
> > IndicatingAjaxButton hides the indicator
> >
> >
> >
> >>
> >> --
> >> Üdvözlettel/Kind Regards, Fehér Sándor
> >>
> >>
> >> ...Fehér Sándor...---Sandor Feher
> >>fejlesztési vezetõ   --- development manager
> >>Blue System Kft. ---  Blue System Ltd.
> >>
> >>
> ..
> >> http://www.bluesystem.hu  :http://www.adatmegorzo.hu  :
> >> http://www.bluehosting.hu
> >>
> >>
> ..
> >>
> >> Kérem gondoljon a környezetre mielõtt kinyomtatná ezt az e-mailt vagy
> >> bármely csatolmányát.
> >> Please consider the environment before printing this e-mail and any
> >> associated attachments.
> >>
>
> --
> Üdvözlettel/Kind Regards, Fehér Sándor
>
>
> ...Fehér Sándor...---Sandor Feher
>   fejlesztési vezetõ   --- development manager
>   Blue System Kft. ---  Blue System Ltd.
>
> ..
> http://www.bluesystem.hu : http://www.adatmegorzo.hu :
> http://www.bluehosting.hu
>
> ..
>
> Kérem gondoljon a környezetre mielõtt kinyomtatná ezt az e-mailt vagy
> bármely csatolmányát.
> Please consider the environment before printing this e-mail and any
> associated attachments.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Catch start and finish of upload process on MultiFileUploadField

2022-10-18 Thread Martin Grigorov
On Tue, Oct 18, 2022 at 10:50 AM Sandor Feher  wrote:

> Hi,
>
> On Mon, Oct 17, 2022 at 1:23 PM Sandor Feher  wrote:
>
> >> Now I use IndicatingAjaxButton for that but catching it within onSubmit
> >> is late.
> >>
>
> >What do you mean with "is late" ?
>
> As I realized when the first line of onSubmit function is executed the
> file(s)  already get
> uploaded.
>
> >When exactly do you need the notifications ?
>
> When uploading process is started.
>

IndicatingAjaxButton starts showing the indicator before the form
submittion (i.e. when the process starts), then the files are uploaded, and
then when all the data is sent to the server the Form#onSubmit or onError
is called, and finally when the Ajax response is returned
IndicatingAjaxButton hides the indicator



>
>
> --
> Üdvözlettel/Kind Regards, Fehér Sándor
>
>
> ...Fehér Sándor...---Sandor Feher
>   fejlesztési vezetõ   --- development manager
>   Blue System Kft. ---  Blue System Ltd.
>
> ..
> http://www.bluesystem.hu  :http://www.adatmegorzo.hu  :
> http://www.bluehosting.hu
>
> ..
>
> Kérem gondoljon a környezetre mielõtt kinyomtatná ezt az e-mailt vagy
> bármely csatolmányát.
> Please consider the environment before printing this e-mail and any
> associated attachments.
>


Re: Catch start and finish of upload process on MultiFileUploadField

2022-10-18 Thread Martin Grigorov
Hi,



On Mon, Oct 17, 2022 at 1:23 PM Sandor Feher  wrote:

> Hi,
>
> I have a form which contains a MultiFileUploadField beside other input
> fields. (In this case uploading file(s) is optional. )
>
> I would like to catch somehow the start and the end of upload process to
> let users know we do something with the files.
>
> Now I use IndicatingAjaxButton for that but catching it within onSubmit
> is late.
>

What do you mean with "is late" ?
When exactly do you need the notifications ?


>
> This might be trivial but I did not find solution for it.
>
> I made a quickstart project.
> https://github.com/sfeher/multiplefileuploadprogress
>
> Wicket 7.18.0
>
> Thank you !
>
>
> --
> Üdvözlettel/Kind Regards, Fehér Sándor
>
>
> ...Fehér Sándor...---Sandor Feher
>   fejlesztési vezetõ   --- development manager
>   Blue System Kft. ---  Blue System Ltd.
>
> ..
> http://www.bluesystem.hu : http://www.adatmegorzo.hu :
> http://www.bluehosting.hu
>
> ..
>
> Kérem gondoljon a környezetre mielõtt kinyomtatná ezt az e-mailt vagy
> bármely csatolmányát.
> Please consider the environment before printing this e-mail and any
> associated attachments.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Feature request: AjaxButton that can be used as type reset or type button in addition to current type submit

2022-09-28 Thread Martin Grigorov
Hi,

You can use AjaxLink with .
Wicket will automatically set its type to "button" -
https://github.com/apache/wicket/blob/7a87b09e6f96f2fceccb497fa873595c726e5efb/wicket-core/src/main/java/org/apache/wicket/ajax/markup/html/AjaxLink.java#L126
.

If you have a form in the page then you should use AjaxButton. In addition
you could use #setDefaultFormProcessing(false) for the reset functionality.

On Wed, Sep 28, 2022 at 8:46 PM Robert Murphy <
robert.mur...@westringtechnologies.com> wrote:

> Forgive me if there is already an AjaxButton as described below:
>
> Currently AjaxButton must be in a form or have a form instance passed into
> its constructor and has an onSubmit(...) method and is of type="submit" (by
> omitting type attribute, standards consider it a submit).
> Proposal:
>
>   *   add method onClick(...) to AjaxButton, if AjaxButton is in a form or
> a form has been set on it, and it is of type submit, protected onClick(...)
> is never called
>   *   AjaxButton can be used outside of a form, protected onSubmit(...)
> will never be called on an AjaxButton that is not in a form (unless a form
> it is not a descendant of has been passed into the constructor)
>   *   When AjaxButton is not in a form, type will be explicitly,
> automatically, set to type="button" unless template has type="reset" or
> AttributeModifier is used to set type to reset or a form instance has been
> passed into the constructor
>   *   If AjaxButton is in a form or has had a form passed to it
> constructor, but type="button" in template or type set to button via
> ajaxbutton.add(new AttributeModifier("type","button")) then onSubmit(...)
> will never be called, onClick(...) will be called instead.
> Purpose: There are many instances where developers use AjaxLink but from
> an ADA Compliance standpoint that is frowned upon if not used for loading
> content or navigating content. Links () should link to something (go to
> another page, load additional content into the current page, jump to
> another location on the current page, etc), Buttons () should do
> something (submit a form, remove or hide an element, reset a form or field,
> start a client side process, etc). You should never use an  to reset a
> form, that is what  is for, you should never use an
>  to start a client side program, that is what 
> is for. This is important from a semantic markup standpoint, accessibility
> tools should be able to figure out how to present things without analyzing
> CSS and JavaScript
>
> The AjaxButton should behave exactly like an AjaxLink when it is included
> in a template where it is not a descendant of a form or where its type has
> been set to reset or button.
>
> Robert Murphy | Software Developer - Rocky Mountain ATV/MC
>
> Rocky Mountain ATV/MC  -  502.291.2076
> Address   -   77 E 800 N, Spanish Fork, UT 84660<
> https://goo.gl/maps/ERSNZK8AK5Bf1Xnh9>
> Website - www.rockymountainatvmc.com
>
>


Re: Reset exchange properties modifications when i call unmarshall in my route

2022-09-26 Thread Martin Grigorov
Hi Joël,

You sent your message to the wrong mailing list.
I guess you meant us...@camel.apache.org

Martin


On Mon, Sep 26, 2022 at 4:24 PM Joël Guelluy  wrote:

> Hello,
> There is something i don't understand around conversion and loosing
> modifications on my exchange (Camel 2.25.4)
>
> NOTE : At the end of this mail, i put a simplified version of my code
> and the traces.
>
> My route basically does this :
> 1) from email with copyTo=outFolder=true
> 2) process(myProcessor) : Inside this, i do some work, including some
> modifications, eventually an override of copyTo, and finish with a call
> of a RestWS (return (String)response).
> 3) .unmarshal(new JacksonDataFormat(Reply.class))
> 4) remaining steps (not important)
>
> All the process is OK except 1 thing : in the traces, i see the
> modifications on the exchange before the unmarshal, and the original
> values are back after the unmarshall.
>
> I want to keep the modified properties in the following steps of my
> route.
> Do you know how i can to it ?
>
> Joël
>
>
> ---
>
>
> from(imap://server?username=xxx=xxx=ACC/out=true=false=ACC/in=false)
> .routeId("mail-Reply")
> .process(myProcessor)
> .unmarshal(new JacksonDataFormat(Reply.class))
> .choice()
> .when(simple("${body.status} != 'OK'"))
> .throwException(new MyException("Error"))
> .end()
> .transform(simple("${body.file.content}"))
> .unmarshal().base64()
> ...
>
>
> public class MyProcessor implements Processor {
>  @Override
>  public void process(Exchange exchange) {
> IMAPMessage mainMessage =
> exchange.getIn().getBody(IMAPMessage.class);
> String htmlCode = extractHTML(mainMessage.getContent());
> Map extractedData = extractData(htmlCode);
> exchange.getIn().setHeader("copyTo",
> "ACC/toCheck");
>  exchange.getIn().setHeader("subject", "body");
> exchange.getProperties().putAll(extractedData);
>
> String subject = (String)
> exchange.getIn().getHeader("subject");
> String jsResponse = callOfA_REST_WebService()
>
> exchange.getIn().setBody(jsResponse);
>  }
> }
>
> logs
> You can see subject and copyTo in the 1st line, they disapears in the
> next line.
>
> 12:17:21.768 [Camel (camel-1) thread #3 - imap://mail.nuvem.intra] INFO
> org.apache.camel.processor.interceptor.Tracer -
> ID-PCP48141-1664187007789-0-6 >>> (mail-Reply) Processor@0x432f2970 -->
> unmarshal[org.apache.camel.component.jackson.JacksonDataFormat@207dd1b7]
> <<< Pattern:InOnly, Headers:{Accept-Language=en-US, en-AU,
> breadcrumbId=ID-PCP48141-1664187007789-0-6, Content-Language=en-US,
> Content-Type=multipart/alternative;
> boundary="...", copyTo=ACC/toCheck, Date=Fri, 26 Aug 2022 09:51:32
> +0200, From="no-re...@xxx.be" , Message-ID=<6be3>,
> MIME-Version=1.0, Received=[...], Subject=body,
> Thread-Index=AdjRh0ZWl+D/M9njSGaY14JVfSU0xA==, Thread-Topic=mail
> 25/08/2022 14:05:03
> , To="y...@yyy.be" , BodyType:String,
> Body:{"id":"Corresp_Rest:064c","status":"OK","taskStatus":null,"messages":[""],"data":{"request_id":"Corresp_Rest:2","file":{"content":"JVBER...
>
> [Body clipped after 1000 chars, total length is 109290]
>
> 12:17:21.786 [Camel (camel-1) thread #3 - imap://mail.nuvem.intra] INFO
> org.apache.camel.processor.interceptor.Tracer -
> ID-PCP48141-1664187007789-0-6 >>> (mail-Reply)
> unmarshal[org.apache.camel.component.jackson.JacksonDataFormat@207dd1b7]
> --> choice <<< Pattern:InOnly, Headers:{Accept-Language=en-US, en-AU,
> Content-Language=en-US, Content-Type=multipart/alternative;
> boundary="...", Date=Fri, 26 Aug 2022 09:51:32 +0200,
> From="no-re...@xxx.be" , Message-ID=<6be3>,
> MIME-Version=1.0, Received=[...
> ...], Subject=mail 25/08/2022 14:05:03,
> Thread-Index=AdjRh0ZWl+D/M9njSGaY14JVfSU0xA==, Thread-Topic=mail
> 25/08/2022 14:05:03
> , To="y...@yyy.be" , BodyType:be.myws.Reply,
> Body:be.myws.Reply@6e6f51d7
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: AjaxCall while failover return same page content

2022-09-20 Thread Martin Grigorov
On Tue, Sep 20, 2022, 17:06 Shengche Hsiao  wrote:

> Glad to see you, Martin
>

Hi!


> As session replication issue was my first point want to figure out, after
> enable/disable wildfly nodes manually, I found session replicated to each
> node. And when I invoke normal http request (not ajax call), the session
> continued at live node, the page showed as usual.
> When I turned on debug log, I found when ajax call occurred, session id
> replicated to live node but session data not, because of session data size
> exceeded the max allowed size.
>
> In Wicket Application, I put http-session in memory and adopted
> MemorySizeEvictionStratege with 32 bytes, but such ajax calls had more
> session size and evicted by wicket (?). On the lived node, although session
> id replicated but no data exists.
>
> After all, I enlarge the MemorySize with 128 kbs to fix this issue.
>

Maybe you keep reference to something that should not be serialized with
the page? For example some non-detachable model?!


> From: Martin Grigorov 
> Date: Tuesday, September 20, 2022 at 9:05 PM
> To: users@wicket.apache.org 
> Subject: Re: AjaxCall while failover return same page content
> Hi,
>
> Is Wildfly configured to replicate the http sessions across the nodes ?
> It seems you save a page instance on node 1 but then it is not available at
> node 2. I.e. Wildfly didn't replicate the http session from 1 to 2 and
> Wicket knows nothing about page with id 7 on node 2.
>
> On Fri, Sep 2, 2022 at 4:05 PM Shengche Hsiao 
> wrote:
>
> > I found some log on failover node
> >
> >
> > 2022-09-02 20:57:41,270 DEBUG
> > [org.apache.wicket.pageStore.memory.HttpSessionDataStore] (default
> > task-352) Stored '32808' bytes for page '7' in session
> > '1Nlahj618TQ9MgwbQLPt6Agk-_F0zQTu1Qs-Vgp1'
> >
> > 2022-09-02 20:57:41,317 DEBUG
> > [org.apache.wicket.pageStore.memory.HttpSessionDataStore] (default
> > task-352) Loaded '-1' bytes for page with id '7' in session
> > '1Nlahj618TQ9MgwbQLPt6Agk-_F0zQTu1Qs-Vgp1'
> >
> >
> > I used HttpSessionDataStore to store pages, when node 1 closed
> > intentionally , I click none-ajax link, the node 2 take over the closed
> > node 1’s session, and showed correct page content. Then, I click the ajax
> > button, as the log showed, page ‘7’ stored with ‘32808’ bytes, but loaded
> > with ‘-1’ bytes for same pageid.
> >
> >
> >
> > From: ShengChe Hsiao 
> > Date: Friday, September 2, 2022 at 10:22
> > To: Wicket User Mailinglist 
> > Subject: AjaxCall while failover return same page content
> > Dear all
> >
> > I faced a strange situation, I built a wicket application which deployed
> > to Wildfly Cluster.
> > When I using Apache httpd as load balancer, everything works as expected.
> > But when I move application to GCP, and use their load balancer which has
> > gclb and gclib cookie to identity transfer to wildfly node with TTL of
> 300
> > seconds.
> > After GCP LB ttl timeout (wicket session still active), gcp lb route to
> > another wildfly node, and I clicked on ajaxbutton. I saw response code
> 200
> > on browser console and response payload is  > encoding=”UTF-8”>.
> >
> > How do I fix it ?
> >
>


Re: add json file in bookmarkable file.

2022-09-20 Thread Martin Grigorov
On Tue, Sep 20, 2022, 16:57 vahid ghasemi  wrote:

> Sorry for the many questions, But I'm using wicket 8.9 and this code is
> not correct :
>

Yes, it needs a second parameter - PageParameters.
I recommend you to use an IDE! It helps a lot with its code completion
functionality!

RequestCycle.get().urlFor(new PackageResourceReference(Some.class,
> "dataTables.persian.json"))
> [image: image.png]
>

Attachments are not allowed in the mailing lists.
Please copy/paste your code as it is a plain text! Oh, it actually is plain
text!


> This is my code and file hierarchy. I saw your provided link but I can't
> find the solution yet.
>
> On Tue, Sep 20, 2022 at 6:00 PM Martin Grigorov 
> wrote:
>
>> you may also want to check
>> http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/
>>
>> On Tue, Sep 20, 2022 at 4:25 PM Martin Grigorov 
>> wrote:
>>
>> >
>> >
>> > On Tue, Sep 20, 2022 at 4:16 PM vahid ghasemi <
>> vahidghasemi...@gmail.com>
>> > wrote:
>> >
>> >> I don't want to be available always. so I don't want to add to webapp.
>> >> I think exactly my problem is in the (...).
>> >> I don't know how should add my file
>> >> I write this code in renderHead, before
>> >>
>> """response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({"
>> >> + ... + "});"));""" :
>> >>
>> >
>> > You need to use RequestCycle.get().urlFor(new
>> > PackageResourceReference(Some.class, "dataTables.persian.json"))
>> >
>> >
>> >
>> >> WebApplication.get().mountResource("/", new
>> >> PackageResourceReference("dataTables.persian.json"));
>> >>
>> >
>> > I guess you don't want it on the root ("/").
>> > But this will make it "available always" too!
>> >
>> >
>> >
>> >> But I got 404 for the file
>> >> [image: image.png]
>> >>
>> >> On Tue, Sep 20, 2022 at 5:31 PM Martin Grigorov 
>> >> wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> You can put the JSON file in your webapp /static folder.
>> >>> Or you could use application.mountResource(...) if you want it to be
>> >>> served
>> >>> and/or generated by Wicket.
>> >>>
>> >>> Also please check
>> >>> https://github.com/wicketstuff/core/tree/master/datatables-parent
>> >>>
>> >>>
>> >>> On Tue, Sep 20, 2022 at 3:31 PM vahid ghasemi <
>> vahidghasemi...@gmail.com
>> >>> >
>> >>> wrote:
>> >>>
>> >>> > Hello,
>> >>> > I want to use datatables library: https://datatables.net/
>> >>> > I created a behavior and override renderHead method :
>> >>> >
>> >>>
>> response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({" +
>> >>> > ... + "});"));
>> >>> >
>> >>> > according to this link :
>> >>> > https://datatables.net/reference/option/language.url
>> >>> > I can pass the JSON file for internationalization, my JSON file
>> should
>> >>> be
>> >>> > after http://localhost:8080/wicket/bookmarkable/
>> >>> > I don't know how can I add my JSON file.
>> >>> >
>> >>> > Thanks. Regards
>> >>> >
>> >>>
>> >>
>>
>


Re: add json file in bookmarkable file.

2022-09-20 Thread Martin Grigorov
you may also want to check
http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/

On Tue, Sep 20, 2022 at 4:25 PM Martin Grigorov 
wrote:

>
>
> On Tue, Sep 20, 2022 at 4:16 PM vahid ghasemi 
> wrote:
>
>> I don't want to be available always. so I don't want to add to webapp.
>> I think exactly my problem is in the (...).
>> I don't know how should add my file
>> I write this code in renderHead, before
>> """response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({"
>> + ... + "});"));""" :
>>
>
> You need to use RequestCycle.get().urlFor(new
> PackageResourceReference(Some.class, "dataTables.persian.json"))
>
>
>
>> WebApplication.get().mountResource("/", new
>> PackageResourceReference("dataTables.persian.json"));
>>
>
> I guess you don't want it on the root ("/").
> But this will make it "available always" too!
>
>
>
>> But I got 404 for the file
>> [image: image.png]
>>
>> On Tue, Sep 20, 2022 at 5:31 PM Martin Grigorov 
>> wrote:
>>
>>> Hi,
>>>
>>> You can put the JSON file in your webapp /static folder.
>>> Or you could use application.mountResource(...) if you want it to be
>>> served
>>> and/or generated by Wicket.
>>>
>>> Also please check
>>> https://github.com/wicketstuff/core/tree/master/datatables-parent
>>>
>>>
>>> On Tue, Sep 20, 2022 at 3:31 PM vahid ghasemi >> >
>>> wrote:
>>>
>>> > Hello,
>>> > I want to use datatables library: https://datatables.net/
>>> > I created a behavior and override renderHead method :
>>> >
>>> response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({" +
>>> > ... + "});"));
>>> >
>>> > according to this link :
>>> > https://datatables.net/reference/option/language.url
>>> > I can pass the JSON file for internationalization, my JSON file should
>>> be
>>> > after http://localhost:8080/wicket/bookmarkable/
>>> > I don't know how can I add my JSON file.
>>> >
>>> > Thanks. Regards
>>> >
>>>
>>


Re: add json file in bookmarkable file.

2022-09-20 Thread Martin Grigorov
On Tue, Sep 20, 2022 at 4:16 PM vahid ghasemi 
wrote:

> I don't want to be available always. so I don't want to add to webapp.
> I think exactly my problem is in the (...).
> I don't know how should add my file
> I write this code in renderHead, before
> """response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({"
> + ... + "});"));""" :
>

You need to use RequestCycle.get().urlFor(new
PackageResourceReference(Some.class, "dataTables.persian.json"))



> WebApplication.get().mountResource("/", new
> PackageResourceReference("dataTables.persian.json"));
>

I guess you don't want it on the root ("/").
But this will make it "available always" too!



> But I got 404 for the file
> [image: image.png]
>
> On Tue, Sep 20, 2022 at 5:31 PM Martin Grigorov 
> wrote:
>
>> Hi,
>>
>> You can put the JSON file in your webapp /static folder.
>> Or you could use application.mountResource(...) if you want it to be
>> served
>> and/or generated by Wicket.
>>
>> Also please check
>> https://github.com/wicketstuff/core/tree/master/datatables-parent
>>
>>
>> On Tue, Sep 20, 2022 at 3:31 PM vahid ghasemi 
>> wrote:
>>
>> > Hello,
>> > I want to use datatables library: https://datatables.net/
>> > I created a behavior and override renderHead method :
>> > response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({"
>> +
>> > ... + "});"));
>> >
>> > according to this link :
>> > https://datatables.net/reference/option/language.url
>> > I can pass the JSON file for internationalization, my JSON file should
>> be
>> > after http://localhost:8080/wicket/bookmarkable/
>> > I don't know how can I add my JSON file.
>> >
>> > Thanks. Regards
>> >
>>
>


Re: AjaxCall while failover return same page content

2022-09-20 Thread Martin Grigorov
Hi,

Is Wildfly configured to replicate the http sessions across the nodes ?
It seems you save a page instance on node 1 but then it is not available at
node 2. I.e. Wildfly didn't replicate the http session from 1 to 2 and
Wicket knows nothing about page with id 7 on node 2.

On Fri, Sep 2, 2022 at 4:05 PM Shengche Hsiao 
wrote:

> I found some log on failover node
>
>
> 2022-09-02 20:57:41,270 DEBUG
> [org.apache.wicket.pageStore.memory.HttpSessionDataStore] (default
> task-352) Stored '32808' bytes for page '7' in session
> '1Nlahj618TQ9MgwbQLPt6Agk-_F0zQTu1Qs-Vgp1'
>
> 2022-09-02 20:57:41,317 DEBUG
> [org.apache.wicket.pageStore.memory.HttpSessionDataStore] (default
> task-352) Loaded '-1' bytes for page with id '7' in session
> '1Nlahj618TQ9MgwbQLPt6Agk-_F0zQTu1Qs-Vgp1'
>
>
> I used HttpSessionDataStore to store pages, when node 1 closed
> intentionally , I click none-ajax link, the node 2 take over the closed
> node 1’s session, and showed correct page content. Then, I click the ajax
> button, as the log showed, page ‘7’ stored with ‘32808’ bytes, but loaded
> with ‘-1’ bytes for same pageid.
>
>
>
> From: ShengChe Hsiao 
> Date: Friday, September 2, 2022 at 10:22
> To: Wicket User Mailinglist 
> Subject: AjaxCall while failover return same page content
> Dear all
>
> I faced a strange situation, I built a wicket application which deployed
> to Wildfly Cluster.
> When I using Apache httpd as load balancer, everything works as expected.
> But when I move application to GCP, and use their load balancer which has
> gclb and gclib cookie to identity transfer to wildfly node with TTL of 300
> seconds.
> After GCP LB ttl timeout (wicket session still active), gcp lb route to
> another wildfly node, and I clicked on ajaxbutton. I saw response code 200
> on browser console and response payload is  encoding=”UTF-8”>.
>
> How do I fix it ?
>


Re: add json file in bookmarkable file.

2022-09-20 Thread Martin Grigorov
Hi,

You can put the JSON file in your webapp /static folder.
Or you could use application.mountResource(...) if you want it to be served
and/or generated by Wicket.

Also please check
https://github.com/wicketstuff/core/tree/master/datatables-parent


On Tue, Sep 20, 2022 at 3:31 PM vahid ghasemi 
wrote:

> Hello,
> I want to use datatables library: https://datatables.net/
> I created a behavior and override renderHead method :
> response.render(OnDomReadyHeaderItem.forScript("$('table').DataTable({" +
> ... + "});"));
>
> according to this link :
> https://datatables.net/reference/option/language.url
> I can pass the JSON file for internationalization, my JSON file should be
> after http://localhost:8080/wicket/bookmarkable/
> I don't know how can I add my JSON file.
>
> Thanks. Regards
>


Re: Re: Re: Automatically insert generated html IDs in other places in html file

2022-07-11 Thread Martin Grigorov
On Fri, Jul 8, 2022 at 7:55 PM Daniel Radünz  wrote:

> Thank you again for your input and sorry for the slow responses. Been
> unexpectedly busy with more urgent problems in my project.
>
> Beforehand: If it's still not clear what I'm trying to achieve after this
> message, I'll happily provide the requested quickstart, though from your
> responses and my own digging I already get the feeling, that it might just
> not be possible ...
>
> While the idea of Martin Terra with using a generic panel is good, the
> example that I've given with the h1 in the section is sadly just a simple
> one to show the general problem.
> There are many many use cases with aria-* accessibillity attributes where
> you have to add the id of one element to an attribute of another element.
> aria-labelledby, aria-owns, aria-controls, aria-describedby, ... just to
> name a few. With many of those you don't always have the convinient case
> that these elements encase eachother as they do in my example. They could
> be encased the other way around or not all and both just be direct children
> of another parent element. They might not even be in close proxymity, as an
> element right at the beginning of a panel could reference an element which
> is at the very end of that panel.
> So yes, I might be able to write some JS code for this very particular
> simple example but as soon as the structure changes or in general I have
> panels with different structures, the JS code would fail or I would at
> least have to write different JS code for each case. That's why I'd like to
> do it on the server side where it's reasonable to assume to have unique
> Wicket IDs in a panel.html file which then get turned into unique html IDs
> when wicket assembles the full page.
>
> Maybe I failed to make clear that of course I am well aware of how to do
> this the "hard" way with some boiler plate could. I know I could very well
> have this bit of html:
>
> 
>   Lorem ipsum
> 
>
> and wire everything together with this bit of code:
>
> WebMarkupContainer section = new WebMarkupContainer("section");
> add(section);
> WebMarkupContainer sectionheader = new WebMarkupContainer("sectionheader");
> sectionheader.setOutputMarkupId(true);
> section.add(sectionheader);
> section.add(AttributeModifier.replace("aria-labelledby",
> sectionheader::getMarkupId));
>
> which would produce something like this with unique IDs
>
> 
>   Lorem ipsum
> 
>
> But I wanted to avoid that. Adding these elements to the Java side has no
> real benefits in my eyes.
>
> If I write this in html
>
> 
>   Lorem ipsum
> 
>

How about of using custom attribute instead of id here, e.g.: Lorem ipsum
Then again with JavaScript you can lookup all HTML elements with such
attributes and update their siblings if they have aria-xyz="same_value".
The only well-defined logic that you need here is how far to look for
siblings/parents.


>
> it's already clear from the html side that the developer wants to wire
> these components togehter just by having the attributes on the
> corresponding tags. Adding any (boiler plate-)code on the Java side
> increases the complexitiy, feels redundant and in the worst case even
> causes trouble. So the idea was that maybe there is a way to write whatever
> "global" behaviour/listener/filter etc. to recognise matching pairs id- and
> aria-*-attributes in a Wicket panel and then generate and insert unique IDs
> into these places within a panel.
>
> I will check out AutoLabelTagHandler and AutoLabelTagResolver again as
> Martijn suggested.
>
> With that said, if it turns out, that it's not possible, I will just have
> to do it the "old fashioned" way by adding everything on the Java side as
> well. I just wanted to know ahead of that if somebody has solved this
> problem in a more elegant way before and I would maybe not have to reinvent
> the wheel.
>
> Thank you for your time and kind regards
> Daniel Radünz
>
>
>
> Gesendet: Sonntag, 03. Juli 2022 um 22:36 Uhr
> Von: "Martin Grigorov" 
> An: users@wicket.apache.org
> Betreff: Re: Re: Automatically insert generated html IDs in other places
> in html file
> On Sat, Jul 2, 2022, 15:18 Martijn Dashorst 
> wrote:
>
> > I think Daniel suggest that Wicket doesn't make /all/ id's unique, only
> > those that are owned by it by having a component attached to it. And even
> > then, when you explicitly setMarkupId() you are yourself responsible for
> > ensuring it is unique.
> >
> > BarPanel.html:
> > 
> > 
> >
>
> 1. Don't set the ID in HTML
> 2. Use panel.setOutputMarkupId(true)
>
> Voila!
>
&

Re: Wicket development contractors

2022-07-11 Thread Martin Grigorov
Hi Boris,

You could still try the listed companies and individuals on that page.
My company is listed there and I provide such service but I am not
available at the moment. Hopefully someone is!

Martin


On Fri, Jul 8, 2022 at 8:16 PM Boris Goldowsky  wrote:

> Hi,
>
> We have a number of applications based on Wicket and an overflowing
> backlog of work to do on them this summer.  Any suggestions on how to get
> in contact with individuals or companies that could help us out?  I found
> https://cwiki.apache.org/confluence/display/WICKET/Companies+that+provide+services
> but it does not seem to have been updated since 2016 (!).
>
> Thanks for any leads,
> Boris
>
> --
>
> Boris Goldowsky
> Director of Technology
> CAST, Inc.   www.cast.org
>
>


Re: Re: Automatically insert generated html IDs in other places in html file

2022-07-03 Thread Martin Grigorov
On Sat, Jul 2, 2022, 15:18 Martijn Dashorst 
wrote:

> I think Daniel suggest that Wicket doesn't make /all/ id's unique, only
> those that are owned by it by having a component attached to it. And even
> then, when you explicitly setMarkupId() you are yourself responsible for
> ensuring it is unique.
>
> BarPanel.html:
> 
> 
>

1. Don't set the ID in HTML
2. Use panel.setOutputMarkupId(true)

Voila!



>
> BarPage.html:
> 
> 
>
> BarPagel.java:
> add(new BarPanel("panel1"));
> add(new BarPanel("panel2"));
>
> This would result in two h1 tags with the same HTML id. Wicket doesn't
> modify the id magically.
>
> Wicket (from what i know) doesn't support Daniel's usecase out of the box,
> but Wicket does have the ability to act on tags if you make such affordance
> yourself.
>
> I suppose
>
> 
> 
>
> Could be similarly implemented as the wicket:for attribute.
> See AutoLabelTagHandler and AutoLabelTagResolver for more information.
>
> Martijn
>
>
> On Thu, Jun 30, 2022 at 10:41 PM Martin Grigorov 
> wrote:
>
> > On Thu, Jun 30, 2022, 13:50 Daniel Radünz  wrote:
> >
> > > Thank you kindly both for your suggestions.
> > >
> > > @Martin Terra
> > > I'm not sure I quite undstand what you mean. My hope was that I don't
> > have
> > > to add any of the involved components to the Java code of every single
> > > panel. The example I've given is just one of many. We have many
> different
> > > constellation with completly different html fragments but each of them
> > has
> > > the same problem, that somewhere in there the html ID of one html tag
> has
> > > to be put into the html attribute of another html tag.
> > >
> > > @Martin Grigorov
> > > The problem I'm having with doing it on the client with javascript or
> > with
> > > the IResponseFilter is that by that time I can only work on the fully
> > > assembled html. If a Wicket page includes the same panel multiple times
> > > though, I would already have the same html ID and the
> >
> >
> > Wrong!
> > Wicket makes sure that all ids in the page are unique.
> >
> > With jQuery / JSoup you could query all  elements which have a
> > child of type  with "id" attribute. Iterate over them and add the
> aria
> > attribute.
> >
> > same reference to it multiple times in the final html without a (bullet
> > > proof) way to figure out which two elements ultimatively belong
> together.
> > >
> > > That's why I was hoping there would be a way to do this on a panel
> level,
> > > maybe with a custom attribute. Something like
> > > 
> > >   
> > > 
> > >
> > > If I'd then have a page which has the same panel twice in it, Wicket
> > would
> > > take care of assinging unique IDs and also putting these generated
> unique
> > > IDs in the corresponding attributes that reference them, resulting in
> > > something like this:
> > > 
> > >   
> > > 
> > > 
> > >   
> > > 
> > >
> > > If there is something like the IResponseFilter but on a per component
> > base
> > > which would allow me to inspect and modify only the html fragment of a
> > > component/panel it might work.
> > >
> > > Kind regards,
> > > Daniel
> > >
> > >
> > > Gesendet: Mittwoch, 29. Juni 2022 um 15:40 Uhr
> > > Von: "Martin Grigorov" 
> > > An: users@wicket.apache.org
> > > Betreff: Re: Automatically insert generated html IDs in other places in
> > > html file
> > > Hi,
> > >
> > > The easiest way I could imagine is with a short jQuery function that is
> > > called on domready.
> > >
> > > If you need to do it on the server side then maybe with
> IResponseFilter.
> > >
> > > On Wed, Jun 29, 2022, 12:38 Daniel Radünz  wrote:
> > >
> > > > Hello everybody,
> > > >
> > > > I'm wondering if there is a way in Wicket to generate unique html IDs
> > and
> > > > to then add them in other places in the html, without having to write
> > any
> > > > boiler plate code in each panel that I have.
> > > >
> > > > For example in the following panel I need the ID of the h1 tag to be
> > put
> > > > into the aria-labelledby attribute in the section tag.
> > > > 
> > > > 
> > > > Lorem
> 

Re: Re: Automatically insert generated html IDs in other places in html file

2022-06-30 Thread Martin Grigorov
On Thu, Jun 30, 2022, 13:50 Daniel Radünz  wrote:

> Thank you kindly both for your suggestions.
>
> @Martin Terra
> I'm not sure I quite undstand what you mean. My hope was that I don't have
> to add any of the involved components to the Java code of every single
> panel. The example I've given is just one of many. We have many different
> constellation with completly different html fragments but each of them has
> the same problem, that somewhere in there the html ID of one html tag has
> to be put into the html attribute of another html tag.
>
> @Martin Grigorov
> The problem I'm having with doing it on the client with javascript or with
> the IResponseFilter is that by that time I can only work on the fully
> assembled html. If a Wicket page includes the same panel multiple times
> though, I would already have the same html ID and the


Wrong!
Wicket makes sure that all ids in the page are unique.

With jQuery / JSoup you could query all  elements which have a
child of type  with "id" attribute. Iterate over them and add the aria
attribute.

same reference to it multiple times in the final html without a (bullet
> proof) way to figure out which two elements ultimatively belong together.
>
> That's why I was hoping there would be a way to do this on a panel level,
> maybe with a custom attribute. Something like
> 
>   
> 
>
> If I'd then have a page which has the same panel twice in it, Wicket would
> take care of assinging unique IDs and also putting these generated unique
> IDs in the corresponding attributes that reference them, resulting in
> something like this:
> 
>   
> 
> 
>   
> 
>
> If there is something like the IResponseFilter but on a per component base
> which would allow me to inspect and modify only the html fragment of a
> component/panel it might work.
>
> Kind regards,
> Daniel
>
>
> Gesendet: Mittwoch, 29. Juni 2022 um 15:40 Uhr
> Von: "Martin Grigorov" 
> An: users@wicket.apache.org
> Betreff: Re: Automatically insert generated html IDs in other places in
> html file
> Hi,
>
> The easiest way I could imagine is with a short jQuery function that is
> called on domready.
>
> If you need to do it on the server side then maybe with IResponseFilter.
>
> On Wed, Jun 29, 2022, 12:38 Daniel Radünz  wrote:
>
> > Hello everybody,
> >
> > I'm wondering if there is a way in Wicket to generate unique html IDs and
> > to then add them in other places in the html, without having to write any
> > boiler plate code in each panel that I have.
> >
> > For example in the following panel I need the ID of the h1 tag to be put
> > into the aria-labelledby attribute in the section tag.
> > 
> > 
> > Lorem
> > ipsum dolor sit amet
> > Content ...
> > 
> > 
> >
> > Hardwiring it like in this example of course won't work if I use the same
> > panel class multiple times within a page due to duplicate html IDs.
> >
> > While I know I could add WebMarkupContainers for the section and the h1
> to
> > my Java code and manually wire them together with an AttributeModifier in
> > Wicket, I woud prefer to have some application wide code which recognizes
> > this constellation in the html file and automatically generates and
> inserts
> > the IDs.
> >
> > Maybe somebody can push me in the right direction, how I could accomplish
> > this with Wicket, if it's possible at all.
> >
> > Kind regards,
> > Daniel
> >
> > -
> > 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: Automatically insert generated html IDs in other places in html file

2022-06-29 Thread Martin Grigorov
Hi,

The easiest way I could imagine is with a short jQuery function that is
called on domready.

If you need to do it on the server side then maybe with IResponseFilter.

On Wed, Jun 29, 2022, 12:38 Daniel Radünz  wrote:

> Hello everybody,
>
> I'm wondering if there is a way in Wicket to generate unique html IDs and
> to then add them in other places in the html, without having to write any
> boiler plate code in each panel that I have.
>
> For example in the following panel I need the ID of the h1 tag to be put
> into the aria-labelledby attribute in the section tag.
> 
> 
> Lorem
> ipsum dolor sit amet
> Content ...
> 
> 
>
> Hardwiring it like in this example of course won't work if I use the same
> panel class multiple times within a page due to duplicate html IDs.
>
> While I know I could add WebMarkupContainers for the section and the h1 to
> my Java code and manually wire them together with an AttributeModifier in
> Wicket, I woud prefer to have some application wide code which recognizes
> this constellation in the html file and automatically generates and inserts
> the IDs.
>
> Maybe somebody can push me in the right direction, how I could accomplish
> this with Wicket, if it's possible at all.
>
> Kind regards,
> Daniel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: BootstrapMultiSelect shows empty list without any options.

2022-06-23 Thread Martin Grigorov
Hi,

Here are some possible reasons:

1) getMultiSelectItems() returns empty list
2) you may need to disable CSP in your application (
https://nightlies.apache.org/wicket/guide/9.x/single.html#_content_security_policy_csp
)
3) disable COOP and/or COEP (
https://nightlies.apache.org/wicket/guide/9.x/single.html#_cross_origin_isolation_with_coop_and_coep
)

On Wed, Jun 22, 2022 at 12:34 PM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Hi guys,
> We are working to implement bootstrap-select from the Wicket Bootstrap
> Extensions project 5.x into  Wicket 9.x + Bootstrap 4.x application.
> But, the BootstrapMultiSelect shows an empty list without any options.
> I inspected the rendered html page, it seems everything is ok and has all
> the options .
>
> Java
> new BootstrapMultiSelect("multiSelectItems",
> getMultiSelectItems());
>
> HTML
>  multiple="multiple"> 
>
> Could you help me to identify and fix the problem?
>
> Components used in our project:
>
>1. Wicket 9.x
>2. Wicket Bootstrap 5.x (Bootstrap 4.x)
>3. JQuery 3.6.0
>
> Note: It works as expected in a simple Wicket quickstart project.
>
>  I couldn't find what went wrong in our app.
>
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>


Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

2022-05-31 Thread Martin Grigorov
On Tue, May 31, 2022 at 1:03 PM sundar saba 
wrote:

> Hi all,
>
>  Based on your solution my actual problem is solved. May I  know from
> where another version of jQuery v2.2.4 is loaded? And I know that jQuery
> v3.6.0 is loaded from the "JavaScriptLibrarySettings" class by default.
>

I'd bet it comes from here:
https://github.com/adessoSE/wicked-charts/blob/master/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java#L81
You can set v3 with
https://github.com/adessoSE/wicked-charts/blob/d0bec5cda557112adaad8ad528b893d84bc06415/wicket/wicked-charts-wicket8/src/main/java/de/adesso/wickedcharts/wicket8/JavaScriptResourceRegistry.java#L236



>
>
>


Re: One button in a form shall show result in new tab

2022-05-31 Thread Martin Grigorov
Hi,

On Tue, May 31, 2022 at 6:50 AM Joachim Schrod  wrote:

>
> Hi,
>
> I'm tasked with upgrading an application from Wicket 7 to Wicket 9.
>
> There is one class with a heavy code smell: it relies on a Wicket
> internal realization. (Which promptly doesn't work any more in Wicket
> 9...) This email is part of my search for a better realization method.
>
> The use case:
>  -- There is a form with lots of submit buttons.
>  -- One button realizes a "show as pdf" functionality.
>  -- The PDF shall be shown in a new tab.
>  -- It shall be possible to use the button while still working on
> the form. This is a form submit -- the PDF shall show the then
> current content of the page. (Validation is not an issue in
> this case, the submit and form processing will succeed.)
>  -- After showing a PDF representation of the form, it shall be
> possible to use the other buttons in this form, which are part of
> the HTML sequence of pages.
>
> I cannot use Javascript popups, as too many browsers block them. (In
> fact, my own developer browser blocks them. ;-)) So I need to have the
> following functionality for this button:
>  -- Before the submit, a target attribute "_blank" get's added to the
> form.
>  -- The form is submittet, by this button. (I.e., its onSubmit() must
> be called.)
>  -- Afterwards, the target attribute is deleted from the form.
>
> The previous programmer in this project simply copied the Javascript
> code for an AjaxSubmitLink from Wicket 7 and enriched it with
> adding/deleting the form attribute. Not the smartest move, indeed; but
> it was working all this time
>
> I'm looking for best practice to achieve that functionality with the
> available Wicket API. I.e., I want to prepend and append Javascript to
> the Wicket-supplied submit functionality of a button or ajax submit
> action. I have looked at Javadoc and source code of the following
> classes (and their superclasses) and didn't found any hook/method
> where I can achieve my desired result:
>  -- AjaxRequestAttributes: No methods to prepend/append JS code.
>

Actually this is the one you need ^^
atrts.getAjaxCallListeners().add(new
AjaxCallListener().onBefore("...").onComplete("..."));

see also onBeforeSend() and onAfter()



>  -- AjaxSubmitLink: No methods to manipulate the emmitted JS code.
>  -- AjaxFormSubmitBehavior: No methods to manipulate the emmitted JS
> code.
>  -- Button: has getOnClickScript(), but this is empty.
>  -- AjaxButton: doesn't redefine getOnClickScript(), so no gain to be
> get here either.
>
> FWIW: The application uses getCspSettings().blocking().disabled().
> There's too much JS code in HTML that I don't want to touch in this
> round of update; that's a step after the Wicket 9 migration. Thus,
> currently I have no qualms to add JS code to HTML "onsubmit"
> attributes if that's the way to go at the moment.
>
> I'm looking for something like #prependJavaScript() and
> #appendJavaScript() in AjaxRequestTarget -- but not in the response
> handling, instead for the code that triggers the click event.
>
> tl;dr: How can I specify JS code that's executed before and after a
> (specific) button or ajax submit of a form?
>
> Here's hoping for some tips,
>
> Joachim
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Joachim Schrod, Roedermark, Germany
> Email: jsch...@acm.org
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Reg : Multiple versions of jQuery's are loaded on same page causing conflict

2022-05-25 Thread Martin Grigorov
Hi,

You could use
1) IHeaderResponseDecorator to filter out the JavaScriptResourceReference
for 2.x completely - check
https://nightlies.apache.org/wicket/guide/9.x/single.html#_put_javascript_inside_page_body
2) resource replacement (to replace 2.x with 3.x on the fly) - check
http://wicketinaction.com/2012/07/wicket-6-resource-management/

But I'd recommend you to upgrade the component that uses 2.x to 3.x.
If you "unload" 2.x then there is a chance the JS code will not work with
jQuery 3.x.

On Wed, May 25, 2022 at 7:46 AM sundar saba 
wrote:

> Hi all,
>I am using wicket v9.10.0 in my project. wherever we use both
> select2 choice components from wicket-stuff and Highcharts in the same
> page, it loads multiple versions of jQuery specifically v2.2.4 and v3.6.0.
> This  causes conflicts and leads to highchart not displayed. However, If we
> remove select2 components from the page, the highchart is displayed
> properly. Seems  there is a conflict between  both versions of jQuery. Is
> there a way to unload  jQuery v2.2.4 from the project ?
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org


Re: Ajax Error

2022-05-23 Thread Martin Grigorov
Hi,


On Mon, May 23, 2022 at 2:03 PM vahid ghasemi 
wrote:

> Hello,
> I have the below error and I don't know this is from where and how I should
> fix it.
> FunctionsExecuter.processNext: ReferenceError: Main is not defined
>

You must be doing something like:
target.appendJavaScript("Main.doSomething()");
But you forgot to contribute the JavaScriptPackageResource that defines
'Main', e.g.

@Override
public void renderHead(IHeaderResponse response) {
   response.render(JavaScriptHeaderItem.forReference(new
JavaScriptResourceReference(MyClass.class, "some.js")))
}


Re: NullPointerException in ModificationWatcher

2022-04-11 Thread Martin Grigorov
Hi,

On Sat, Apr 9, 2022 at 3:14 PM Ryo Tsunoda 
wrote:

> Hi.
>
> Sometimes this exception occurs after I edit the CSS.
> Developed with Eclipse (Checked Build Automatically) + Tomcat.
>
>
> 2022-04-09 19:28:48.252 | ERROR | [ModificationWatcher Task] |
> org.apache.wicket.util.thread.Task | Unhandled exception thrown by user
> code in task ModificationWatcher
> java.lang.NullPointerException: null
> at org.apache.wicket.util.io.Connections.close(Connections.java:133)
> ~[wicket-util-8.14.0.jar:8.14.0]
> at
>
> org.apache.wicket.core.util.resource.UrlResourceStream.updateContentLength(UrlResourceStream.java:247)
> ~[wicket-core-8.14.0.jar:8.14.0]
> at
>
> org.apache.wicket.core.util.resource.UrlResourceStream.lastModifiedTime(UrlResourceStream.java:224)
> ~[wicket-core-8.14.0.jar:8.14.0]
> at
>
> org.apache.wicket.markup.MarkupResourceStream.lastModifiedTime(MarkupResourceStream.java:148)
> ~[wicket-core-8.14.0.jar:8.14.0]
> at
>
> org.apache.wicket.util.watch.ModificationWatcher.checkModified(ModificationWatcher.java:157)
> ~[wicket-util-8.14.0.jar:8.14.0]
> at
>
> org.apache.wicket.util.watch.ModificationWatcher$1.run(ModificationWatcher.java:143)
> ~[wicket-util-8.14.0.jar:8.14.0]
> at org.apache.wicket.util.thread.Task$1.run(Task.java:116)
> [wicket-util-8.14.0.jar:8.14.0]
> at java.lang.Thread.run(Thread.java:829) [?:?]
>
>
> connection.getInputStream() returns null.
>
> https://github.com/apache/wicket/blob/wicket-8.x/wicket-util/src/main/java/org/apache/wicket/util/io/Connections.java#L133
>
> Should wicket check null here?
>

We could add this check, yes!



> Or is there a problem with the null return situation itself? (Is it a
> problem other than wicket?  Eclipse build?)
>

Which JDK flavor and version do you use ?
UrlConnection#getInputStream() should either return non-null InputStream or
should throw an Exception.
sun.net.www.protocol.file.FileURLConnection#getInputStream() behaves the
same way in Oracle JDK 1.8 and 17.



>
> Has anyone had the same problem?
> If anyone knows of a workaround, please let me know.
>

Please file a ticket in JIRA!



>
> Regards,
> Ryo Tsunoda.
>


Re: spring-bean RCE (indirect vulnerability of Servlet/jsp request get/post)

2022-04-05 Thread Martin Grigorov
On Tue, Apr 5, 2022, 13:18 kyrindorx  wrote:

> Hi,
>
> Thank you for the first answer of this issue. I have also a question
> about https://github.com/MarcGiffing/wicket-spring-boot and a upgrade of
> spring-beans or spring in general. Do you have good idea upgrade spring
> to version 5.2.20, 5.3.18 without an impact with wicket-spring-boot?
> I'll thankful for any hints :)
>

Just update/overwrite the Spring version in your pom.xml and all should be
fine!


> Background:
>
> https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2436751
>
>
> Greets
> Daniel
>
>
> Am 01.04.2022 um 20:17 schrieb Martin Grigorov:
> > Hi,
> >
> > I don't think a normal Wicket application is vulnerable to this attack.
> > But I recommend you to update Spring in your applications anyway.
> >
> > On Fri, Apr 1, 2022, 10:21 kyrindorx  wrote:
> >
> >> Hello everyone,
> >>
> >> The internet developer community found a bug in
> >> spring-beans/spring-webmvc on 03/30/2022. I would like to know to what
> >> extent Wicket could be affected for this exploit? I think it should be a
> >> specific behavior with Spring and the servlet engine (Tomcat was used in
> >> the exploit), but Wicket is also a servlet-driven web framework.
> >>
> >> The exploit used a code injection block with "<% bad java code/cmds %>"
> >> and a beanintrospeaction via a rest service call. What is the opinion of
> >> the Wicket core team on this issue?
> >>
> >> Thanks in advance
> >> Daniel
> >>
> >>
> >> Sources:
> >> https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2436751
> >> (informed by github)
> >> https://tanzu.vmware.com/security/cve-2022-22965
> >> https://github.com/tweedge/springcore-0day-en


Re: spring-bean RCE (indirect vulnerability of Servlet/jsp request get/post)

2022-04-01 Thread Martin Grigorov
Hi,

I don't think a normal Wicket application is vulnerable to this attack.
But I recommend you to update Spring in your applications anyway.

On Fri, Apr 1, 2022, 10:21 kyrindorx  wrote:

> Hello everyone,
>
> The internet developer community found a bug in
> spring-beans/spring-webmvc on 03/30/2022. I would like to know to what
> extent Wicket could be affected for this exploit? I think it should be a
> specific behavior with Spring and the servlet engine (Tomcat was used in
> the exploit), but Wicket is also a servlet-driven web framework.
>
> The exploit used a code injection block with "<% bad java code/cmds %>"
> and a beanintrospeaction via a rest service call. What is the opinion of
> the Wicket core team on this issue?
>
> Thanks in advance
> Daniel
>
>
> Sources:
> https://security.snyk.io/vuln/SNYK-JAVA-ORGSPRINGFRAMEWORK-2436751
> (informed by github)
> https://tanzu.vmware.com/security/cve-2022-22965
> https://github.com/tweedge/springcore-0day-en


Re: Get session details when it expires

2022-03-15 Thread Martin Grigorov
Hi,

Please see Session#onInvalidate() javadoc.
https://github.com/apache/wicket/blob/d902cdbdd853cb490db1507d79c587acede01ae3/wicket-core/src/main/java/org/apache/wicket/Session.java#L1016

On Tue, Mar 15, 2022 at 11:56 AM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Hi guys,
> My app uses custom Session and Session Store classes that extend WebSession
> and HttpSessionStore respectively. Additional details stored in the Session
> class.
> I couldn't get the session when it expires and the app throws the below
> exception when attempting to get the current  session when it expires.
>
> org.apache.wicket.WicketRuntimeException: There is no application attached
> to current thread
>
> Is there a way to get the session object to get the details upon
> session expiration?
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>


Re: java.lang.ClassNotFoundException: javax.servlet.Filter on new quickstart

2022-02-26 Thread Martin Grigorov
On Sat, Feb 26, 2022 at 9:23 PM Timo Schmidt  wrote:

> Hi Lucio,
>
> On Sa 26.02.2022 12:22, Lucio Crusca wrote:
> >
> > I'm back to Wicket after a few years of other fun. Last
> > time I used Wicket was version 6 and now I've tried a new
> > quickstart project with Wicket 9.x but something went wrong.
> >
> > I'm on Debian sid, using NetBeans 12.6 and Tomcat 10.0.16,
> > just in case it matters.
> >
> > The code is just the sample of the Wicket quickstart,
> > untouched.
> >
> > When I try to run it, it builds correctly, but the
> > deploy fails with: java.lang.NoClassDefFoundError:
> > javax/servlet/Filter
> >
> > I've already checked and I have servlet-api.jar in Tomcat lib
> > directory, and there isn't any other servlet*.jar anywhere
> > in the project folder, nor in the target directory that
> > Maven builds (nor anywhere else for that matter). I've tried
> > removing servlet-api.jar from the Tomcat lib directory and
> > adding it as a dependency to my quickstart project, but it
> > does not work since Tomcat itself fails to start in this
> > case.
> >
> > My JDK version is 11.0.1.
> >
> > What am I doing wrong?
>
> as far as I know has Tomcat 10 mmoved to the jakarta namespace.
> So just use Tomcat 9 which is still using the javax namespace.
>

Oh, right! Thanks, Timo!

In Tomcat 10 you could put your.war in webapps-javaee/ folder. Tomcat will
migrate javax to jakarta APIs and run it.



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


Re: java.lang.ClassNotFoundException: javax.servlet.Filter on new quickstart

2022-02-26 Thread Martin Grigorov
Hi,

How do you deploy the application?
Please list the steps you do to build, deploy and (try to) use your
application.

On Sat, Feb 26, 2022, 13:23 Lucio Crusca  wrote:

> Hello everyone,
>
> I'm back to Wicket after a few years of other fun. Last time I used Wicket
> was version 6 and now I've tried a new quickstart project with Wicket 9.x
> but something went wrong.
> I'm on Debian sid, using NetBeans 12.6 and Tomcat 10.0.16, just in case it
> matters.
>
> The code is just the sample of the Wicket quickstart, untouched.
>
> When I try to run it, it builds correctly, but the deploy fails with:
> java.lang.NoClassDefFoundError: javax/servlet/Filter
>
> I've already checked and I have servlet-api.jar in Tomcat lib directory,
> and there isn't any other servlet*.jar anywhere in the project folder, nor
> in the target directory that Maven builds (nor anywhere else for that
> matter). I've tried removing servlet-api.jar from the Tomcat lib directory
> and adding it as a dependency to my quickstart project, but it does not
> work since Tomcat itself fails to start in this case.
>
> My JDK version is 11.0.1.
>
> What am I doing wrong?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: module error

2022-02-20 Thread Martin Grigorov
Hi Jon,

Once you link your ASF account with your GitHub account please read our
"How to release" document -
https://wicket.apache.org/contribute/release.html. It is a bit outdated it
seems.

 I'd let Andrea del Bene make a release. Or at least work closely with him
for my first attempt to release.

On Mon, Feb 21, 2022, 05:12 Locke, Jonathan (Luo Shibo) <
jonath...@telenav.com> wrote:

> Hi Martin,
>
> I have access to my account now, but I get this when I try to push a new
> branch rel/wicket-9.8.1
>
> wicket: remote: Permission to apache/wicket.git denied to jonathanlocke.
> unable to access 'https://github.com/apache/wicket.git/': The requested
> URL returned error: 403
>
> Can someone give me push access?
>
>    Jon
>
> 
> From: Martin Grigorov 
> Sent: Sunday, February 20, 2022 5:58 PM
> To: users@wicket.apache.org 
> Subject: Re: module error
>
> You are still a member of the team -
> https://home.apache.org/phonebook.html?uid=jonl
>
> If your login was disabled your id would appear scratched at
> https://home.apache.org/phonebook.html?pmc=wicket
>
> I guess you have forgotten your ID and/or associated email and/or password.
> The quickest way to start using again your account is to contact Infra team
> at JIRA.
>
>
> Once you have access to your Apache account you should go to
> https://gitbox.apache.org/setup/ to link it with your GitHub account.
>
>
>
> On Sun, Feb 20, 2022, 08:00 Locke, Jonathan (Luo Shibo) <
> jonath...@telenav.com> wrote:
>
> > Yes, I checked. I don't.
> > 
> > From: Maxim Solodovnik 
> > Sent: Saturday, February 19, 2022 8:11 PM
> > To: users@wicket.apache.org 
> > Subject: Re: module error
> >
> > from mobile (sorry for typos ;)
> >
> >
> > On Sun, Feb 20, 2022, 02:41 Locke, Jonathan (Luo Shibo) <
> > jonath...@telenav.com> wrote:
> >
> > > I don't think I'm a committer anymore. It's been at least a decade
> since
> > > my last commit.
> > >
> >
> > Commitership shouldn't be dropped due to inactivity
> >
> > Can you check if you have your github login at id.apache.org ?
> >
> >
> > I'm amazed that wicket is still going strong. In two years it will be 20
> > > years of Wicket.
> > >
> > >Jon
> > >
> > > 
> > > From: Maxim Solodovnik 
> > > Sent: Saturday, February 19, 2022 5:57 AM
> > > To: users@wicket.apache.org 
> > > Subject: Re: module error
> > >
> > > from mobile (sorry for typos ;)
> > >
> > >
> > > On Sat, Feb 19, 2022, 19:20 Ernesto Reinaldo Barreiro <
> > reier...@gmail.com>
> > > wrote:
> > >
> > > > No if you are a committer :-)
> > > >
> > >
> > > Commiter will never see 403 :)
> > >
> > > >
> > > > On Fri, Feb 18, 2022 at 11:44 PM Maxim Solodovnik <
> > solomax...@gmail.com>
> > > > wrote:
> > > >
> > > > > On Sat, 19 Feb 2022 at 03:04, Locke, Jonathan (Luo Shibo) <
> > > > > jonath...@telenav.com> wrote:
> > > > >
> > > > > > Hi Martin,
> > > > > >
> > > > > > I was able to fix the problem as you suggested by adding:
> > > > > >
> > > > > > uses org.apache.wicket.IInitializer;
> > > > > >
> > > > > > to
> > >
> >
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmodule-info.java=E,1,WO4T_dAL8ww57jzExgL1QE2YUg9PSzf2JkCUtz233hgGolAnoaigRG7sFCy0R4-qUwC5-Hx7dj3RPzsVYEU2af8Pfa75fVWyNkUJcZk3X0YerNK-FcxQ=1
> > > in wicket-core. I created a pull request, but got
> > > > an
> > > > > > error trying to push it in IntelliJ:
> > > > > >
> > > > > > Can't create a new pull request: Push failed: remote: Permission
> to
> > > > > > apache/wicket.git denied to jonathanlocke. unable to access '
> > > > > > https://github.com/apache/wicket.git/': The requested URL
> returned
> > > > > error:
> > > > > > 403
> > > > > >
> > > > >
> > > > > You need to fork the repo first :)
> > > > >
> > > > >
> > > > > >
> > > > > > Could we add this as a patch release to wicket 9.8.x?
> > > > > >
> > > > > > Thanks,
> > > > > >
&

Re: module error

2022-02-20 Thread Martin Grigorov
You are still a member of the team -
https://home.apache.org/phonebook.html?uid=jonl

If your login was disabled your id would appear scratched at
https://home.apache.org/phonebook.html?pmc=wicket

I guess you have forgotten your ID and/or associated email and/or password.
The quickest way to start using again your account is to contact Infra team
at JIRA.


Once you have access to your Apache account you should go to
https://gitbox.apache.org/setup/ to link it with your GitHub account.



On Sun, Feb 20, 2022, 08:00 Locke, Jonathan (Luo Shibo) <
jonath...@telenav.com> wrote:

> Yes, I checked. I don't.
> 
> From: Maxim Solodovnik 
> Sent: Saturday, February 19, 2022 8:11 PM
> To: users@wicket.apache.org 
> Subject: Re: module error
>
> from mobile (sorry for typos ;)
>
>
> On Sun, Feb 20, 2022, 02:41 Locke, Jonathan (Luo Shibo) <
> jonath...@telenav.com> wrote:
>
> > I don't think I'm a committer anymore. It's been at least a decade since
> > my last commit.
> >
>
> Commitership shouldn't be dropped due to inactivity
>
> Can you check if you have your github login at id.apache.org ?
>
>
> I'm amazed that wicket is still going strong. In two years it will be 20
> > years of Wicket.
> >
> >Jon
> >
> > 
> > From: Maxim Solodovnik 
> > Sent: Saturday, February 19, 2022 5:57 AM
> > To: users@wicket.apache.org 
> > Subject: Re: module error
> >
> > from mobile (sorry for typos ;)
> >
> >
> > On Sat, Feb 19, 2022, 19:20 Ernesto Reinaldo Barreiro <
> reier...@gmail.com>
> > wrote:
> >
> > > No if you are a committer :-)
> > >
> >
> > Commiter will never see 403 :)
> >
> > >
> > > On Fri, Feb 18, 2022 at 11:44 PM Maxim Solodovnik <
> solomax...@gmail.com>
> > > wrote:
> > >
> > > > On Sat, 19 Feb 2022 at 03:04, Locke, Jonathan (Luo Shibo) <
> > > > jonath...@telenav.com> wrote:
> > > >
> > > > > Hi Martin,
> > > > >
> > > > > I was able to fix the problem as you suggested by adding:
> > > > >
> > > > > uses org.apache.wicket.IInitializer;
> > > > >
> > > > > to
> >
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fmodule-info.java=E,1,WO4T_dAL8ww57jzExgL1QE2YUg9PSzf2JkCUtz233hgGolAnoaigRG7sFCy0R4-qUwC5-Hx7dj3RPzsVYEU2af8Pfa75fVWyNkUJcZk3X0YerNK-FcxQ=1
> > in wicket-core. I created a pull request, but got
> > > an
> > > > > error trying to push it in IntelliJ:
> > > > >
> > > > > Can't create a new pull request: Push failed: remote: Permission to
> > > > > apache/wicket.git denied to jonathanlocke. unable to access '
> > > > > https://github.com/apache/wicket.git/': The requested URL returned
> > > > error:
> > > > > 403
> > > > >
> > > >
> > > > You need to fork the repo first :)
> > > >
> > > >
> > > > >
> > > > > Could we add this as a patch release to wicket 9.8.x?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Jon
> > > > > 
> > > > > From: Martin Grigorov 
> > > > > Sent: Friday, February 18, 2022 2:55 AM
> > > > > To: users@wicket.apache.org 
> > > > > Subject: Re: module error
> > > > >
> > > > > Hm.
> > > > > Looking at https://github.com/qos-ch/logback/commit/5186d2604b460f
> I
> > > > think
> > > > > we need the 'uses' only in the module where we call
> > > ServiceLoader.load(),
> > > > > i.e. in wicket-core.
> > > > >
> > > > > On Fri, Feb 18, 2022 at 11:53 AM Martin Grigorov <
> > mgrigo...@apache.org
> > > >
> > > > > wrote:
> > > > >
> > > > > > Hi Jon,
> > > > > >
> > > > > > According to
> > > > > >
> > > > >
> > > >
> > >
> >
> https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.oracle.com%2fcorporate%2ffeatures%2funderstanding-java-9-modules.html=E,1,AlcuJddqQ1zhtdsihzDbje23huNpDs6zcgn19JZMXP_Y1UGGpZLts-DudDYPcu75JyHkjFHLNGJw3KmnkhBiyTndIjuRNCIVCuhKfLjxxCsCSVE,=1
> > > > > >
> > > > > > *provides…with.* A provides…with module directive specifies that
> a
> > > > m

Re: module error

2022-02-18 Thread Martin Grigorov
Hm.
Looking at https://github.com/qos-ch/logback/commit/5186d2604b460f I think
we need the 'uses' only in the module where we call ServiceLoader.load(),
i.e. in wicket-core.

On Fri, Feb 18, 2022 at 11:53 AM Martin Grigorov 
wrote:

> Hi Jon,
>
> According to
> https://www.oracle.com/corporate/features/understanding-java-9-modules.html
>
> *provides…with.* A provides…with module directive specifies that a module
> provides a service implementation—making the module a *service provider*.
> The provides part of the directive specifies an interface or abstract
> class listed in a module’s uses directive and the with part of the
> directive specifies the name of the service provider class that implements
> the interface or extends the abstract class.
>
> AFAIU it we need to add "uses org.apache.wicket.IInitializer" next to all
> "provides org.apache.wicket.IInitializer with x.y.z.SomeImplementation;"
>
> Please try it and if it fixes the issue then send a PR!
>
> On Thu, Feb 17, 2022 at 8:16 PM Locke, Jonathan (Luo Shibo) <
> jonath...@telenav.com> wrote:
>
>>
>> Does anyone know what this is? Thanks -- Jon
>>
>> Exception in thread "main" java.util.ServiceConfigurationError:
>> org.apache.wicket.IInitializer: module org.apache.wicket.core does not
>> declare `uses`
>> at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
>> at java.base/java.util.ServiceLoader.checkCaller(ServiceLoader.java:575)
>> at java.base/java.util.ServiceLoader.(ServiceLoader.java:504)
>> at java.base/java.util.ServiceLoader.load(ServiceLoader.java:1687)
>> at org.apache.wicket.core@9.6.0
>> /org.apache.wicket.Application.initInitializers(Application.java:556)
>> at org.apache.wicket.core@9.6.0
>> /org.apache.wicket.Application.initApplication(Application.java:765)
>> at org.apache.wicket.core@9.6.0
>> /org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:441)
>> at org.apache.wicket.core@9.6.0
>> /org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:365)
>>
>>


Re: module error

2022-02-18 Thread Martin Grigorov
Hi Jon,

According to
https://www.oracle.com/corporate/features/understanding-java-9-modules.html

*provides…with.* A provides…with module directive specifies that a module
provides a service implementation—making the module a *service provider*.
The provides part of the directive specifies an interface or abstract class
listed in a module’s uses directive and the with part of the directive
specifies the name of the service provider class that implements the
interface or extends the abstract class.

AFAIU it we need to add "uses org.apache.wicket.IInitializer" next to all
"provides org.apache.wicket.IInitializer with x.y.z.SomeImplementation;"

Please try it and if it fixes the issue then send a PR!

On Thu, Feb 17, 2022 at 8:16 PM Locke, Jonathan (Luo Shibo) <
jonath...@telenav.com> wrote:

>
> Does anyone know what this is? Thanks -- Jon
>
> Exception in thread "main" java.util.ServiceConfigurationError:
> org.apache.wicket.IInitializer: module org.apache.wicket.core does not
> declare `uses`
> at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:589)
> at java.base/java.util.ServiceLoader.checkCaller(ServiceLoader.java:575)
> at java.base/java.util.ServiceLoader.(ServiceLoader.java:504)
> at java.base/java.util.ServiceLoader.load(ServiceLoader.java:1687)
> at org.apache.wicket.core@9.6.0
> /org.apache.wicket.Application.initInitializers(Application.java:556)
> at org.apache.wicket.core@9.6.0
> /org.apache.wicket.Application.initApplication(Application.java:765)
> at org.apache.wicket.core@9.6.0
> /org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:441)
> at org.apache.wicket.core@9.6.0
> /org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:365)
>
>


Re: servlet api "BigBang"

2022-02-02 Thread Martin Grigorov
Hi Jon,

On Wed, Feb 2, 2022 at 10:10 PM Locke, Jonathan (Luo Shibo) <
jonath...@telenav.com> wrote:

> If the community likes the idea, it would be possible to migrate Wicket to
> KivaKit logging (and status messaging).
>

Wicket uses just slf4j-api, the facade.
The applications decide which implementation to use: Logback, Log4j 1/2, ...
Moving from slf4j-api to Kivakit would break all applications.
The better way would be Kivakit to provide implementation of SLF4J APIs. I
am not sure whether this will somehow reduce Kivakit's logging capabilities
though.



>
> https://state-of-the-art.org/2021/08/17/logging.html
>
> https://medium.com/@jonathanlocke/why-messaging-is-a-better-way-to-report-status-2badb679345e
>
> KivaKit is a very Wicket-like way to do microservices, but you can consume
> just pieces of it easily. Everything you'd need to do messaging and logging
> is in the module  kivakit-kernel (although there are some additional
> loggers like EmailLogger in kivakit-extensions). Let me know if people are
> interested in trying this out on a branch and I'd be happy to help out.
>
> Best,
>
>    Jon
>
> 
> From: Martin Grigorov 
> Sent: Wednesday, February 2, 2022 12:15 PM
> To: users@wicket.apache.org 
> Subject: Re: servlet api "BigBang"
>
> Hi,
>
> On Wed, Feb 2, 2022 at 4:59 PM Tobias Haupt 
> wrote:
>
> > We are using wicket for several projects and are piece by piece
> > migrating to wicket 9.
> > In all of these projects we use logback as logging adapter. Since
> > version 9.x wicket requires version 2.0.0.alpha[x] of slfj.
> > Logback provides releases starting with version 1.3.0-alpha compatible
> > with slfj 2.0.0.alpha. The Problem is that the new version is built
> > against the "new" servlet-api 5.0 only. There all the javax. namespaces
> > are renamed to jakarta. This makes logback unasable for a lot of
> > applications that still run in older Containers (Tomcat 9 etc.). The
> > people at logback are aware of that problem: see issue LOGBACK-1575.
> >
> > Question: is there a hard requirement to update the dependency of wicket
> > to slfi to 2.0.0 especially as these releases are still tagged as alpha?
> > Wouldn't it be better for wicket to stay at 1.x (eg. 1.7.35) as long as
> > possible?
> >
>
> Wicket moved to 2.0.0-alpha because SLF4J 2.x is module-rized (JPMS) and
> Wicket too since 9.5.0.
> You can tell Maven to use 1.7.x in your application. The APIs are the same
> so it should work.
>
>
>
> >
> > kind regards,
> > Tobias
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> [EXTERNAL EMAIL] CAUTION: This email originated from outside of Telenav.
> DO NOT CLICK links or attachments unless you recognize the sender and know
> the content is safe.
>


Re: servlet api "BigBang"

2022-02-02 Thread Martin Grigorov
Hi,

On Wed, Feb 2, 2022 at 4:59 PM Tobias Haupt  wrote:

> We are using wicket for several projects and are piece by piece
> migrating to wicket 9.
> In all of these projects we use logback as logging adapter. Since
> version 9.x wicket requires version 2.0.0.alpha[x] of slfj.
> Logback provides releases starting with version 1.3.0-alpha compatible
> with slfj 2.0.0.alpha. The Problem is that the new version is built
> against the "new" servlet-api 5.0 only. There all the javax. namespaces
> are renamed to jakarta. This makes logback unasable for a lot of
> applications that still run in older Containers (Tomcat 9 etc.). The
> people at logback are aware of that problem: see issue LOGBACK-1575.
>
> Question: is there a hard requirement to update the dependency of wicket
> to slfi to 2.0.0 especially as these releases are still tagged as alpha?
> Wouldn't it be better for wicket to stay at 1.x (eg. 1.7.35) as long as
> possible?
>

Wicket moved to 2.0.0-alpha because SLF4J 2.x is module-rized (JPMS) and
Wicket too since 9.5.0.
You can tell Maven to use 1.7.x in your application. The APIs are the same
so it should work.



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


Re: Indicator on IndicatingAjaxButton and IndicatingAjaxLink not working

2022-01-24 Thread Martin Grigorov
Hi,

On Tue, Jan 25, 2022 at 5:00 AM Michelle Ee Siew Phing <
michelle...@mcruncher.com> wrote:

> Hi,
> Saw the update on this and thanks for fixing it.
> May I know when will 9.8.0 be available? Or will the fix be backported to
>

Soon, but we don't have a specific date yet.


> an older version?
>

No. We do not support older versions like 9.7.1 or 9.4.1.
We support latest versions of 8.x and 9.x, but this fix is needed only for
9.x (and 10.x, but it is not released yet).
You could test the fix by:
1) using 9.8.0-SNAPSHOT - add
https://github.com/apache/wicket/blob/4ad5354a2a1baca55504c7ae4c3f794ddf609620/archetypes/quickstart/src/main/resources/archetype-resources/pom.xml#L179-L190
to your application
2) build Wicket 9.x locally


> Thanks again.
>
> On Fri, Jan 21, 2022 at 2:36 PM Michelle Ee Siew Phing <
> michelle...@mcruncher.com> wrote:
>
> > I have created an issue for this.
> > https://issues.apache.org/jira/browse/WICKET-6947
> >
> > On Fri, Jan 21, 2022 at 11:45 AM Michelle Ee Siew Phing <
> > michelle...@mcruncher.com> wrote:
> >
> >> Hi,
> >> Yep, tried the SpinnerButton and it works.
> >> /Michelle
> >>
> >> On Fri, Jan 21, 2022 at 11:00 AM Maxim Solodovnik  >
> >> wrote:
> >>
> >>> Have you tried the SpinnerButton from wicket-bootstrap?
> >>>
> >>> Does it work for you?
> >>>
> >>> from mobile (sorry for typos ;)
> >>>
> >>>
> >>> On Fri, Jan 21, 2022, 08:49 Michelle Ee Siew Phing <
> >>> michelle...@mcruncher.com> wrote:
> >>>
> >>> > Sorry... missed out the wicket.bootstrap.version
> >>> >
> >>> > 5.0.5
> >>> >
> >>> > On Fri, Jan 21, 2022 at 9:35 AM Michelle Ee Siew Phing <
> >>> > michelle...@mcruncher.com> wrote:
> >>> >
> >>> >> Hi,
> >>> >>
> >>> >> Checking the examples again... the "hidden" is not removed after
> >>> clicking
> >>> >> on the button, but the style="display:inline" is appended.
> >>> >> [image: Screenshot from 2022-01-21 09-04-51.png]
> >>> >>
> >>> >> I think this would pose an issue with any .css that has the
> following
> >>> >> [hidden] {
> >>> >>
> >>> >>1. display: none !important;
> >>> >>
> >>> >> }
> >>> >> Attached herewith the demo using the wicket quickstart
> >>> >>  wicket-test-1.0-SNAPSHOT.war
> >>> >> <
> >>>
> https://drive.google.com/file/d/1KM6Trg4NbcLHnH3pK8nx8S1PU4-L41Bd/view?usp=drive_web
> >>> >
> >>> >>
> >>> >> In the quick start codes, I've added
> >>> >> 1. the required dependencies [pom.xml]
> >>> >> 
> >>> >> de.agilecoders.wicket
> >>> >> wicket-bootstrap-core
> >>> >> ${wicket.bootstrap.version}
> >>> >> 
> >>> >>
> >>> >> 
> >>> >> de.agilecoders.wicket
> >>> >> wicket-bootstrap-extensions
> >>> >> ${wicket.bootstrap.version}
> >>> >> 
> >>> >>
> >>> >> 2. added BootstrapSettings [WicketApplication.java]
> >>> >> BootstrapSettings settings = new BootstrapSettings();
> >>> >> Bootstrap.install(this, settings);
> >>> >>
> >>> >> 3. added necessary html elements
> >>> >> [HomePage.html]
> >>> >> 
> >>> >> Test Indicating Ajax Button
> >>> >> 
> >>> >> 
> >>> >>
> >>> >> [HomePage.java]
> >>> >> private Form addForm()
> >>> >> {
> >>> >> Form testForm = new Form("form");
> >>> >> testForm.add(addTestButton(testForm));
> >>> >> return testForm;
> >>> >> }
> >>> >>
> >>> >> private AjaxButton addTestButton(Form form)
> >>> >> {
> >>> >> return new IndicatingAjaxButton("testButton",
> Model.of("Sleep
> >>> for
> >>> >> a while"), form)
> >&g

Re: OAuth authentication

2022-01-18 Thread Martin Grigorov
Hi,

You could use any OAuth library you like.
The idea is:
- when an unauthenticated user requests a secured page Wicket should
redirect to the login page
- that logic page is not managed by Wicket but by your preferred OAuth
library
- in the callback from the OAuth library you should save the data in your
WebSession, e.g. principal, roles, etc. which you should use later for
authorization

On Wed, Jan 19, 2022 at 12:39 AM Boris Goldowsky 
wrote:

> What is the current best practice for allowing users to sign in to a
> Wicket application using an OAuth2 provider (eg Google account, Twitter,
> Canvas, etc).
>
>   *   Is Apache Shiro a possibility?  Looks like it’s got some Wicket
> integration, but OAuth2 is listed as “coming”.
>   *   PicketLink?
>   *   Something from https://oauth.net/code/java/ ?
>
> Anyone with a working implementation care to give some pointers?
>
> Looks like there may have been some discussion of this 10 years ago on
> this list, but not more recently that I can find.
>
> Thank you!
>
> Boris
>
>


Re: Indicator on IndicatingAjaxButton and IndicatingAjaxLink not working

2022-01-16 Thread Martin Grigorov
Hi,

Please check https://examples9x.wicket.apache.org/ajax/links.
The third link demostrates usage of IndicatingAjaxLink.
When clicked it adds style="display:inline" and removes "hidden".
Its source code could be found at
https://github.com/apache/wicket/blob/63c5fe205de1bea293e3b36ca8e0426b343ccafa/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/LinksPage.java
Please compare it with your app!
If you are not able to find the problem then please create a mini demo
application and share it with us!

On Mon, Jan 17, 2022 at 6:08 AM Michelle Ee Siew Phing <
michelle...@mcruncher.com> wrote:

> Hi,
>
> I am having issues with the loading icon on the IndicatingAjaxButton and
> IndicatingAjaxLink. Previously I'm on Wicket 9.0.0-M4 and it was working
> fine. But after upgrading to Wicket 9.0.0-M5 (and later versions), I'm not
> able to see the loading icon any longer.
>
> I checked further in the code that the AjaxIndicatorAppender now has the
> hidden attribute instead of the style=display:none. However, when I click
> the IndicatingAjaxButton, it will still append the style=display:inline as
> before (but due to the hidden attribute, the icon will not show).
>
> Is there anything else during the upgrade that I needed for the
> IndicatingAjaxButton (and link) to work?
> Please advise.
>
> Thank you. Regards.
> Michelle
>


Re: Convert to science Number

2022-01-11 Thread Martin Grigorov
On Wed, Jan 12, 2022 at 8:21 AM vahid ghasemi 
wrote:

> This is my sample code :
>
> add(new TextField<>("grossWeightInKg", new IModel() {
>
> @Override
> public String getObject() {
> return flightConsignment.getGrossWeightInKg() == null ? "" :
> flightConsignment.getGrossWeightInKg().toString();
>

It is not Wicket but your code ^^
You may want to check java.text.NumberFormat and java.text.DecimalFormat


> }
> ...
> }
>
> weightInKg is Double(not double).
>
>
> On Tue, Jan 11, 2022 at 12:03 PM Martin Terra <
> martin.te...@koodaripalvelut.com> wrote:
>
> > Also, are you using a BigDecimal or arbitrary floating point numbers
> > <https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html>? Big
> > decimals should have a built in converter.
> >
> > **
> > Martin
> >
> > ti 11. tammik. 2022 klo 10.26 Martin Grigorov (mgrigo...@apache.org)
> > kirjoitti:
> >
> > > Please give more details
> > >
> > > On Tue, Jan 11, 2022 at 9:10 AM vahid ghasemi <
> vahidghasemi...@gmail.com
> > >
> > > wrote:
> > >
> > > > Hello,
> > > > In wicket, the number above from 10E7 will convert to science number
> in
> > > > input.
> > > > How can I prevent that?
> > > >
> > >
> >
>


Re: [DISCUSSION] drop wicketstuff-jwicket-ui*

2022-01-11 Thread Martin Grigorov
+1 to drop them !

On Wed, Jan 12, 2022 at 8:19 AM Maxim Solodovnik 
wrote:

> Hello All,
>
> I've just noticed:
>
> wicketstuff-jwicket-ui-datepicker
> Contains `jQuery UI Datepicker 1.10.3` ( more than 160 js/css files)
> wicketstuff-jwicket-ui-tooltip
> Contains `jQuery UI Tooltip 1.10.3`
>
> wicketstuff-jwicket-ui-accordion
> wicketstuff-jwicket-ui-dragdrop
> wicketstuff-jwicket-ui-effects
> wicketstuff-jwicket-ui-menu
> wicketstuff-jwicket-ui-resize
> wicketstuff-jwicket-ui-sort
>   Contains `jQuery UI * 1.8.6`
>
> these components seems to very much outdated
> maybe we can drop them?
>
>
> --
> Best regards,
> Maxim
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Convert to science Number

2022-01-11 Thread Martin Grigorov
Please give more details

On Tue, Jan 11, 2022 at 9:10 AM vahid ghasemi 
wrote:

> Hello,
> In wicket, the number above from 10E7 will convert to science number in
> input.
> How can I prevent that?
>


Re: version of java

2022-01-04 Thread Martin Grigorov
On Wed, Jan 5, 2022 at 9:26 AM vahid ghasemi 
wrote:

> We are using wicket 8
> Is it a bad idea to get java 17 with wicket 8?
>

I am not sure! I haven't tried!
Try it and if there are problems then upgrade to Wicket 9.7.0!


>
> On Wed, Jan 5, 2022 at 9:23 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > Wicket 9.x is regularly tested with Java 11 & 17!
> > We are not aware of any issues!
> >
> > On Wed, Jan 5, 2022 at 7:34 AM vahid ghasemi 
> > wrote:
> >
> > > Hello.
> > > What version of wicket can support the latest LTS version of java(17)?
> > >
> >
>


Re: version of java

2022-01-04 Thread Martin Grigorov
Hi,

Wicket 9.x is regularly tested with Java 11 & 17!
We are not aware of any issues!

On Wed, Jan 5, 2022 at 7:34 AM vahid ghasemi 
wrote:

> Hello.
> What version of wicket can support the latest LTS version of java(17)?
>


Re: Spring Boot Circular reference error

2021-12-12 Thread Martin Grigorov
Hi,

I think there is no release of Wicket-Spring-Boot-Starter for Spring Boot
2.6.
Maybe you have both 2.5.x and 2.6.1 on the classpath. Check with "mvn
dependency:tree"

On Sun, Dec 12, 2021, 09:03 Pranav Kacholia 
wrote:

> Hi,
>
> I started the same app with spring boot version 2.5.7 and it works fine.
> If I change it to 2.6.1 it fails with the above.
>
> On Sat, 11 Dec, 2021, 7:45 pm Andrea Del Bene, 
> wrote:
>
> > Hi,
> >
> > I've recently started a new project with wicket-spring-boot-starter and
> > wicket 9.7.0 and everything is fine. I would blame your dependencies on
> > spring-boot-starter-web and spring-boot-starter-test. I don't have them
> > in my pom and I don't think you need them. Try to remove them to see if
> > StockyApplication starts up.
> >
> > On 11/12/21 11:10, Pranav Kacholia wrote:
> > > HI,
> > >
> > > I am trying to start a new spring boot project with wicket.
> > > Even with no dependencies added and only a basic home page i am facing
> > > errors.
> > >
> > > My POM file:-
> > >
> > > 
> > > 
> > > org.springframework.boot
> > > spring-boot-starter-web
> > > 
> > >
> > > 
> > > org.springframework.boot
> > > spring-boot-starter-test
> > > test
> > > 
> > > 
> > > com.giffing.wicket.spring.boot.starter
> > > wicket-spring-boot-starter
> > > 3.0.4
> > > 
> > > 
> > >
> > >
> > > Application class:
> > >
> > > package com.stocky;
> > >
> > > import org.springframework.boot.SpringApplication;
> > > import org.springframework.boot.autoconfigure.SpringBootApplication;
> > >
> > > @SpringBootApplication
> > > public class StockyApplication {
> > >
> > > public static void main(String[] args) {
> > > SpringApplication.run(StockyApplication.class, args);
> > > }
> > >
> > > }
> > >
> > >
> > > Home Page Class
> > >
> > > package com.stocky;
> > >
> > > import org.apache.wicket.markup.html.WebPage;
> > >
> > > import com.giffing.wicket.spring.boot.context.scan.WicketHomePage;
> > >
> > > @WicketHomePage
> > > public class HomePage extends WebPage{
> > >
> > > }
> > >
> > >
> > > I am getting the following error.
> > >
> > > [INFO] Attaching agents: []
> > >
> > >.     ___ _ _
> > >   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
> > > ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> > >   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
> > >'  || .__|_| |_|_| |_\__, | / / / /
> > >   =|_|==|___/=/_/_/_/
> > >   :: Spring Boot ::(v2.6.1)
> > >
> > > 2021-12-11 15:33:45.814  INFO 6540 --- [   main]
> > > com.stocky.StockyApplication : Starting StockyApplication
> > using
> > > Java 17.0.1 on DESKTOP-CS8GGG8 with PID 6540 (C:\Users\Pranav
> > > Kacholia\eclipse-workspace\Stocky\target\classes started by Pranav
> > Kacholia
> > > in C:\Users\Pranav Kacholia\eclipse-workspace\Stocky)
> > > 2021-12-11 15:33:45.817  INFO 6540 --- [   main]
> > > com.stocky.StockyApplication : No active profile set,
> falling
> > > back to default profiles: default
> > > 2021-12-11 15:33:46.990  INFO 6540 --- [   main]
> > > o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with
> > port(s):
> > > 8080 (http)
> > > 2021-12-11 15:33:47.003  INFO 6540 --- [   main]
> > > o.apache.catalina.core.StandardService   : Starting service [Tomcat]
> > > 2021-12-11 15:33:47.003  INFO 6540 --- [   main]
> > > org.apache.catalina.core.StandardEngine  : Starting Servlet engine:
> > [Apache
> > > Tomcat/9.0.55]
> > > 2021-12-11 15:33:47.110  INFO 6540 --- [   main]
> > > o.a.c.c.C.[Tomcat].[localhost].[/]   : Initializing Spring embedded
> > > WebApplicationContext
> > > 2021-12-11 15:33:47.110  INFO 6540 --- [   main]
> > > w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
> > > initialization completed in 1231 ms
> > > 2021-12-11 15:33:47.251 ERROR 6540 --- [   main]
> > > o.a.wicket.protocol.http.WicketFilter: The initialization of an
> > > application with name 'wicket-filter' has failed.
> > >
> > > org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> > > creating bean with name 'wicketBootWebApplication': Unsatisfied
> > dependency
> > > expressed through field 'configurations'; nested exception is
> > > org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> > > creating bean with name 'wicketextensionApplicationSettingsConfig':
> > > Unsatisfied dependency expressed through field 'holder'; nested
> exception
> > > is org.springframework.beans.factory.BeanCreationException: Error
> > creating
> > > bean with name
> > >
> >
> 'com.giffing.wicket.spring.boot.starter.app.classscanner.ClassCandidateScanner':
> > > Invocation of init method failed; nested exception is
> > > org.springframework.beans.factory.BeanCurrentlyInCreationException:
> Error
> > > creating bean with name
> > >
> >
> 'com.giffing.wicket.spring.boot.starter.app.classscanner.ClassCandidateScanner':
> > > Requested bean is currently 

Re: wicket clickable image with tooltips map

2021-11-04 Thread Martin Grigorov
Hi,

I am not sure how useful it could be for your use case but Wicket also
provides org/apache/wicket/markup/html/link/ClientSideImageMap.java

Demo: https://examples9x.wicket.apache.org/linkomatic/home (the image with
rectangle, circle and triangle).
Source of the demo:
https://github.com/apache/wicket/blob/2e4ddf5621ce60e0d039afa76049040dcaa6b38d/wicket-examples/src/main/java/org/apache/wicket/examples/linkomatic/Home.java#L119-L127

On Wed, Nov 3, 2021 at 8:31 PM Sven Meier  wrote:

> Hi,
>
> the solution from the wiki keeps the buffered image in the component
> tree, that's not a good idea (probably this is why it's transient).
>
> The actual problem is, that all markup (including your refreshingView)
> is rendered first. Then the browser pulls the image data in a second
> request.
>
> Simplest solution is to render twice, once just to get the
> ChartRenderingInfo, and a second time for the actual request for the
> image data.
>
> Another possibility is to:
>
> - leave the area list empty at first
> - render the chart image in the dynamic resource *and* keep the
> ChartRenderingInfo in an instance variable (non-transient)
> - have an AjaxEventBehavior("load") on the image, which re-renders the
> refreshingView and updates the area with the kept ChartRenderingInfo
>
> Have fun
> Sven
>
>
> On 03.11.21 18:38, C.S. wrote:
> > Dear wicket developers,
> >
> > i try to integrate wicket with jfreechart. Wicket wiki contains an
> example
> > under
> >
> https://cwiki.apache.org/confluence/display/WICKET/JFreeChart+with+clickable+imagemap
> > but this code is 11 yrs old and does not work with current versions.
> >
> > Speaking of versions: i must stick with jdk 1.8, which means i cannot
> > upgrade to wicket 9+
> > Using wicket version 8.12.0
> >
> > Goal is to create a usemap list to an image, so image is clickable
> > (contains tooltips).
> > For image i use a NonCachingImage and for the usemap i use a
> RefreshingView.
> >
> > Trouble is, when the RefreshingView renders, the image has no rendering
> > info yet. So the RefreshingView model is empty. Image creates its
> rendering
> > info very late - during onRequest(). RefreshingView is rendered long ago
> at
> > this time.
> >
> > I tried to create the image rendering info before rendering the
> > RefreshingView.
> > This is how it works in the old wiki example. Unfortunately, the new
> > versions throw a StackOverflowException. During Serialization, some
> > JFreeChart methods interact with some Wicket serialization methods. They
> > call each other (via reflexion) some 100s of times until StackOverflow
> > occurs.
> >
> > What would you suggest? Is there a way to refresh the RefreshingView
> > without ajax?
> > Or somehow render the RefreshingView after the image produced its
> rendering
> > info?
> > Or should i use different wicket components? Or wrap/enclose these
> > components under another component (which one? ).
> >
> > Thank you for your help
> >
> > Christos Stieglitz
> >
> > My code:
> >
> > HTML:
> > 
> > 
> >
> > 
> >
> > Java:
> > RefreshingView mapAreas = new RefreshingView<>("area") {
> >@Override
> >protected Iterator> getItemModels() {
> >  ...
> >  // This is called during onRender(). List model is empty
> >  return models.iterator();
> >}
> >
> >@Override
> >protected void populateItem(Item item) {
> >  ChartEntity entity = item.getModelObject();
> >  item.add(new AttributeAppender("shape", entity.getShapeType()));
> >  item.add(new AttributeAppender("coords",
> entity.getShapeCoords()));
> >  item.add(new AttributeAppender("href", "#"));
> >  item.add(new TooltipBehavior(entity.getToolTipText()));
> >}
> >  };
> > mapAreas.setOutputMarkupId(Boolean.TRUE);
> > add(mapAreas);
> >
> > NonCachingImage ch = new NonCachingImage("livedata", Model.of(chart)) {
> >@Override
> >protected DynamicImageResource getImageResource() {
> >  return new DynamicImageResource() {
> >@Override
> >protected byte[] getImageData(IResource.Attributes
> attributes) {
> >  ChartRenderingInfo renderingInfo = new ChartRenderingInfo();
> >  // chart is a JFreeChart
> >  BufferedImage imgbytes = chart.createBufferedImage(imgwidth,
> > imgheight, renderingInfo);
> >
> >  EntityCollection entities =
> renderingInfo.getEntityCollection();
> >  // This is called very late, during onRequest().
> >  // EntityCollection contains now everything is needed,
> >  // but how to call
> >  // RefreshingView.onRender() from here?
> >  // If i put this code anywhere else i get
> > StackOverflowException.
> >  return 

Re: ContextRelativeResourceReference CSS rendering problem

2021-10-21 Thread Martin Grigorov
Hi,

On Thu, Oct 21, 2021 at 1:15 AM Greg Dunn  wrote:

> I'm using the following code under Wicket 9 to load a CSS file
>
>
>
> private static final ContextRelativeResourceReference CSS_FILE =
>
> new ContextRelativeResourceReference("style/cssFile.css",
> false);
>
>
>
> @Override
>
> public void renderHead(IHeaderResponse response) {
>
> response.render(CssHeaderItem.forReference(CSS_FILE));
>
> super.renderHead(response);
>
> }
>
>
>
> When the page loads the CSS is not rendered at all.  Looking at the source
> I see the link to the CSS file with a nonce as expected.  If I refresh the
> page in the browser then it renders with the CSS as expected.
>

"When the page loads the CSS is not rendered at all." -> this sounds like
the  is not rendered on the first load
"Looking at the source I see the link to the CSS file with a nonce as
expected." -> this sounds like the  is rendered properly on the
second load
"If I refresh the page in the browser then it renders with the CSS as
expected." -> on the third load it works again

So, it seems it does not work only on the first load! Correct ?

Are there any JavaScript errors in the browser console ?
Try disabling temporarily CSP. Maybe the nonce is not correct on the first
load and the browser prevents the loading.


>
>
> I would appreciate any assistance in resolving this. Thanks.
>
>


Re: About jQuery 2.2.4 vulnerability

2021-10-20 Thread Martin Grigorov
On Wed, Oct 20, 2021 at 1:34 PM Martin Grigorov 
wrote:

>
>
> On Wed, Oct 20, 2021 at 1:30 PM Martin Grigorov 
> wrote:
>
>>
>>
>> On Wed, Oct 20, 2021 at 1:21 PM Shengche Hsiao 
>> wrote:
>>
>>> Dear Martin
>>>
>>> After I applied the code, the website showed exceptions below
>>>
>>>
>>> ERROR [org.apache.wicket.DefaultExceptionMapper] (default task-2521)
>>> Unexpected error occurred: org.apache.wicket.WicketRuntimeException: An
>>> error occurred while generating an Url for handler
>>> 'ResourceReferenceRequestHandler{resourceReference=scope:
>>> org.apache.wicket.resource.JQueryResourceReference; name:
>>> jquery/jquery-2.2.4.js; locale: null; style: null; variation: null,
>>> pageParameters=}'
>>>
>>>
>>>
>>> Caused by:
>>> org.apache.wicket.request.resource.PackageResource$PackageResourceBlockedException:
>>> Access denied to (static) package resource
>>> org/apache/wicket/resource/jquery/jquery-2.2.4.js. See IPackageResourceGuard
>>>
>>
>> I think this should be a WARNING and the stacktrace should be printed
>> only if DEBUG is enabled.
>> Also the response code should be 404!
>> I will create a ticket!
>>
>
> https://issues.apache.org/jira/browse/WICKET-6928
>

I've closed the ticker because this is already implemented.
The ERROR with the stacktrace is logged only in DEV mode so that the
developer is made aware that his/her application has a ResourceReference
for a forbidden resource.

Is the scanner making the request to
https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js
?
I have the feeling your application contributes it itself in some
#renderHead() method in your components.


>
>
>>
>> You could use another solutuion - use a custom Servlet Filter that is
>> declared before WicketFilter. If the tequest is to jquery-2*.js then return
>> 404 and do not pass the request & response to the filter chain.
>>
>
> Or use IRequestCycleListener and do the above in its #onException()
>
>
>>
>>
>>>
>>>
>>>
>>> From: Martin Grigorov 
>>> Date: Wednesday, October 20, 2021 at 14:34
>>> To: users@wicket.apache.org 
>>> Subject: Re: About jQuery 2.2.4 vulnerability
>>> You could use SecurePackageResourceGuard to forbid access to a resource.
>>> In YourApplication#init():
>>>
>>> SecurePackageResourceGuard guard = (SecurePackageResourceGuard)
>>> getResourceSettings().getPackageResourceGuard();
>>> guard.addPattern("-**/jquery-2*.js");
>>>
>>> On Wed, Oct 20, 2021 at 9:25 AM Shengche Hsiao 
>>> wrote:
>>>
>>> > Dear Martin
>>> >
>>> > I actually configured with jQuery version 3 on Application, and on
>>> browser
>>> > console showed jquery version with 3.6.0. But the scanner still find
>>> this
>>> > url [
>>> >
>>> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js
>>> ]<
>>> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js%5d
>>> >
>>> > appears. I know this resource is generated automatically by Wicket
>>> 8.13.0
>>> > (our project), and I don’t want this url resource be retrieved by
>>> scanner.
>>> > How to do that?
>>> >
>>> >
>>> > From: Martin Grigorov 
>>> > Date: Wednesday, October 20, 2021 at 14:17
>>> > To: users@wicket.apache.org 
>>> > Subject: Re: About jQuery 2.2.4 vulnerability
>>> > Hi,
>>> >
>>> > On Wed, Oct 20, 2021 at 5:46 AM Shengche Hsiao <
>>> shengchehs...@gmail.com>
>>> > wrote:
>>> >
>>> > > Dear All
>>> > >
>>> > > Recently, our website made a vulnerability scanning. The report shows
>>> > >
>>> >
>>> [/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-
>>> > > 6233386130326534.js] as a vulnerability library. How do I disallow
>>> output
>>> > > this jquery version to avoid scan?
>>> > >
>>> >
>>> > I don't understand your question. Please re-phrase if the following
>>> does
>>> > not help you!
>>> >
>>> > You can upgrade jQuery by adding such code to YourApplication#init():
>>> >
>>> > getJavaScriptLibrarySettings().setJQueryReference(new
>>> > JavaScriptResourceReference(MyClass.class, "jquery-x.y.z.js"));
>>> > you could
>>> > use org.apache.wicket.resource.JQueryResourceReference#INSTANCE_3, for
>>> > example
>>> >
>>> >
>>> > >
>>> > > Thanks
>>> > >
>>> >
>>>
>>


Re: About jQuery 2.2.4 vulnerability

2021-10-20 Thread Martin Grigorov
On Wed, Oct 20, 2021 at 1:30 PM Martin Grigorov 
wrote:

>
>
> On Wed, Oct 20, 2021 at 1:21 PM Shengche Hsiao 
> wrote:
>
>> Dear Martin
>>
>> After I applied the code, the website showed exceptions below
>>
>>
>> ERROR [org.apache.wicket.DefaultExceptionMapper] (default task-2521)
>> Unexpected error occurred: org.apache.wicket.WicketRuntimeException: An
>> error occurred while generating an Url for handler
>> 'ResourceReferenceRequestHandler{resourceReference=scope:
>> org.apache.wicket.resource.JQueryResourceReference; name:
>> jquery/jquery-2.2.4.js; locale: null; style: null; variation: null,
>> pageParameters=}'
>>
>>
>>
>> Caused by:
>> org.apache.wicket.request.resource.PackageResource$PackageResourceBlockedException:
>> Access denied to (static) package resource
>> org/apache/wicket/resource/jquery/jquery-2.2.4.js. See IPackageResourceGuard
>>
>
> I think this should be a WARNING and the stacktrace should be printed only
> if DEBUG is enabled.
> Also the response code should be 404!
> I will create a ticket!
>

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


>
> You could use another solutuion - use a custom Servlet Filter that is
> declared before WicketFilter. If the tequest is to jquery-2*.js then return
> 404 and do not pass the request & response to the filter chain.
>

Or use IRequestCycleListener and do the above in its #onException()


>
>
>>
>>
>>
>> From: Martin Grigorov 
>> Date: Wednesday, October 20, 2021 at 14:34
>> To: users@wicket.apache.org 
>> Subject: Re: About jQuery 2.2.4 vulnerability
>> You could use SecurePackageResourceGuard to forbid access to a resource.
>> In YourApplication#init():
>>
>> SecurePackageResourceGuard guard = (SecurePackageResourceGuard)
>> getResourceSettings().getPackageResourceGuard();
>> guard.addPattern("-**/jquery-2*.js");
>>
>> On Wed, Oct 20, 2021 at 9:25 AM Shengche Hsiao 
>> wrote:
>>
>> > Dear Martin
>> >
>> > I actually configured with jQuery version 3 on Application, and on
>> browser
>> > console showed jquery version with 3.6.0. But the scanner still find
>> this
>> > url [
>> >
>> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js
>> ]<
>> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js%5d
>> >
>> > appears. I know this resource is generated automatically by Wicket
>> 8.13.0
>> > (our project), and I don’t want this url resource be retrieved by
>> scanner.
>> > How to do that?
>> >
>> >
>> > From: Martin Grigorov 
>> > Date: Wednesday, October 20, 2021 at 14:17
>> > To: users@wicket.apache.org 
>> > Subject: Re: About jQuery 2.2.4 vulnerability
>> > Hi,
>> >
>> > On Wed, Oct 20, 2021 at 5:46 AM Shengche Hsiao > >
>> > wrote:
>> >
>> > > Dear All
>> > >
>> > > Recently, our website made a vulnerability scanning. The report shows
>> > >
>> >
>> [/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-
>> > > 6233386130326534.js] as a vulnerability library. How do I disallow
>> output
>> > > this jquery version to avoid scan?
>> > >
>> >
>> > I don't understand your question. Please re-phrase if the following does
>> > not help you!
>> >
>> > You can upgrade jQuery by adding such code to YourApplication#init():
>> >
>> > getJavaScriptLibrarySettings().setJQueryReference(new
>> > JavaScriptResourceReference(MyClass.class, "jquery-x.y.z.js"));
>> > you could
>> > use org.apache.wicket.resource.JQueryResourceReference#INSTANCE_3, for
>> > example
>> >
>> >
>> > >
>> > > Thanks
>> > >
>> >
>>
>


Re: About jQuery 2.2.4 vulnerability

2021-10-20 Thread Martin Grigorov
On Wed, Oct 20, 2021 at 1:21 PM Shengche Hsiao 
wrote:

> Dear Martin
>
> After I applied the code, the website showed exceptions below
>
>
> ERROR [org.apache.wicket.DefaultExceptionMapper] (default task-2521)
> Unexpected error occurred: org.apache.wicket.WicketRuntimeException: An
> error occurred while generating an Url for handler
> 'ResourceReferenceRequestHandler{resourceReference=scope:
> org.apache.wicket.resource.JQueryResourceReference; name:
> jquery/jquery-2.2.4.js; locale: null; style: null; variation: null,
> pageParameters=}'
>
>
>
> Caused by:
> org.apache.wicket.request.resource.PackageResource$PackageResourceBlockedException:
> Access denied to (static) package resource
> org/apache/wicket/resource/jquery/jquery-2.2.4.js. See IPackageResourceGuard
>

I think this should be a WARNING and the stacktrace should be printed only
if DEBUG is enabled.
Also the response code should be 404!
I will create a ticket!

You could use another solutuion - use a custom Servlet Filter that is
declared before WicketFilter. If the tequest is to jquery-2*.js then return
404 and do not pass the request & response to the filter chain.


>
>
>
> From: Martin Grigorov 
> Date: Wednesday, October 20, 2021 at 14:34
> To: users@wicket.apache.org 
> Subject: Re: About jQuery 2.2.4 vulnerability
> You could use SecurePackageResourceGuard to forbid access to a resource.
> In YourApplication#init():
>
> SecurePackageResourceGuard guard = (SecurePackageResourceGuard)
> getResourceSettings().getPackageResourceGuard();
> guard.addPattern("-**/jquery-2*.js");
>
> On Wed, Oct 20, 2021 at 9:25 AM Shengche Hsiao 
> wrote:
>
> > Dear Martin
> >
> > I actually configured with jQuery version 3 on Application, and on
> browser
> > console showed jquery version with 3.6.0. But the scanner still find this
> > url [
> >
> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js
> ]<
> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js%5d
> >
> > appears. I know this resource is generated automatically by Wicket 8.13.0
> > (our project), and I don’t want this url resource be retrieved by
> scanner.
> > How to do that?
> >
> >
> > From: Martin Grigorov 
> > Date: Wednesday, October 20, 2021 at 14:17
> > To: users@wicket.apache.org 
> > Subject: Re: About jQuery 2.2.4 vulnerability
> > Hi,
> >
> > On Wed, Oct 20, 2021 at 5:46 AM Shengche Hsiao 
> > wrote:
> >
> > > Dear All
> > >
> > > Recently, our website made a vulnerability scanning. The report shows
> > >
> >
> [/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-
> > > 6233386130326534.js] as a vulnerability library. How do I disallow
> output
> > > this jquery version to avoid scan?
> > >
> >
> > I don't understand your question. Please re-phrase if the following does
> > not help you!
> >
> > You can upgrade jQuery by adding such code to YourApplication#init():
> >
> > getJavaScriptLibrarySettings().setJQueryReference(new
> > JavaScriptResourceReference(MyClass.class, "jquery-x.y.z.js"));
> > you could
> > use org.apache.wicket.resource.JQueryResourceReference#INSTANCE_3, for
> > example
> >
> >
> > >
> > > Thanks
> > >
> >
>


Re: About jQuery 2.2.4 vulnerability

2021-10-20 Thread Martin Grigorov
You could use SecurePackageResourceGuard to forbid access to a resource.
In YourApplication#init():

SecurePackageResourceGuard guard = (SecurePackageResourceGuard)
getResourceSettings().getPackageResourceGuard();
guard.addPattern("-**/jquery-2*.js");

On Wed, Oct 20, 2021 at 9:25 AM Shengche Hsiao 
wrote:

> Dear Martin
>
> I actually configured with jQuery version 3 on Application, and on browser
> console showed jquery version with 3.6.0. But the scanner still find this
> url [
> https://mysite/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-6233386130326534.js]
> appears. I know this resource is generated automatically by Wicket 8.13.0
> (our project), and I don’t want this url resource be retrieved by scanner.
> How to do that?
>
>
> From: Martin Grigorov 
> Date: Wednesday, October 20, 2021 at 14:17
> To: users@wicket.apache.org 
> Subject: Re: About jQuery 2.2.4 vulnerability
> Hi,
>
> On Wed, Oct 20, 2021 at 5:46 AM Shengche Hsiao 
> wrote:
>
> > Dear All
> >
> > Recently, our website made a vulnerability scanning. The report shows
> >
> [/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-
> > 6233386130326534.js] as a vulnerability library. How do I disallow output
> > this jquery version to avoid scan?
> >
>
> I don't understand your question. Please re-phrase if the following does
> not help you!
>
> You can upgrade jQuery by adding such code to YourApplication#init():
>
> getJavaScriptLibrarySettings().setJQueryReference(new
> JavaScriptResourceReference(MyClass.class, "jquery-x.y.z.js"));
> you could
> use org.apache.wicket.resource.JQueryResourceReference#INSTANCE_3, for
> example
>
>
> >
> > Thanks
> >
>


Re: About jQuery 2.2.4 vulnerability

2021-10-20 Thread Martin Grigorov
Hi,

On Wed, Oct 20, 2021 at 5:46 AM Shengche Hsiao 
wrote:

> Dear All
>
> Recently, our website made a vulnerability scanning. The report shows
> [/wicket/resource/org.apache.wicket.resource.JQueryResourceReference/jquery/jquery-2.2.4-v-
> 6233386130326534.js] as a vulnerability library. How do I disallow output
> this jquery version to avoid scan?
>

I don't understand your question. Please re-phrase if the following does
not help you!

You can upgrade jQuery by adding such code to YourApplication#init():

getJavaScriptLibrarySettings().setJQueryReference(new
JavaScriptResourceReference(MyClass.class, "jquery-x.y.z.js"));
you could
use org.apache.wicket.resource.JQueryResourceReference#INSTANCE_3, for
example


>
> Thanks
>


Re: Wicket 8 + 9 on jdk17?

2021-10-07 Thread Martin Grigorov
On Thu, Oct 7, 2021 at 9:57 AM Jeroen Steenbeeke 
wrote:

> My personal Wicket apps (Wicket 9) are all running on JDK17 now. No
> problems so far, other than certain libraries not being able to handle code
> compiled with JDK17, but this was easily fixed by upgrading those
> libraries.
>
> What helps is that the Wicket team periodically runs the entire test suite
> against JDK release candidates and communicates their findings with the JDK
> team.
>

I even use JDK 18 EA for some of my projects.
But my apps are not so important. It is not like I'd lose few billions $$$
if something breaks for few hours :-)


>
> Op do 7 okt. 2021 om 08:52 schreef Korbinian Bachl <
> korbinian.ba...@whiskyworld.de>:
>
> > Hi,
> >
> > has anyone any details about using of wicket 8.x or 9.x under jdk 17?
> > We currently just migrated from jdk8 to jdk11 as runtime in production
> and
> > wicket 8.x was fine under all things (still had some problems with third
> > party libs however).
> > Next we want to go to wicket 9.x but since there are some nice bits added
> > to the track from 11 to 17 I wonder if anyone has some experience with
> > higher version of java and wicket 8 or 9 running under it...
> >
> > Best,
> >
> > KB
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
>
> --
> Jeroen Steenbeeke
>


Re: Wicket 9: AjaxSubmitLink.onSubmit is not called second time

2021-10-05 Thread Martin Grigorov
Hi,

On Tue, Oct 5, 2021, 17:37 Stepan Samarin  wrote:

> Hello,
>
> After migration to Wicket 9 we started to experience the following problem:
>
> Form has 3 AjaxSubmitLink elements. First one is pressed, onSubmit is
> invoked, makes another one visible, target.add is called on both form and
> that other button.
> Now - press the other button, onSubmit is NOT invoked, form gets closed and
> page is reloaded.
>
> I tried to replace AjaxSubmitLink with AjaxButton - same reaction. To me it
> seems like ajax stops working after the first call.
>

Please try to reproduce it in a quickstart application.
Attach it to a ticket in JIRA and we will take a look!


> Regards, Stepan Samarin.
>


  1   2   3   4   5   6   7   8   9   10   >