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.
>


Re: add Dropdown object to List

2021-09-28 Thread Martin Grigorov
On Tue, Sep 28, 2021 at 10:57 AM vahid ghasemi 
wrote:

> Can I limit the users' choice number in ListMultipleChoice?
>

You could use a validator for this
formComponent.add(new IValidator() {...});


>
> On Mon, Sep 27, 2021 at 9:41 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > On Sun, Sep 26, 2021 at 9:12 PM vahid ghasemi  >
> > wrote:
> >
> > > So it's not any option to handle this issue?
> > > I have list but it's singleton list :(
> > >
> >
> > You need to use ListMultipleChoice instead of DropDownChoice.
> >
> >
> > > On Sun, Sep 26, 2021, 6:17 PM Martin Terra <
> > > martin.te...@koodaripalvelut.com>
> > > wrote:
> > >
> > > > Choices model should be final and the selection model should be one
> > item
> > > > not a list
> > > >
> > > >
> > > >
> > > > On Sun, Sep 26, 2021, 17:36 vahid ghasemi  >
> > > > wrote:
> > > >
> > > > > model class :
> > > > > class User {
> > > > > private List someThing;
> > > > > }
> > > > >
> > > > > Page class :
> > > > > private User user;
> > > > > Dropdown dd = new Dropdown("DropDownSomeThing", new
> > > > > PropertyModel(user,"someThing", );
> > > > >
> > > > > and this is my problem.
> > > > > how can I add the drop-down model to the user property which is
> list,
> > > > with
> > > > > PropertyModel
> > > > >
> > > > >
> > > > > On Sun, Sep 26, 2021 at 7:31 AM Martin Terra <
> > > > > martin.te...@koodaripalvelut.com> wrote:
> > > > >
> > > > > > Hi!
> > > > > >
> > > > > > Can you paste some code with your exact (generic) variables which
> > > > doesn't
> > > > > > work, it might be easier to figure out from code example than
> > verbal
> > > > > > description?
> > > > > >
> > > > > > **
> > > > > > Martin
> > > > > >
> > > > > > la 25. syysk. 2021 klo 19.46 vahid ghasemi (
> > > vahidghasemi...@gmail.com)
> > > > > > kirjoitti:
> > > > > >
> > > > > > > Hello guys.
> > > > > > > I have a dropdown and I want to use CompoundPropertyModel OR
> > > > > > PropertyModel.
> > > > > > > the attribute of my model is List and the wicket can't set the
> > > > > > > drop-down model object to List.
> > > > > > > what is your option to handle this?
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>


Re: tag into tag

2021-09-27 Thread Martin Grigorov
Hi,

On Sat, Sep 25, 2021 at 3:45 PM vahid ghasemi 
wrote:

> Hello
> I have a  tag and  tag inside of it:
>
>  wicket:id="panelName">
> Dashboard
> 
> 
> 
> 
>  wicket:id="panelDes">#XRS-45670
> 
>
> my h1 has a Label component.
>
> how I can add Lable into Label?
>

You cannot! A Label is a leaf component that cannot have children. Only
components which extend from MarkupContainer could have children.
You need to change your code to:


Dashboard




#XRS-45670



WebMarkupContainer panel = new WebMarkupContainer("panel");
add(panel);
panel.add(new Label("panelSeparator", ));
panel.add(new Label("panelDes", ));


Re: add Dropdown object to List

2021-09-27 Thread Martin Grigorov
Hi,

On Sun, Sep 26, 2021 at 9:12 PM vahid ghasemi 
wrote:

> So it's not any option to handle this issue?
> I have list but it's singleton list :(
>

You need to use ListMultipleChoice instead of DropDownChoice.


> On Sun, Sep 26, 2021, 6:17 PM Martin Terra <
> martin.te...@koodaripalvelut.com>
> wrote:
>
> > Choices model should be final and the selection model should be one item
> > not a list
> >
> >
> >
> > On Sun, Sep 26, 2021, 17:36 vahid ghasemi 
> > wrote:
> >
> > > model class :
> > > class User {
> > > private List someThing;
> > > }
> > >
> > > Page class :
> > > private User user;
> > > Dropdown dd = new Dropdown("DropDownSomeThing", new
> > > PropertyModel(user,"someThing", );
> > >
> > > and this is my problem.
> > > how can I add the drop-down model to the user property which is list,
> > with
> > > PropertyModel
> > >
> > >
> > > On Sun, Sep 26, 2021 at 7:31 AM Martin Terra <
> > > martin.te...@koodaripalvelut.com> wrote:
> > >
> > > > Hi!
> > > >
> > > > Can you paste some code with your exact (generic) variables which
> > doesn't
> > > > work, it might be easier to figure out from code example than verbal
> > > > description?
> > > >
> > > > **
> > > > Martin
> > > >
> > > > la 25. syysk. 2021 klo 19.46 vahid ghasemi (
> vahidghasemi...@gmail.com)
> > > > kirjoitti:
> > > >
> > > > > Hello guys.
> > > > > I have a dropdown and I want to use CompoundPropertyModel OR
> > > > PropertyModel.
> > > > > the attribute of my model is List and the wicket can't set the
> > > > > drop-down model object to List.
> > > > > what is your option to handle this?
> > > > >
> > > >
> > >
> >
>


Re: Cannot create a session after the response has been committed

2021-09-22 Thread Martin Grigorov
omcat.util.net
> .SocketProcessorBase.run(SocketProcessorBase.java:49)
> at
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> at
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> at
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
> at java.lang.Thread.run(Thread.java:748)
>
>
>
> On Mon, Sep 20, 2021 at 10:45 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > On Fri, Sep 17, 2021 at 4:41 PM vahid ghasemi  >
> > wrote:
> >
> > > Hello
> > > I have a problem with my server, tomcat get down after getting many of
> > this
> > > error:
> > >
> > > java.lang.IllegalStateException: Cannot create a session after the
> > response
> > > has been committed
> > >
> >
> > The error says that the response has been written to the connection and
> you
> > cannot create a new http session, because there is no way to write the
> > JSESSIONID cookie in the response headers now.
> >
> >
> > > at
> > > org.apache.catalina.connector.Request.doGetSession(Request.java:2992)
> > > at
> > > org.apache.catalina.connector.Request.getSession(Request.java:2432)
> > > at
> > >
> > >
> >
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:908)
> > > at
> > >
> > >
> >
> org.apache.wicket.session.HttpSessionStore.getHttpSession(HttpSessionStore.java:95)
> > > at
> > >
> > >
> >
> org.apache.wicket.session.HttpSessionStore.getSessionId(HttpSessionStore.java:166)
> > > at org.apache.wicket.Session.bind(Session.java:267)
> > > at org.apache.wicket.Page.onBeforeRender(Page.java:808)
> > > at
> > > org.apache.wicket.Component.internalBeforeRender(Component.java:963)
> > > at
> org.apache.wicket.Component.beforeRender(Component.java:1031)
> > > at
> > >
> org.apache.wicket.Component.internalPrepareForRender(Component.java:2248)
> > > at org.apache.wicket.Page
> > .internalPrepareForRender(Page.java:242)
> > > at org.apache.wicket.Component.render(Component.java:2337)
> > > at org.apache.wicket.Page.renderPage(Page.java:1018)
> > >
> >
> > Please paste the full stacktrace!
> > Which version of Wicket do you use ?
> >
> >
> > >
> > >
> > > I haven't any idea about this error, do you know what is the problem?
> > >
> >
>


Re: Session instance in memory goes null

2021-09-21 Thread Martin Grigorov
On Wed, Sep 22, 2021 at 7:33 AM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Is there a way to get all Active Sessions?
> Is it possible to get Session using its id?
>

No. There is no such Servlet API.
You need to keep track of them yourself, as you already do.


>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Tue, Sep 21, 2021 at 3:27 PM Arunachalam Sibisakkaravarthi <
> arunacha...@mcruncher.com> wrote:
>
> > Okay, the map is kept in implementation of HttpSessionStore where
> onUnbind method
> > is overridden to remove the session entry from the map.
> >
> > This problem also happens when I click logout button in my app where
> > following code will be executed
> >
> > LOGGER.info("Invalidating the session {} ...",
> getCustomSession().getId());
> > getCoreSession().invalidateNow();
> >
> > LOGGER.info("Session invalidated?: {}",
> getSession().isSessionInvalidated());
> > LOGGER.info("Replacing the current session with a new one to protect
> against session fixation attacks...");
> > getCustomSession().replaceSession(); //tried using changeSessionId, but
> it doesn't help
> >
> >
> >
> >
> > *Thanks And RegardsSibi.ArunachalammCruncher*
> >
> >
> > On Tue, Sep 21, 2021 at 2:10 PM Martin Grigorov 
> > wrote:
> >
> >> Hi,
> >>
> >> On Tue, Sep 21, 2021 at 6:57 AM Arunachalam Sibisakkaravarthi <
> >> arunacha...@mcruncher.com> wrote:
> >>
> >> > Hi guys,
> >> > User Session goes null and other user 's session is updated wrongly.
> >> >
> >> > I keep track of session instances in a map with username as key
> >> >
> >>
> >> Where do you keep this map ?
> >> I guess in some custom implementation of HttpSessionListener ?!
> >>
> >>
> >> > The following happens in a scenario
> >> > Assume 3 users (foouser, baruser, foobaruser) are there in the system
> >> >
> >> > 1. foouser was logged in
> >> >1.a) Session (id is 1) is stored in the map
> >> > 2. baruser was logged in
> >> >2.a) Session (id is 2) is stored in the map
> >> > 3. Session has expired for baruser
> >> >  3.a) Trying to remove the baruser's session entry from the map
> >> >  3.b) Got NullPointerException while accessing the session for
> >> baruser
> >> > stored in the map, because somehow the session was null, so I couldn't
> >> > remove the entry from the map for baruser
> >> > 4. foobaruser was logged in
> >> >  4.a) Session (id is 3) is stored in the map
> >> >  4.b) Session (id as 3) is updated in the map for baruser
> >> >
> >> > I have two questions
> >> > 1. How was the baruser's session set to null?  (step 3.b)
> >> > 2. Why baruser's session was updated to the id which belongs to newly
> >> > logged in user? (step 4.b)?
> >> >
> >> > Please help me to understand the problem.
> >> >
> >>
> >> Since the map is managed in your application code we cannot tell you
> >> without seeing your code.
> >>
> >>
> >> >
> >> >
> >> >
> >> > *Thanks And RegardsSibi.ArunachalammCruncher*
> >> >
> >>
> >
>


Re: Allow multiple "logins" in same application

2021-09-21 Thread Martin Grigorov
Hi,

On Tue, Sep 21, 2021 at 10:35 AM Thomas Matthijs  wrote:

> Hello,
>
> Wonder if anyone has tried (and succeed?) in allowing users to sign in
> with multiple accounts, thinking of the way gmail for example handles
> it, when each account you login with get a unique url foobar.com/1/
> and foobar.com/2/, and then based on the param in the url have wicket
> (completely) isolate the session and page store etc ?
>
> Just looking for a general idea if it should be possible without too
> much trouble or if the wicket design/architecture will not allow it ?
>

I have done something similar in the past for a client of mine but all the
logic was in Spring Security (SS).
SS servlet filter in front of WicketFilter was responsible to store/extract
the user auth info.
Wicket's AuthenticatedWebSession just asks SS to get the user and its roles.

I say *similar*, because in our case only admin users should have been able
to log in as themselves or to impersonate regular users.


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


Re: Session instance in memory goes null

2021-09-21 Thread Martin Grigorov
Hi,

On Tue, Sep 21, 2021 at 6:57 AM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Hi guys,
> User Session goes null and other user 's session is updated wrongly.
>
> I keep track of session instances in a map with username as key
>

Where do you keep this map ?
I guess in some custom implementation of HttpSessionListener ?!


> The following happens in a scenario
> Assume 3 users (foouser, baruser, foobaruser) are there in the system
>
> 1. foouser was logged in
>1.a) Session (id is 1) is stored in the map
> 2. baruser was logged in
>2.a) Session (id is 2) is stored in the map
> 3. Session has expired for baruser
>  3.a) Trying to remove the baruser's session entry from the map
>  3.b) Got NullPointerException while accessing the session for baruser
> stored in the map, because somehow the session was null, so I couldn't
> remove the entry from the map for baruser
> 4. foobaruser was logged in
>  4.a) Session (id is 3) is stored in the map
>  4.b) Session (id as 3) is updated in the map for baruser
>
> I have two questions
> 1. How was the baruser's session set to null?  (step 3.b)
> 2. Why baruser's session was updated to the id which belongs to newly
> logged in user? (step 4.b)?
>
> Please help me to understand the problem.
>

Since the map is managed in your application code we cannot tell you
without seeing your code.


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


Re: Wicket 9 CSP CssResourceHeader CSS location problem

2021-09-20 Thread Martin Grigorov
Hi,

On Mon, Sep 20, 2021 at 11:26 AM Peter van der Post <
peter.van.der.p...@gmail.com> wrote:

> I’m in the process of upgrading an application to Wicket 9 in order to get
> strict CSP compliance.
>
> I’m using
>
> response.render(CssHeaderItem.forReference(new
> CssResourceReference(MyClass.class, “file.css", getLocale(), "screen",
> "")));
>
> to have Wicket provide the proper reference to the CSS file. This works
> fine, as long as the CSS file is next to the Java/HTML source files.
> But I want to keep the projects file structure with the CSS files in de
> xdocs/css folder.
>

Where exactly in your project is xdocs folder ?
It should be at src/main/webapp/xdocs (if you use Maven to package your
app).


> I’m trying to accomplish this by adding its path with
>
> getResourceSettings().getResourceFinders().add(new
> WebApplicationPath(getServletContext(), "xdocs/css"));
>
> This does not give me an error, but loading the CSS file fail in the
> constructor of CssResourceReference():


> ResourceReferenceRegistry:### - A ResourceReference wont be
> created for a resource with key [scope: ###; name: file.css; locale: null;
> style: null; variation: null] because it cannot be located.
>
> What am I missing here? I suppose the CssResourceReference class should be
> using the ResourceFinders that have been set up?
>

Right!
org.apache.wicket.core.util.resource.locator.ResourceStreamLocator#locate(java.lang.Class,
java.lang.String) uses the configured finders.
Put a breakpoint at
org.apache.wicket.core.util.file.WebApplicationPath#find() and see why it
is not found.


>
> Many thanks in advance,
> Peter


Re: Cannot create a session after the response has been committed

2021-09-20 Thread Martin Grigorov
Hi,

On Fri, Sep 17, 2021 at 4:41 PM vahid ghasemi 
wrote:

> Hello
> I have a problem with my server, tomcat get down after getting many of this
> error:
>
> java.lang.IllegalStateException: Cannot create a session after the response
> has been committed
>

The error says that the response has been written to the connection and you
cannot create a new http session, because there is no way to write the
JSESSIONID cookie in the response headers now.


> at
> org.apache.catalina.connector.Request.doGetSession(Request.java:2992)
> at
> org.apache.catalina.connector.Request.getSession(Request.java:2432)
> at
>
> org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:908)
> at
>
> org.apache.wicket.session.HttpSessionStore.getHttpSession(HttpSessionStore.java:95)
> at
>
> org.apache.wicket.session.HttpSessionStore.getSessionId(HttpSessionStore.java:166)
> at org.apache.wicket.Session.bind(Session.java:267)
> at org.apache.wicket.Page.onBeforeRender(Page.java:808)
> at
> org.apache.wicket.Component.internalBeforeRender(Component.java:963)
> at org.apache.wicket.Component.beforeRender(Component.java:1031)
> at
> org.apache.wicket.Component.internalPrepareForRender(Component.java:2248)
> at org.apache.wicket.Page.internalPrepareForRender(Page.java:242)
> at org.apache.wicket.Component.render(Component.java:2337)
> at org.apache.wicket.Page.renderPage(Page.java:1018)
>

Please paste the full stacktrace!
Which version of Wicket do you use ?


>
>
> I haven't any idea about this error, do you know what is the problem?
>


Re: Wicket EnclosureContainer - any changes to behaviour from 6.x -> 7.x?

2021-09-13 Thread Martin Grigorov
On Mon, Sep 13, 2021 at 10:19 AM Martin Grigorov 
wrote:

>
>
> On Mon, Sep 13, 2021 at 9:44 AM Martin Grigorov 
> wrote:
>
>>
>>
>> On Mon, Sep 13, 2021 at 9:27 AM Chris Colman
>>  wrote:
>>
>>>
>>> > You shouldn't use  if you use EnclosureContainer.
>>> > Use a  instead.
>>>
>>> It's weird how it's worked perfectly for many years for us in Wicket 6.x.
>>>
>>> Maybe an extra note could be added to the 6.x -> 7.x migration guide in
>>> case others experience this in their migration efforts.
>>>
>>
>> We didn't do any changes in this area. Or at least I don't remember such.
>>
>> What we could do is to improve EnclosureContainer to complain when used
>> with .
>>
>
> This won't work without adding more logic to Enclosure (the .java
> component behind ).
> While trying to get the markup for EnclosureContainer Wicket triggers the
> auto-component logic for  and it fails with the error you
> reported, so there is no way to get the ComponentTag at all.
> I am against adding more logic to Enclosure.java because it has too many
> problems already.
>
> What I could do is to improve EnclosureContainer's javadoc to mention this.
>

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


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


Re: Wicket EnclosureContainer - any changes to behaviour from 6.x -> 7.x?

2021-09-13 Thread Martin Grigorov
On Mon, Sep 13, 2021 at 9:44 AM Martin Grigorov 
wrote:

>
>
> On Mon, Sep 13, 2021 at 9:27 AM Chris Colman
>  wrote:
>
>>
>> > You shouldn't use  if you use EnclosureContainer.
>> > Use a  instead.
>>
>> It's weird how it's worked perfectly for many years for us in Wicket 6.x.
>>
>> Maybe an extra note could be added to the 6.x -> 7.x migration guide in
>> case others experience this in their migration efforts.
>>
>
> We didn't do any changes in this area. Or at least I don't remember such.
>
> What we could do is to improve EnclosureContainer to complain when used
> with .
>

This won't work without adding more logic to Enclosure (the .java component
behind ).
While trying to get the markup for EnclosureContainer Wicket triggers the
auto-component logic for  and it fails with the error you
reported, so there is no way to get the ComponentTag at all.
I am against adding more logic to Enclosure.java because it has too many
problems already.

What I could do is to improve EnclosureContainer's javadoc to mention this.


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


Re: Wicket EnclosureContainer - any changes to behaviour from 6.x -> 7.x?

2021-09-13 Thread Martin Grigorov
On Mon, Sep 13, 2021 at 9:27 AM Chris Colman
 wrote:

>
> > You shouldn't use  if you use EnclosureContainer.
> > Use a  instead.
>
> It's weird how it's worked perfectly for many years for us in Wicket 6.x.
>
> Maybe an extra note could be added to the 6.x -> 7.x migration guide in
> case others experience this in their migration efforts.
>

We didn't do any changes in this area. Or at least I don't remember such.

What we could do is to improve EnclosureContainer to complain when used
with .


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


Re: Wicket EnclosureContainer - any changes to behaviour from 6.x -> 7.x?

2021-09-11 Thread Martin Grigorov
On Sun, Sep 12, 2021, 08:03 Chris Colman
 wrote:

> We're in the middle of migrating a large enterprise content management
> system (>1000 UI classes) from 6.x to 7.x.
>
> We've finally got it compiling with Wicket 7.x but we're having an issue
> with an EnclosureContainer that worked fine in Wicket 6.x.
>
> org.apache.wicket.WicketRuntimeException: Could not find child with id:
> menuTitle in the wicket:enclosure
>  at
> org.apache.wicket.markup.html.internal.Enclosure.checkChildComponent(Enclosure.java:295)
>
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at
> org.apache.wicket.markup.html.internal.Enclosure.getChildComponent(Enclosure.java:273)
>
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at
> org.apache.wicket.markup.html.internal.Enclosure.getChild(Enclosure.java:136)
>
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at
> org.apache.wicket.markup.html.internal.Enclosure.onConfigure(Enclosure.java:178)
>
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at org.apache.wicket.Component.configure(Component.java:1056)
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at
> org.apache.wicket.Component.internalBeforeRender(Component.java:941)
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at org.apache.wicket.Component.beforeRender(Component.java:1018)
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at
> org.apache.wicket.MarkupContainer.onBeforeRenderChildren(MarkupContainer.java:1826)
>
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at org.apache.wicket.Component.onBeforeRender(Component.java:3921)
> ~[wicket-core-7.18.0.jar:7.18.0]
>  at
> com.sas.av.ui.wicket.templates.original.OrganizationPanel.onBeforeRender(OrganizationPanel.java:576)
>
> ~[classes/:?]
> ...
>
>
> I created a Wicket quickstart in 7.18.0 and was able to reproduce the
> issue with the following  code:
>
>
> Markup:
>
> 
> http://wicket.apache.org;>
>  
>  
>  Apache Wicket Quickstart
>  
>  
>  Apache Wicket
>  
>

You shouldn't use  if you use EnclosureContainer.
Use a  instead.

 Title
>  
>  
> 
>
> Java:
>
> package com.sas;
>
> import org.apache.wicket.request.mapper.parameter.PageParameters;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.markup.html.WebPage;
> import org.apache.wicket.markup.html.basic.*;
>
> public class HomePage extends WebPage {
>  private static final long serialVersionUID = 1L;
>
>  public HomePage(final PageParameters parameters) {
>  super(parameters);
>
>  Label menuTitleLabel = new Label("menuTitle", "Fred");
>  EnclosureContainer ec = new EnclosureContainer("menuTitleEc",
> menuTitleLabel);
>  ec.add(menuTitleLabel);
>  menuTitleLabel.setVisible(true);
>  add(ec);
>  }
> }
>
>
> If I don't use an explicit EnclosureContainer and remove the wicket:id=
> from the wicket:enclosure element it works but I need to explicitly
> declare the enclosure in the component hierarchy.
>
> Regards,
> Chris
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Martin Grigorov
Please create a mini application demonstrating the issue and share it at
GitHub.

On Thu, Sep 9, 2021, 05:56 Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Yes somehow It worked in 7.x
> Based on the suggestions from you all, In 9.x, I use  custom
> IHeaderResponseDecorator
> for Css resources to load into the header section, it works.
> And JavaScriptFilteredIntoFooterHeaderResponse is used with a
> wicket-container bucket for JS resources to load into the footer before end
> of body, but it loads into header section which is not expected.
>
> *Thanks And Regards*
>
> *Sibi.ArunachalammCruncher*
>
>
> On Wed, Sep 8, 2021 at 5:14 PM Martin Grigorov 
> wrote:
>
> > On Wed, Sep 8, 2021 at 12:04 PM Arunachalam Sibisakkaravarthi <
> > arunacha...@mcruncher.com> wrote:
> >
> > > Thanks guys for your feedback
> > > Implementing custom IHeaderResponseDecorator for css resources works
> for
> > > me.
> > > Then I noticed that both css and js resources are loaded in the header.
> > Is
> > > that expected behaviour in Wicket 9.x? because in my previous
> > > implementation in Wicket 7.x JS loaded in the footer which is expected.
> > > How do I make the JS to be loaded in the footer to improve page loading
> > > performance?
> > > @Martin Grigorov somehow adding css resources into
> > > getHeaderContributorListeners
> > > doesn't work in my case.
> > >
> > >
> > You should wrap your CssHeaderItems into FilteredHeaderItem if you want
> > them to be caught by JavaScriptFilteredIntoFooterHeaderResponse.
> > But I wonder how this worked for you in 7.x.
> > JavaScriptFilteredIntoFooterHeaderResponse is about
> JavaScriptHeaderItems,
> > not CssHeaderItems.
> >
> >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> > >
> > > On Wed, Sep 8, 2021 at 2:24 PM Martin Grigorov 
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Instead of dealing with response decorators you could
> > > > use org.apache.wicket.markup.html.IHeaderContributor
> > > >
> > > > getHeaderContributorListeners().add( return response -> {
> > > > response.render(CssHeaderItem.forReference(css1));
> > > > response.render(CssHeaderItem.forReference(css2));
> > > > })
> > > >
> > > > IHeaderResponseDecorator is more powerful. It should be used when you
> > > want
> > > > to intercept all header contributions and add/modify/remove
> > > contributions.
> > > >
> > > > On Wed, Sep 8, 2021 at 6:47 AM Arunachalam Sibisakkaravarthi <
> > > > arunacha...@mcruncher.com> wrote:
> > > >
> > > > > Hi guys,
> > > > > I am doing Wicket migration from 7.x to 9.x
> > > > > In Wicket7.x I add css resource as below, it was working
> > > > >
> > > > > getHeaderResponseDecorators().add(getHeaderResponseDecorator());
> > > > >
> > > > > private IHeaderResponseDecorator getHeaderResponseDecorator()
> > > > > {
> > > > > return response -> {
> > > > > response.render(CssHeaderItem.forReference(css1));
> > > > >
> > > > > response.render(CssHeaderItem.forReference(css2));
> > > > >
> > > > > return new JavaScriptFilteredIntoFooterHeaderResponse(response,
> > > > "scripts");
> > > > > };
> > > > >
> > > > > whereas the above one doesn't work in Wicket9.x
> > > > > Is there any alternative to css and js in init() method of
> > > > WebApplication?
> > > > > so that css/js will be available to all components.
> > > > >
> > > > >
> > > > >
> > > > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > > > >
> > > >
> > >
> >
>


Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Martin Grigorov
On Wed, Sep 8, 2021 at 12:04 PM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Thanks guys for your feedback
> Implementing custom IHeaderResponseDecorator for css resources works for
> me.
> Then I noticed that both css and js resources are loaded in the header. Is
> that expected behaviour in Wicket 9.x? because in my previous
> implementation in Wicket 7.x JS loaded in the footer which is expected.
> How do I make the JS to be loaded in the footer to improve page loading
> performance?
> @Martin Grigorov somehow adding css resources into
> getHeaderContributorListeners
> doesn't work in my case.
>
>
You should wrap your CssHeaderItems into FilteredHeaderItem if you want
them to be caught by JavaScriptFilteredIntoFooterHeaderResponse.
But I wonder how this worked for you in 7.x.
JavaScriptFilteredIntoFooterHeaderResponse is about JavaScriptHeaderItems,
not CssHeaderItems.


>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>
>
> On Wed, Sep 8, 2021 at 2:24 PM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > Instead of dealing with response decorators you could
> > use org.apache.wicket.markup.html.IHeaderContributor
> >
> > getHeaderContributorListeners().add( return response -> {
> > response.render(CssHeaderItem.forReference(css1));
> > response.render(CssHeaderItem.forReference(css2));
> > })
> >
> > IHeaderResponseDecorator is more powerful. It should be used when you
> want
> > to intercept all header contributions and add/modify/remove
> contributions.
> >
> > On Wed, Sep 8, 2021 at 6:47 AM Arunachalam Sibisakkaravarthi <
> > arunacha...@mcruncher.com> wrote:
> >
> > > Hi guys,
> > > I am doing Wicket migration from 7.x to 9.x
> > > In Wicket7.x I add css resource as below, it was working
> > >
> > > getHeaderResponseDecorators().add(getHeaderResponseDecorator());
> > >
> > > private IHeaderResponseDecorator getHeaderResponseDecorator()
> > > {
> > > return response -> {
> > > response.render(CssHeaderItem.forReference(css1));
> > >
> > > response.render(CssHeaderItem.forReference(css2));
> > >
> > > return new JavaScriptFilteredIntoFooterHeaderResponse(response,
> > "scripts");
> > > };
> > >
> > > whereas the above one doesn't work in Wicket9.x
> > > Is there any alternative to css and js in init() method of
> > WebApplication?
> > > so that css/js will be available to all components.
> > >
> > >
> > >
> > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > >
> >
>


Re: Adding css resource available to all component in the application using wicket 9.x

2021-09-08 Thread Martin Grigorov
Hi,

Instead of dealing with response decorators you could
use org.apache.wicket.markup.html.IHeaderContributor

getHeaderContributorListeners().add( return response -> {
response.render(CssHeaderItem.forReference(css1));
response.render(CssHeaderItem.forReference(css2));
})

IHeaderResponseDecorator is more powerful. It should be used when you want
to intercept all header contributions and add/modify/remove contributions.

On Wed, Sep 8, 2021 at 6:47 AM Arunachalam Sibisakkaravarthi <
arunacha...@mcruncher.com> wrote:

> Hi guys,
> I am doing Wicket migration from 7.x to 9.x
> In Wicket7.x I add css resource as below, it was working
>
> getHeaderResponseDecorators().add(getHeaderResponseDecorator());
>
> private IHeaderResponseDecorator getHeaderResponseDecorator()
> {
> return response -> {
> response.render(CssHeaderItem.forReference(css1));
>
> response.render(CssHeaderItem.forReference(css2));
>
> return new JavaScriptFilteredIntoFooterHeaderResponse(response, "scripts");
> };
>
> whereas the above one doesn't work in Wicket9.x
> Is there any alternative to css and js in init() method of WebApplication?
> so that css/js will be available to all components.
>
>
>
> *Thanks And RegardsSibi.ArunachalammCruncher*
>


Re: Page is being lost from Session intermittently

2021-09-02 Thread Martin Grigorov
On Thu, Sep 2, 2021 at 3:48 PM Wayne W  wrote:

> Thanks for the replies.
> >
> >
> > Have you logged everything from the servlet container's session manager
> to
> > wicket session management, to identify the logic where loss occurs?
>
>
> Not yet.
>
> For example, did you try with different servlet containers if same
> > problem occurs? Jetty, Tomcat, something else? Just to rule out the
> servlet
> > container.
>
>
> I don't really want to go down that road (at least yet)  - the session is
> not lost, just the page in the session so I would not think it's the
> container. We've been using Tomcat for years in production.
>
>
> Does it fail on the first ping (after 15 minutes) or later ?
>
>
> No - anything from an hour to 15 hours . There does not seem to be any
> rhyme to it.
>
> If you don't do anything (e.g. in another tab) with the application then
> > Wicket should not overwrite/remove the disk store for your session.
>
>
> Yes to confirm we are not interacting with the application whilst the page
> is displayed and uploading elsewhere.
>
>  NotSerializableExceptions
>
>
> Yes we don't have those so not that.
>
>
> As a workaround you may do your ping to a Wicket Resource, or another
> > servlet. This will be enough to keep the http session without the extra
> > logic done in Wicket Ajax requests (resolve a page, resolve the component
> > in the tree, execute the callback method, ...).
>
>
> Thanks for the suggestion. There is a button on the end of the upload that
> interacts with the page, so we would need to rethink the flow to do this.
> It does feel like a bodge though.
>
> Where is the Wicket code is this logic done managing the page in the
> session?
>

https://github.com/apache/wicket/blob/d1b17b53b3141082c038f4721836488cb38f9083/wicket-core/src/main/java/org/apache/wicket/core/request/handler/PageProvider.java#L401


>
> Many thanks
>
>
>
>
>
>
> On Thu, Sep 2, 2021 at 9:41 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > On Wed, Sep 1, 2021 at 7:31 PM Wayne W 
> > wrote:
> >
> > > Hello there,
> > >
> > > We recently upgraded from Wicket 7.8.0 to 9.4.0 . We are experiencing
> > > intermittent pages that are being lost from the session.
> > >
> > > I can reproduce in production but it takes time and is random. We have
> a
> > > page where some files can be uploaded to another microservice from the
> > > webpage via an API. We have an AbstractDefaultAjaxBehavior in the page
> > > which gets called every 15 minutes to keep the session alive. This has
> > > always worked well.
> > >
> > > I can reproduce by uploading a very large file which can take say 4
> > hours,
> > > during this time I do not touch the page, or open any other tabs. The
> > only
> > > interaction during this process is the AbstractDefaultAjaxBehavior
> being
> > > called every 15 minutes to keep the session alive. We see that
> > > intermittently the page cannot be found in the session and wicket
> > > automatically recreates the page again. This coming  from the call to
> > > the AbstractDefaultAjaxBehavior - we see in the HTTP response headers
> > that
> > > wicket adds 'ajax-location: /the-page-we-are-on' and the wicket ajax JS
> > > does a redirect to recreate the page.
> > >
> >
> > Does it fail on the first ping (after 15 minutes) or later ?
> >
> >
> > >
> > > This kills the upload obviously as the page is refreshed.
> > >
> > > What could be causing this and where can I look in the code to
> understand
> > > when wicket decides to eject the page from the session? FYI we have
> > > setMaxSizePerSession
> > > set at 10MB.
> > >
> >
> > Wicket overwrites the oldest page(s) in the disk store if there are many
> > interactions with other pages.
> > If you don't do anything (e.g. in another tab) with the application then
> > Wicket should not overwrite/remove the disk store for your session.
> >
> >
> > >
> > > When does wicket decide to return the ajax-location header?
> > >
> >
> > Wicket does that when it needs to trigger a redirect in an Ajax response.
> > The Ajax request cannot find the page instance for some reason and (by
> > default) Wicket creates a new instance of the same page class and tells
> the
> > browser to move to it.
> >
> >
> > >
> > > It is possible this issue was happening in 7.8 but was not on our radar
> > so
> > > is unknown.
> > >
> >
> > Most of the time when a page cannot be found in the disk store is because
> > there was a problem with its serialization, i.e. it was not stored on the
> > disk at all. But in this case you should see some
> NotSerializableExceptions
> > in the server logs.
> >
> > As a workaround you may do your ping to a Wicket Resource, or another
> > servlet. This will be enough to keep the http session without the extra
> > logic done in Wicket Ajax requests (resolve a page, resolve the component
> > in the tree, execute the callback method, ...).
> >
> >
> >
> >
> > >
> > > Many thanks
> > > Wayne
> > >
> >
>


Re: Page is being lost from Session intermittently

2021-09-02 Thread Martin Grigorov
Hi,

On Wed, Sep 1, 2021 at 7:31 PM Wayne W  wrote:

> Hello there,
>
> We recently upgraded from Wicket 7.8.0 to 9.4.0 . We are experiencing
> intermittent pages that are being lost from the session.
>
> I can reproduce in production but it takes time and is random. We have a
> page where some files can be uploaded to another microservice from the
> webpage via an API. We have an AbstractDefaultAjaxBehavior in the page
> which gets called every 15 minutes to keep the session alive. This has
> always worked well.
>
> I can reproduce by uploading a very large file which can take say 4 hours,
> during this time I do not touch the page, or open any other tabs. The only
> interaction during this process is the AbstractDefaultAjaxBehavior being
> called every 15 minutes to keep the session alive. We see that
> intermittently the page cannot be found in the session and wicket
> automatically recreates the page again. This coming  from the call to
> the AbstractDefaultAjaxBehavior - we see in the HTTP response headers that
> wicket adds 'ajax-location: /the-page-we-are-on' and the wicket ajax JS
> does a redirect to recreate the page.
>

Does it fail on the first ping (after 15 minutes) or later ?


>
> This kills the upload obviously as the page is refreshed.
>
> What could be causing this and where can I look in the code to understand
> when wicket decides to eject the page from the session? FYI we have
> setMaxSizePerSession
> set at 10MB.
>

Wicket overwrites the oldest page(s) in the disk store if there are many
interactions with other pages.
If you don't do anything (e.g. in another tab) with the application then
Wicket should not overwrite/remove the disk store for your session.


>
> When does wicket decide to return the ajax-location header?
>

Wicket does that when it needs to trigger a redirect in an Ajax response.
The Ajax request cannot find the page instance for some reason and (by
default) Wicket creates a new instance of the same page class and tells the
browser to move to it.


>
> It is possible this issue was happening in 7.8 but was not on our radar so
> is unknown.
>

Most of the time when a page cannot be found in the disk store is because
there was a problem with its serialization, i.e. it was not stored on the
disk at all. But in this case you should see some NotSerializableExceptions
in the server logs.

As a workaround you may do your ping to a Wicket Resource, or another
servlet. This will be enough to keep the http session without the extra
logic done in Wicket Ajax requests (resolve a page, resolve the component
in the tree, execute the callback method, ...).




>
> Many thanks
> Wayne
>


Re: examples9x certificate is expired

2021-08-24 Thread Martin Grigorov
Fixed it!

Thanks, François!

On Tue, Aug 24, 2021 at 12:23 PM Francois Meillet <
francois.meil...@gmail.com> wrote:

> Hi, certificate of http://examples9x.wicket.apache.org is expired
>
> François
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: RedirectRequestHandler and HttpHeader?

2021-08-23 Thread Martin Grigorov
On Mon, Aug 23, 2021 at 11:37 AM Korbinian Bachl <
korbinian.ba...@whiskyworld.de> wrote:

> Hi Jon,
> Hi Martin,
>
> thanks for pointing me there. It would work that way:
>
> getRequestCycle().scheduleRequestHandlerAfterCurrent((requestCycle -> {
> WebResponse response = (WebResponse)
> requestCycle.getResponse();
> response.setHeader("test", "1");
> response.setHeader("Location", targetUrl);
> response.setStatus(301);
> // response.sendRedirect(targetUrl); -> is only
> 302!
> }));
>
>
> the sendRedirect ist always 302, 301 only works with the location header.
> Feels bit "un"wicket to do all this.
> The main goal is to just redirect with 301 to an URL and have some headers
> set - is there any easier/ faster way to do this?


> In times before wicket 8 I had a custom RedirectTarget301 extends
> RedirectRequestTarget for this.
>

You could still do it with:
getRequestCycle().scheduleRequestHandlerAfterCurrent(new
RedirectRequestHandler("...", 301) {
  @Override
  public void respond(IRequestCycle cycle) {
   super.respond(cycle);

   WebResponse response = (WebResponse) cycle.getResponse();
   response.setHeader("test", "1");
  }
}


>
> I've seen the RedirectToUrlException in wicket 8 but that basically just
> wraps the above logic into a super(new RedirectRequestHandler()) of
> ReplaceHandlerException.
>
> Would that be the best way to have this solved? A custom
> Redirect301ToUrlException(String targetUrl, Headers... header) ?
>

As with any framework it should be possible to do anything you need than to
have an API for every possible use case out there!

But let's assume we add such "Headers..." parameter.
Should we also add logic to protect the users from doing strange things
like adding caching response headers to a PERMANENT redirect ? What is the
idea behind caching something that should never be there ever again ?!


>
>
> Best,
>
> KB
>
>
>
> - Ursprüngliche Mail -
> > Von: "Martin Grigorov"
> > An: "users" 
> > Gesendet: Montag, 23. August 2021 10:03:34
> > Betreff: Re: RedirectRequestHandler and HttpHeader?
>
> > Hi Korbinian,
> >
> > I am not sure this is possible.
> > You could set response headers for normal responses, but not for
> redirects'
> > targets.
> >
> > On Mon, Aug 23, 2021 at 1:41 AM Locke, Jonathan (Luo Shibo) <
> > jonath...@telenav.com> wrote:
> >
> >> It's been a while, but can't you get the WebResponse from
> WebRequestCycle
> >> and then call response.setHeader()?
> >>
> >
> > To continue Jon's idea:
> >
> > getRequestCycle().scheduleRequestHandlerAfterCurrent((requestCycle) -> {
> >   WebResponse response = (WebResponse) requestCycle.getResponse();
> >   response.setHeader(...);
> >   response.setRedirect("...");
> > });
> >
> > Play with it but you should set the headers in the response after the
> > redirect happens.
> >
> > Martin
> >
> >
> >> Jon
> >>
> >> 
> >> From: Korbinian Bachl
> >> Sent: Sunday, August 22, 2021 4:58 AM
> >> To: users 
> >> Subject: RedirectRequestHandler and HttpHeader?
> >>
> >> Hi,
> >>
> >> I call this:
> >>
> >> getRequestCycle().scheduleRequestHandlerAfterCurrent(new
> >> RedirectRequestHandler("myNewURL",301));
> >>
> >> How could I add a custom HttpHeader to the response?
> >> e.g.: Cache-Control: max-age=300
> >>
> >>
> >> Best,
> >>
> >> KB
> >>
> >> -
> >> 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.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: RedirectRequestHandler and HttpHeader?

2021-08-23 Thread Martin Grigorov
Hi Korbinian,

I am not sure this is possible.
You could set response headers for normal responses, but not for redirects'
targets.

On Mon, Aug 23, 2021 at 1:41 AM Locke, Jonathan (Luo Shibo) <
jonath...@telenav.com> wrote:

> It's been a while, but can't you get the WebResponse from WebRequestCycle
> and then call response.setHeader()?
>

To continue Jon's idea:

getRequestCycle().scheduleRequestHandlerAfterCurrent((requestCycle) -> {
   WebResponse response = (WebResponse) requestCycle.getResponse();
   response.setHeader(...);
   response.setRedirect("...");
});

Play with it but you should set the headers in the response after the
redirect happens.

Martin


> Jon
>
> 
> From: Korbinian Bachl 
> Sent: Sunday, August 22, 2021 4:58 AM
> To: users 
> Subject: RedirectRequestHandler and HttpHeader?
>
> Hi,
>
> I call this:
>
> getRequestCycle().scheduleRequestHandlerAfterCurrent(new
> RedirectRequestHandler("myNewURL",301));
>
> How could I add a custom HttpHeader to the response?
> e.g.: Cache-Control: max-age=300
>
>
> Best,
>
> KB
>
> -
> 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: Cookiebot support

2021-08-09 Thread Martin Grigorov
Hi,

One more thing.

On Fri, Aug 6, 2021 at 3:53 PM Stepan Samarin  wrote:

> Hello,
>
> I'm trying to integrate Cookiebot and am facing the following problem:
> 

Re: login captcha issue

2021-08-01 Thread Martin Grigorov
Have you tried calling `captchaImageResource.invalidate();` in your
onSubmit() method ?


On Sun, Aug 1, 2021 at 4:24 PM vahid ghasemi 
wrote:

> I used this method but after that my captcha image is not rendered and cant
> see that.
>
> On Sun, Aug 1, 2021 at 11:11 AM Maxim Solodovnik 
> wrote:
>
> > You can set-up NoVersionMapper
> > https://stackoverflow.com/questions/8602489/delete-version-number-in-url
> >
> >
> >
> > from mobile (sorry for typos ;)
> >
> >
> > On Sat, Jul 31, 2021, 22:39 vahid ghasemi 
> > wrote:
> >
> > > Hello
> > > I have a login form with a captcha.
> > > I tested my form with Burp suite (penetration test tool).
> > > in Burp I can send header requests a lot of time for brood force(just
> > > change password).
> > > this problem is because of the number at end of my
> > > URL(localhost:8080/login?1).
> > > so with this way attackers can bypass captcha.
> > > how can i fix this problem.
> > >
> >
>


Re: Bug with backbutton in Chrome / Edge

2021-07-05 Thread Martin Grigorov
Thanks for sharing with us, Johannes!

Let's see what the Chromium developers will say about it!
I'd recommend you to simplify the demo application to pure static HTML,
without Wicket or any other server side technology.

On Fri, Jul 2, 2021 at 10:04 AM Johannes Renoth 
wrote:

> Hello all,
>
> FYI: we found a bug in Chrome that mainly affects Wicket applications
> when navigating back.
>
> https://bugs.chromium.org/p/chromium/issues/detail?id=1225212
>
> It is easily reproducable with the quickstart in the ticket.
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Reg : Wicket cache controls

2021-06-14 Thread Martin Grigorov
Hi,

On Mon, Jun 14, 2021 at 1:24 PM sundar saba 
wrote:

> Hi all,
>
>   I am using wicket and spring security  in my project. I
> enabled HTTP headers in spring security .My spring security Cache controls
> are overridden by wicket cache controls. Can you all please help me to
> disable wicket cache controls in my project
>

Globally
see 
Application.get().getResourceSettings().getCachingStrategy().decorateResponse(AbstractResource.ResourceResponse
response, IStaticCacheableResource resource)
For a single resource see AbstractResource#disableCaching()


Re: Ajax events invoked twice

2021-06-14 Thread Martin Grigorov
Thanks for sharing this finding, Ilya!

On Mon, Jun 14, 2021 at 7:55 AM Ilya Naryzhnyy  wrote:

> Hello,
>
> Here is demo project:
> https://github.com/PhantomYdn/wicket-bugs/tree/master/doublefire
> After some investigation: it seems to be JQuery bug:
> https://github.com/jquery/jquery/issues/4652, but there is a WA: attach
> event either to window or document - not both.
>

Wicket 9.x uses jQuery 3.x with the fix from
https://github.com/jquery/jquery/pull/4656
You could update your application to use latest jQuery 3.x too.


>
> Thanks,
> Ilia
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>
> On Sun, Jun 13, 2021 at 7:08 PM Ilya Naryzhnyy  wrote:
>
> > Hello,
> >
> > I have found strange Wicket behavior (8.11): ajax events being executed
> > twice. The same event leads to 2 invocations to a server. Here is Wicket
> > debug console logs (AjaxFormComponentUpdatingBehavior set for unfocus):
> >
> > INFO: focus set on firstName78
> > INFO: focus removed from firstName78
> > INFO:
> > Channel '0' is busy - scheduling the callback to be executed when the
> previous request finish.
> > INFO: Received ajax response (367 characters)
> > INFO:
> >
> >  id="feedbacks87" >
> > INFO: focus set on feedbacks87 from server side
> > INFO: Response processed successfully.
> > INFO: Calling focus on feedbacks87
> > INFO: Calling postponed function...
> > INFO: Received ajax response (367 characters)
> > INFO:
> >
> >  id="feedbacks87" >
> > INFO: returned focused element: [object HTMLDivElement]
> > INFO: returned focused element: [object HTMLDivElement]
> > INFO: focus set on feedbacks87 from server side
> >
> >   It looks like "busy" Channel 0 is causing somehow. But, btw, nothing is
> > happening during this time: so no idea why Channel 0 might be busy.
> >
> > Do you have any ideas?
> >
> > Thanks,
> >
> > Ilia
> > -
> > Orienteer(http://orienteer.org) - open source Business Application
> > Platform
> >
> >
>


Re: resources in wicket have problem.

2021-06-08 Thread Martin Grigorov
On Tue, Jun 8, 2021 at 7:47 AM vahid ghasemi 
wrote:

> https://github.com/vahida1157/wicketbase
> this is my project.
>

It is much bigger than "two pages"
Please try to simplify it or at least explain which two pages you mean,
tell us steps to reproduce and Start.java in src/test as in the quickstarts.


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


Re: resources in wicket have problem.

2021-06-07 Thread Martin Grigorov
On Mon, Jun 7, 2021 at 8:50 PM vahid ghasemi 
wrote:

> add(new Image("profilePhotoHeader", new
> PackageResourceReference(Bootstrap5.class,
> "media/avatars/blank.png")));
> just say what you need to know.
> Can I send a file or image here?
>

No, attachments are not allowed in the mailing list.
But you can upload your project in GitHub and we will take a look!


>
>
> ‫‪Bergmann Manfred‬‏ <‪m...@software-by-mabe.com‬‏> در تاریخ دوشنبه ۷
> ژوئن ۲۰۲۱ ساعت ۲۱:۳۷ نوشت:‬
> >
> > Hi.
> >
> > Hard to say anything without more info.
> > How are you loading the images?
> >
> > Did you have a look here?
> >
> https://ci.apache.org/projects/wicket/guide/8.x/single.html#_package_resources
> >
> >
> >
> > Manfred
> >
> > > Am 07.06.2021 um 18:55 schrieb vahid ghasemi <
> vahidghasemi...@gmail.com>:
> > >
> > > I created a new web application with 2 pages.
> > > The first page is my home page and has a wicket link for getting to the
> > > second page and has some images.
> > > The second page has a wicket link for getting to the first page and has
> > > some images too.
> > > when I deploy the project on my PC everything is ok(images are shown
> and
> > > link working for getting to the second page(with setResponsePage()
> method))
> > > but after clicking on the link and getting on the second page
> everything is
> > > wrong(images aren't shown and the link is not working).
> > > after debugging I figure out images resources on the first page is
> complete
> > > (./wicket/resource/{other_path}).
> > > but when I go to the second page, my URL is
> > > (localhost:8080/wicket/bookmarkable/{class_page_name}) and Wicket for
> > > getting a shorter URL images resources is (../resource/{other_path})
> and
> > > when I move my cursor on the link I found out that the absolute image
> > > source is (localhost:8080/resource/{other_path}) instead of
> > > (localhost:8080/wicket/resource/{other_path}).
> > > It is good and should work. but is not working on my project and
> images are
> > > not found and also the link for getting to the first page not working.
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: CVE-2021-23937: Apache Wicket: DNS proxy and possible amplification attack

2021-05-26 Thread Martin Grigorov
On Wed, May 26, 2021, 18:37 Mihir Chhaya  wrote:

> Thank you for the reply.
>
> We have something like below in our code. Will this be enough or still we
> need to replace the jar file?
>

The CVE is about usage of Wicket APIs.

Anything you do in your app code is your responsibility to make sure is
secure.


> public static String getRemoteAddr(HttpServletRequest request) {
>
>
>  //If routed behind the Load Balancer, network guys put the original IP in
> the header as XForwarded-For
>
>  String remoteAddr = request.getHeader("X-Forwarded-For");
>
>  if (StrUtils.isBlank(remoteAddr)) {
>
> remoteAddr= request.getHeader("x-forwarded-for");
>
>  }
>
>  if (StrUtils.isBlank(remoteAddr)) {
>
> remoteAddr=request.getRemoteAddr();
>
>  }
>
>  return remoteAddr;
>
> }
>
>
> On Wed, May 26, 2021 at 11:05 AM Matt Pavlovich 
> wrote:
>
> > Thank you for the notice, and the already fixed releases =)
> >
> > Is there a JIRA or associated PR with the fix? I’m not seeing a specific
> > fix in the changelogs for 9.3.0 and 8.12.0.
> >
> > Thanks,
> > Matt Pavlovich
> >
> > > On May 25, 2021, at 2:51 AM, Emond Papegaaij <
> emond.papega...@gmail.com>
> > wrote:
> > >
> > > Description:
> > >
> > > A DNS proxy and possible amplification attack vulnerability in
> > > WebClientInfo of Apache Wicket allows an attacker to trigger arbitrary
> > > DNS lookups from the server when the X-Forwarded-For header is not
> > > properly sanitized. This DNS lookup can be engineered to overload an
> > > internal DNS server or to slow down request processing of the Apache
> > > Wicket application causing a possible denial of service on either the
> > > internal infrastructure or the web application itself.
> > >
> > > This issue affects Apache Wicket Apache Wicket 9.x version 9.2.0 and
> > > prior versions; Apache Wicket 8.x version 8.11.0 and prior versions;
> > > Apache Wicket 7.x version 7.17.0 and prior versions and Apache Wicket
> > > 6.x version 6.2.0 and later versions.
> > >
> > > Mitigation:
> > >
> > > Sanitize the X-Forwarded-For header by running an Apache Wicket
> > > application behind a reverse HTTP proxy. This proxy should put the
> > > client IP address in the X-Forwarded-For header and not pass through
> > > the contents of the header as received by the client.
> > >
> > > The application developers are recommended to upgrade to:
> > > - Apache Wicket 7.18.0
> > >  >
> > > - Apache Wicket 8.12.0
> > >  >
> > > - Apache Wicket 9.0.0
> > > 
> > >
> > > Credit:
> > >
> > > Apache Wicket would like to thank Jonathan Juursema from
> > > Topicus.Healthcare for reporting this issue.
> > >
> > > Apache Wicket Team
> > >
> > > -
> > > 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: CVE-2021-23937: Apache Wicket: DNS proxy and possible amplification attack

2021-05-26 Thread Martin Grigorov
Hi,

Please use users@ or dev@. There is nothing to announce@

On Wed, May 26, 2021 at 5:36 PM Mihir Chhaya  wrote:

> Thank you for sharing this information.
>
> Questions:
> 1. Will there be any upgrades from Wicket-CDI, Wicket-bootstrap etc.
> libraries related to this Vulnerability?
>

wicket-cdi is part of Apache Wicket releases, so there is nothing more to
do.
wicket-bootstrap could be used with any version of Wicket, as long it is
binary compatible, i.e. same major version.


> 2. If yes, then should I wait for those libraries or go ahead and put the
> core Apache Wicket libraries first and then upgrade other libraries when
> available?
>

Just update wicket-core to a version with the fix.


>
> Thank you,
> -Mihir.
>
> On Tue, May 25, 2021 at 3:51 AM Emond Papegaaij  >
> wrote:
>
> > Description:
> >
> > A DNS proxy and possible amplification attack vulnerability in
> > WebClientInfo of Apache Wicket allows an attacker to trigger arbitrary
> > DNS lookups from the server when the X-Forwarded-For header is not
> > properly sanitized. This DNS lookup can be engineered to overload an
> > internal DNS server or to slow down request processing of the Apache
> > Wicket application causing a possible denial of service on either the
> > internal infrastructure or the web application itself.
> >
> > This issue affects Apache Wicket Apache Wicket 9.x version 9.2.0 and
> > prior versions; Apache Wicket 8.x version 8.11.0 and prior versions;
> > Apache Wicket 7.x version 7.17.0 and prior versions and Apache Wicket
> > 6.x version 6.2.0 and later versions.
> >
> > Mitigation:
> >
> > Sanitize the X-Forwarded-For header by running an Apache Wicket
> > application behind a reverse HTTP proxy. This proxy should put the
> > client IP address in the X-Forwarded-For header and not pass through
> > the contents of the header as received by the client.
> >
> > The application developers are recommended to upgrade to:
> > - Apache Wicket 7.18.0
> > 
> > - Apache Wicket 8.12.0
> > 
> > - Apache Wicket 9.0.0
> > 
> >
> > Credit:
> >
> > Apache Wicket would like to thank Jonathan Juursema from
> > Topicus.Healthcare for reporting this issue.
> >
> > Apache Wicket Team
> >
> > -
> > To unsubscribe, e-mail: announce-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: announce-h...@wicket.apache.org
> >
> >
>


Re: Embedding Wicket Components

2021-05-25 Thread Martin Grigorov
Hi,

On Mon, May 24, 2021 at 3:51 AM Ilya Naryzhnyy  wrote:

> Hello,
>
> I'm thinking about creating JavaScript library for more seamless embedding
> Wicket components and pages into external HTML pages. Use case: there is
> Wordpress site and it's needed to embed few components into corresponding
> pages. Your advice is needed!
>
> There are few options to do that:
> 1) IFRAME. It's the most easiest way, but there are some disadvantages:
> problems with SEO, vertical stretching, usability and etc.
> 2) Natural embedding through "document.write'. There are also some
> disadvantages: styles and scripts namespaces, security and etc.
>
> But nevertheless second option looks for me pretty interesting. Please stop
> me if you think otherwise.
>
> Logic of embedding:
>
> 1) User ebbedd special JavaScript library. For example by snippet: " src="http://mywicketsite/wicket-exporter.js";>"
> 2) User "binds" local element id to some Wicket Component. For example:
> WicketExporter.bind("elementId", "com.mypackage.MyComponent', attrsAsJson);
> 3) The library "renders" first all required Wicket scripts, libraries and
> present required element first as "dummy element".
> 4) Through Wicket Ajax Library invoke special "page" which returns
> AjaxRequestTarget which replace "dummy element" with required one.


>
> Your thoughts?
> After marrying VueJS and Wicket (https://github.com/OrienteerBAP/vuecket)
> I'm sure that it's possible, but, probably, I don't see some obvious
> obstacles.
>

I also don't see any problems doing it!


>
> Thanks,
>
> Ilia
> -
> Orienteer(http://orienteer.org) - open source Business Application
> Platform
>


Re: FileNotFoundException

2021-05-18 Thread Martin Grigorov
On Tue, May 18, 2021, 17:27 Eric Hamel  wrote:

> Martin,
>
> ViewerControls is a serializable class (pojo). I see it’s being referenced
> in a PackageResourceReference inside a behavior for loading different css
> files based on properties inside ViewerControls.


Does it fail occasionally or always?
Maybe it breaks for some of the properties?!
Show us the related code!


>
> If this is the culprit, I’m not sure how I would go about to solving this.
>
> —
> Eric Hamel
> Senior Project Manager
> Albany Information Technology Group
> C. 518-698-4503
>
> > On May 18, 2021, at 9:38 AM, Martin Grigorov 
> wrote:
> >
> > Hi,
> >
> > See inline!
> >
> >> On Tue, May 18, 2021 at 4:02 PM Eric Hamel 
> wrote:
> >>
> >> Good morning,
> >>
> >> For the last month I’ve been struggling to find the root cause of the
> >> following exception. It is polluting our logs and I’m just not
> >> understanding what’s happening here.
> >>
> >> We’re on Wicket 6.24.0
> >>
> >> Any help would be appreciated.
> >>
> >> Thank you
> >>
> >> E com.ibm.ws.webcontainer.filter.FilterInstanceWrapper doFilter
> SRVE8109W:
> >> Uncaught exception thrown by filter wicket:
> java.io.FileNotFoundException:
> >> SRVE0190E: File not found:
> >>
> /wicket/resource/gov.osc.ouf.web.components.viewer.controls.ViewerControls
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor._processEDR(DefaultExtensionProcessor.java:976)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.processEDR(DefaultExtensionProcessor.java:957)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:485)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
> >>
> >>   at
> >>
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:267)
> >>
> >
> >
> https://github.com/apache/wicket/blob/rel/wicket-6.24.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java#L267
> > - here we see that Wicket didn't process the request and let the next
> > Servlet Filter to do it, namely
> > com.ibm.ws.webcontainer.filter.WebAppFilterChain
> > Later it fails with "File not found".
> >
> > The question is why Wicket didn't handle the request to
> /wicket/resource/...
> > Wicket produces such urls for ResourceReferences like JavaScript and CSS,
> > but "gov.osc.ouf.web.components.viewer.controls.ViewerControls" has no
> > extension ...
> > You need to find out where this resource reference is contributed to the
> > page and why its url looks incomplete.
> >
> >
> >>
> >>   at
> >>
> >>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
> >
> >
> >>   at
> >>
> >>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
> >>
> >>   at
> >> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3980)
> >>
> >>   at
> >> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
> >>
> >>   at
> >>
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1016)
> >>
> >>   at
> >>
> >>
> com.ibm.ws.webcontai

Re: FileNotFoundException

2021-05-18 Thread Martin Grigorov
Hi,

See inline!

On Tue, May 18, 2021 at 4:02 PM Eric Hamel  wrote:

> Good morning,
>
> For the last month I’ve been struggling to find the root cause of the
> following exception. It is polluting our logs and I’m just not
> understanding what’s happening here.
>
> We’re on Wicket 6.24.0
>
> Any help would be appreciated.
>
> Thank you
>
> E com.ibm.ws.webcontainer.filter.FilterInstanceWrapper doFilter SRVE8109W:
> Uncaught exception thrown by filter wicket: java.io.FileNotFoundException:
> SRVE0190E: File not found:
> /wicket/resource/gov.osc.ouf.web.components.viewer.controls.ViewerControls
>
>at
>
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor._processEDR(DefaultExtensionProcessor.java:976)
>
>at
>
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.processEDR(DefaultExtensionProcessor.java:957)
>
>at
>
> com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:485)
>
>at
>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136)
>
>at
>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97)
>
>at
>
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:267)
>

https://github.com/apache/wicket/blob/rel/wicket-6.24.0/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java#L267
- here we see that Wicket didn't process the request and let the next
Servlet Filter to do it, namely
com.ibm.ws.webcontainer.filter.WebAppFilterChain
Later it fails with "File not found".

The question is why Wicket didn't handle the request to /wicket/resource/...
Wicket produces such urls for ResourceReferences like JavaScript and CSS,
but "gov.osc.ouf.web.components.viewer.controls.ViewerControls" has no
extension ...
You need to find out where this resource reference is contributed to the
page and why its url looks incomplete.


>
>at
>
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)


>at
>
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)
>
>at
>
> com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
>
>at
>
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
>
>at
>
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
>
>at
>
> com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
>
>at
> com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3980)
>
>at
> com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
>
>at
> com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1016)
>
>at
>
> com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
>
>at
> com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
>
>at
>
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
>
>at
>
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
>
>at
>
> com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
>
>at
>
> com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
>
>at
>
> com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
>
>at
>
> com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
>
>at
>
> com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
>
>at
> com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
>
>at
> com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
>
>at
>
> com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
>
>at
> com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
>
>at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1892)
>


Re: Disable first level cache - session

2021-04-15 Thread Martin Grigorov
On Thu, Apr 15, 2021 at 1:31 PM Bergmann Manfred 
wrote:

> Hi.
>
> Hmm. Does not seem to remove the session attribute
> „persistentPageManagerData“, or lower it’s size.
> It still stores a "org.apache.wicket.page.PageStoreManager$SessionEntry“
> object which seems to contain a serialized page.
> It is still quite large. That’s my goal, to remove this session data to
> keep the session size low.
>
> I have a custom Akka Distributed Data session data store (on Jetty).
> The first logging is without the „persistentPageManagerData“, manually
> removed, and put back for the second logging.
>
> DDataSessionDataStore$ - Serializing session...done in 0ms
> DDataSessionDataStore$ - Session size: 5215
> DDataSessionDataStore$ - Serializing session...done in 3ms
> DDataSessionDataStore$ - Session size: 89995
>
> My Application looks like this. I’ve used an AbstractPageStore here
> because it already does the (de)serialization code needed for the data
> store.
>
> setPageManagerProvider(new DefaultPageManagerProvider(this) {
>   override protected def newPageStore(dataStore: IDataStore):
> IPageStore = {
> new AbstractPageStore(getFrameworkSettings().getSerializer(),
> dataStore) {
>   override def getPage(sessionId: String, pageId: Int):
> IManageablePage = {
> deserializePage(getPageData(sessionId, pageId))
>   }
>   override def removePage(sessionId: String, pageId: Int): Unit = {
> removePageData(sessionId, pageId)
>   }
>   override def storePage(sessionId: String, page:
> IManageablePage): Unit = {
> storePageData(sessionId, page.getPageId, serializePage(page))
>   }
>   override def unbind(sessionId: String): Unit = {}
>   override def canBeAsynchronous(): Boolean = true
> }
>   }
> })
>
> Is it necessary to tweak something in PageStoreManager?
>

Yes, it seems you need to get rid of this method here -
https://github.com/apache/wicket/blob/53a68caf0b16b6faca07132a7939dedc6184de2f/wicket-core/src/main/java/org/apache/wicket/page/PageStoreManager.java#L498-L502

Beware that this part of Wicket has been reworked in Wicket 9.x and once
you make these changes in 8.x you will need to redo them once you upgrade
to 9.x. Maybe it is a good idea first to migrate to 9.x.


>
>
> Manfred
>
>
> > Am 15.04.2021 um 09:06 schrieb Martin Grigorov :
> >
> > Hi,
> >
> > You need to create a custom IPageManagerProvider.
> > To make it simpler you can extend from
> >
> https://github.com/apache/wicket/blob/wicket-8.x/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java
> > and override its #newPageStore(IDataStore)
> > and return an IPageStore that does nothing but delegates to the
> IDataStore.
> >
> > Then in YourApplication#init() call setPageManagerProvider(yourProvider);
> >
> > On Wed, Apr 14, 2021 at 5:07 PM Bergmann Manfred <
> m...@software-by-mabe.com>
> > wrote:
> >
> >> Hi.
> >>
> >> Is there a way to disable the first level cache in Wicket 8?
> >> Reading the documentation this should be the session attribute named:
> >> „persistentPageManagerData“.
> >> Since this attribute is written in PageStoreManager (specifically
> >> PersistentRequestAdapter) I’m not entirely certain how to accomplish
> that
> >> in a proper way.
> >> It would be sufficient for me to run the application from the second
> level
> >> cache only.
> >>
> >>
> >> Manfred
> >> -
> >> 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: Disable first level cache - session

2021-04-15 Thread Martin Grigorov
Hi,

You need to create a custom IPageManagerProvider.
To make it simpler you can extend from
https://github.com/apache/wicket/blob/wicket-8.x/wicket-core/src/main/java/org/apache/wicket/DefaultPageManagerProvider.java
and override its #newPageStore(IDataStore)
and return an IPageStore that does nothing but delegates to the IDataStore.

Then in YourApplication#init() call setPageManagerProvider(yourProvider);

On Wed, Apr 14, 2021 at 5:07 PM Bergmann Manfred 
wrote:

> Hi.
>
> Is there a way to disable the first level cache in Wicket 8?
> Reading the documentation this should be the session attribute named:
> „persistentPageManagerData“.
> Since this attribute is written in PageStoreManager (specifically
> PersistentRequestAdapter) I’m not entirely certain how to accomplish that
> in a proper way.
> It would be sufficient for me to run the application from the second level
> cache only.
>
>
> Manfred
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Problem with MetaData when detaching Component

2021-04-12 Thread Martin Grigorov
Hi,

On Mon, Apr 12, 2021 at 12:13 PM Daniel Radünz  wrote:

> Hello,
>
> I am facing a problem with our Wicket 8.10.0 application and I wonder if
> it's a
> bug or if I am using the MetaData feature in an unsupported or wrong way.
>
> I have a Behavior, which adds a MetaData entry to a component in the
> Behavior's
> "onConfigure(Component component)" method and later removes the same
> MetaData again
> from the component in the Behaviour's "detach(Component component)" method.
> (I'll skip explaining what it is used for, but if it's important to
> understand my
> use case I'll gladly explain it)
>
> Now upon detaching the component with said Behaviour, Wickets
> NotDetachedModelChecker
> encountered a not detached model in the component. After debugging the
> problem for
> a few hours I discovered the cause:
>
> Right before the detach phase starts, the components internal "data" field
> is an
> array with the following 4 entries:
> - [0] the component's Model
> - [1] the MetaDataEntry belonging to the described Behavior
> - [2] the Behavior itself
> - [3] an AttributeModifier with a StringResourceModel
>
> When the component's "detach()" method is called by Wicket, it internally
> calls
> the static "Behaviors.detach(Component component)" method. This method
> then iterates
> through all the entries in the aforementioned "data" array and detaches
> them, if
> they are Behaviours.
> Now when it detaches the Behavior (index 2), the MetaDataEntry (index 1)
> gets removed
> as well by our Behavior, shifting every entry in the data array by 1. The
> next loop
> iteration for index 3 then doesn't find anything anymore, since the
> AttributeModifier,
> which still needed to get detached, is now at index 2 and not 3 anymore,
> ultimately
> resulting in the observed error from the NotDetachedModelChecker.
>
> To fix the problem for now I set the MetaDataEntry to a known non-null
> "undefined"
> value in the Behavior's "detach(Component component)" method and then
> compare that
> value again in the Behavior's "onConfigure(Component component)" to treat
> it as null.
>
> Now I wonder, if you would consider this being a bug, if I'm just using it
> the wrong
> way or if I should rather save the information in a different way, like
> for example
> in a map (Component mapped to value) in the RequestCycle object.
>

It sounds like a bug to me!
Please create an issue in JIRA. With a failing test case would be perfect!

To work it around you can probably use RequestCycle's MetaData instead.

Regards,
Martin


>
> Thanks for your help
>
> Daniel
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Can the new ModalDialog be stacked?

2021-04-08 Thread Martin Grigorov
Hi,

On Fri, Apr 9, 2021 at 6:39 AM Chris Colman  wrote:

> I have just noticed in Wicket 9 that ModalWindow has been deprecated and
> replaced by ModalDialog (which sounds pretty good)
>
> It is possible to stack ModalDialogS like we could stack ModalWindowS?
>
> e.g. In a page a user opens a parent modal that has a "Details" button,
> which, when clicked, pops up another ModalDialog over the parent
> ModalDialog
>
>
The new example in Wicket-Examples module shows this.
https://examples9x.wicket.apache.org/ajax/modal-dialog


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


Re: Wicket 8.x Migration Issues with AjaxFallBackLink

2021-03-23 Thread Martin Grigorov
Hi,

On Tue, Mar 23, 2021 at 7:43 AM Satyavathi Iynaparthi
 wrote:

> Classification: Confidential
>

I am not sure whether I am allowed to read further.


>
> Hi Team,
>
> We are in process of migration our Web application from Wicket 6.30 to
> Wicket 8.11.0.
> As a first step, placed below jars in the classpath.
>
> wicket-auth-roles-8.11.0.jar
> wicket-core-8.11.0.jar
> wicket-datetime-8.0.0-M7.jar
>

better use
https://github.com/wicketstuff/core/tree/master/wicket-datetime-parent ,
https://search.maven.org/artifact/org.wicketstuff/wicketstuff-datetime-yui/8.11.0/jar


> wicket-extensions-8.11.0.jar
> wicket-request-8.11.0.jar
> wicket-util-8.11.0.jar
> wicketstuff-inmethod-grid-8.11.0.jar
>
> Addressed the compilation issues related to AjaxFallBackLink onClick()
> method .
> Changed the method signature to public void
> onClick(Optional target).
>
> We have a Html page
>
> SettingsPanel.html
>
> 
> http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd; lang="en">
>
> 
>wicket:id="saveSettingsLink">
>
>
> 
>
> 
>
> SettingsPanel.java
>
> AjaxFallbackLink settingsLink = new
> AjaxFallbackLink("saveSettingsLink") {
>   private static final long serialVersionUID = 1L;
>
>   @Override
>   public void onClick(Optional target) {
> //some logic
> target.get().add(feedback);
>

replace it with: target.ifPresent(t -> t.add(feedback));

I am not sure what is the reason to still use AjaxFallback** components but
if your users really disable JavaScript in their browsers then you have to
check that the Optional brings AjaxRequestTarget before trying to use it.


>
>   }
> };
> Image img = new Image("saveIcon", new Model() {
>   private static final long serialVersionUID = 1L;
>
>   @Override
>   public Serializable getObject() {
> return new
> PackageResourceReference(SettingsPanel.class,"save.png");
>   }
> });
> img.add(new AttributeModifier("title", new
> StringResourceModel("saveTitle", ColumnSettingsLinkPanel.this,
> new Model(;
> settingsLink.add(img);
>
> With the above code, in Wicket 6.30, save image (save.png) gets displayed
> on the page and when user clicks on the image link,
> onlick(AjaxRequestTarget target) gets triggered.
> Post migrating to Wicket 8.11.0, image is not displaying on the page and
> when user clicks on the image link, onClick(Optional
> target) getting triggered, but the target value is always Empty.
>
> Below is the stack trace
> ERROR - DefaultExceptionMapper - Unexpected error occurred
> java.util.NoSuchElementException: No value present
> at java.base/java.util.Optional.get(Optional.java:148)
> at
> com.csc.pts.web.ui.ColumnSettingsLinkPanel$3.onClick(SettingsPanel.java:98)
> at
> org.apache.wicket.ajax.markup.html.AjaxFallbackLink.onClick(AjaxFallbackLink.java:122)
> at org.apache.wicket.markup.html.link.Link.onRequest(Link.java:189)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.internalInvoke(ListenerRequestHandler.java:306)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:255)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:215)
> at
> org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:208)
> at
> org.apache.wicket.core.request.handler.RequestSettingRequestHandler.respond(RequestSettingRequestHandler.java:78)
> at
> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:912)
> at
> org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:65)
> at
> org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:283)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:253)
> at
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:221)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:262)
> at
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:204)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:286)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:496)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
> at
> 

Re: Add input in javascript and process value in form?

2021-03-12 Thread Martin Grigorov
Hi,

On Fri, Mar 12, 2021, 15:13 Per Newgro  wrote:

> Hi,
>
> i would like to add some input fields to an ul/li using JS.
>
> 
>   
> function add_fields() {
>   var d = document.getElementById("items");
>   var i = d.childElementCount;
>   d.innerHTML += "
  • "; > } > > > > value="Add More" /> > > > > > > > > > > Currently in Form.onSubmit values are empty. > > Is this possible? Is there an example for this? > Yes, I don't see why not. Check whether the values are submitted in the browser's DevTools>Network tab. At the server side you don't have the corresponding Wicket Form components so you need to use Request.getParameterNames() and getParameterValue(String) > Thanks for your support > Per > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >

    Re: Any CSP migration tips??

    2021-02-16 Thread Martin Grigorov
    Hi,
    
    In your case I'd disable CSP and migrate the app to 9.2.0.
    Once all runs as before I will start experimenting enabling CSP little by
    little, e.g. allow inline scripts and styles for resources served by your
    application, i.e. same domain. Any third party scripts/styles should be CSP
    compatible. Once this is done then start improving your scripts and styles.
    
    On Tue, Feb 16, 2021 at 1:50 PM Wayne W  wrote:
    
    > HI,
    >
    > We are now looking at migrating to Wicket9 and implementing CSP. However we
    > have 10,000s of pages on a 13 year old wicket project and the task almost
    > looks impossible. For example most of our components/panel/pages use inline
    > style some a fair amount of JS as this was chosen at the start as being the
    > most manageable way of development and also not downloading unnecessarily
    > to the end client CSS/JS due to the very large amount of diverse
    > pages/functionality. We are a very small team of 3.
    >
    > Has anyone undertaken a similar migration and have any tips on how to make
    > it less painful or good ways of organizing the CSS/JS? Have to move JS/CSS
    > to Java, we really want to avoid as much as possible.
    >
    > Any thoughts welcome.
    > Thanks
    >
    
    

    Re: Provide a additional static content with https://github.com/MarcGiffing/wicket-spring-boot

    2021-01-13 Thread Martin Grigorov
    In that case you should report it at
    https://github.com/MarcGiffing/wicket-spring-boot/issues
    
    On Wed, Jan 13, 2021 at 5:28 PM Daniel Weiss  wrote:
    
    > Hey all,
    >
    > I've tested it. A mini spring-boot provide static content with functions
    > of https://www.baeldung.com/spring-mvc-static-resources. A mini spring
    > boot app with wicket-spring-boot does not provide it. I got a error
    > message with not found of ...
    >
    > Some ideas or experience about it?
    >
    >
    > Am 13.01.2021 um 14:52 schrieb Martin Grigorov:
    > > Hi, There is nothing Wicket specific in this. Just use Spring Boot/MVC
    > > facilities: https://www.baeldung.com/spring-mvc-static-resources On
    > > Wed, Jan 13, 2021 at 3:08 PM Daniel Weiss  wrote:
    > >> Hi all, I use https://github.com/MarcGiffing/wicket-spring-boot with
    > >> Wicket 8.x and with a spring boot application. I would add static web
    > >> content (online help page) to provide a documentation inside the
    > >> spring boot application. Knows someone a way to provide to serve
    > >> static web content with a set of html sites? I'll thankful for some
    > >> hints for this issue :) Thx in advance Daniel
    > >> -
    > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For
    > >> additional commands, e-mail: users-h...@wicket.apache.org
    > >
    >
    
    

    Re: Provide a additional static content with https://github.com/MarcGiffing/wicket-spring-boot

    2021-01-13 Thread Martin Grigorov
    Hi,
    
    There is nothing Wicket specific in this. Just use Spring Boot/MVC
    facilities: https://www.baeldung.com/spring-mvc-static-resources
    
    On Wed, Jan 13, 2021 at 3:08 PM Daniel Weiss  wrote:
    
    >
    > Hi all,
    >
    > I use https://github.com/MarcGiffing/wicket-spring-boot with Wicket 8.x
    > and with a spring boot application. I would add static web content
    > (online help page) to provide a documentation inside the spring boot
    > application.
    >
    > Knows someone a way to provide to serve static web content with a set of
    > html sites? I'll thankful for some hints for this issue :)
    >
    > Thx in advance
    > Daniel
    >
    >
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Stateless ModalDialog

    2021-01-11 Thread Martin Grigorov
    Hi,
    
    Sven Meier already explained you the problem at
    https://stackoverflow.com/questions/65632010/stateless-modaldialog-in-wicket/65664328
    I've added sample code how to achieve it.
    
    On Sun, Jan 10, 2021 at 7:20 PM Prag Progger  wrote:
    
    > Hi,
    >
    > Is it possible to create a stateless ModalDialog?
    >
    > I tried the following code, but it results in an error. The error
    > doesn't occur when removing the getStatelessHint() overrides, but that
    > would make it stateful. If it's not possible, would it be possible
    > with the deprecated ModalWindow?
    >
    > HTML Code:
    >
    > 
    > 
    > 
    > 
    > .modal-dialog { border-radius: 5px; }
    > .modal-dialog .modal-dialog-content { display: flex;
    > flex-direction: column; }
    > .modal-dialog-overlay.current-focus-trap .modal-dialog-content
    > { resize: both; }
    > .modal-dialog .modal-dialog-form { margin: 0; padding: 0;
    > overflow: hidden; flex: 1; display: flex; flex-direction: column; }
    > .modal-dialog .modal-dialog-header { border-radius: 5px 5px
    > 0px 0px; background: #ffb158; margin: 0; padding-top: 4px; text-align:
    > center; }
    > .modal-dialog .modal-dialog-body { flex: 1; overflow-y: auto;
    > padding: 20px; }
    > .modal-dialog .modal-dialog-footer { padding: 5px; }
    > 
    > 
    > 
    > Open modal
    >
    > 
    >
    > 
    > Modal Dialog
    > Close modal
    > 
    > 
    > 
    >
    > Java Code:
    >
    > package org.example.modaltest;
    >
    > import org.apache.wicket.ajax.AjaxRequestTarget;
    > import org.apache.wicket.ajax.markup.html.AjaxLink;
    > import org.apache.wicket.extensions.ajax.markup.html.modal.ModalDialog;
    > import
    > org.apache.wicket.extensions.ajax.markup.html.modal.theme.DefaultTheme;
    > import org.apache.wicket.markup.html.GenericWebPage;
    > import org.apache.wicket.markup.html.panel.Fragment;
    >
    > public class ModalPage extends GenericWebPage {
    > public ModalPage() {
    > ModalDialog window = new ModalDialog("window");
    > window.add(new DefaultTheme());
    > window.setMarkupId("window");
    > window.setOutputMarkupId(true);
    > add(window);
    >
    > Fragment modalContentFragment = new
    > Fragment(ModalDialog.CONTENT_ID, "modalContentFragment", this);
    > window.setContent(modalContentFragment);
    > modalContentFragment.setOutputMarkupId(true);
    >
    > AjaxLink closeModalLink = new
    > AjaxLink("closeModalLink") {
    > @Override
    > public void onClick(AjaxRequestTarget target) {
    > target.add(window);
    > ModalDialog window1 = (ModalDialog)
    > findPage().get("window");
    > window1.close(target);
    > }
    >
    > @Override
    > protected boolean getStatelessHint() {
    > return true;
    > }
    > };
    > closeModalLink.setOutputMarkupId(true);
    > modalContentFragment.add(closeModalLink);
    >
    > AjaxLink openModalLink = new AjaxLink("openModalLink")
    > {
    > @Override
    > public void onClick(AjaxRequestTarget target) {
    > ModalDialog window1 = (ModalDialog)
    > findPage().get("window");
    > window1.open(target);
    > }
    >
    > @Override
    > protected boolean getStatelessHint() {
    > return true;
    > }
    > };
    > add(openModalLink);
    > }
    > }
    >
    >
    > Error in Browser:
    > "Access Denied. You do not have access to the page you requested.
    > Return to home page"
    >
    > Java Exception:
    >
    > 16:34:16.382 [http-nio-8080-exec-4] WARN
    > o.a.w.c.r.h.ListenerRequestHandler - behavior not enabled; ignore
    > call. Behavior org.apache.wicket.ajax.markup.html.AjaxLink$1@5a149041
    > at component [AjaxLink [Component id = closeModalLink]]
    > 16:34:16.386 [http-nio-8080-exec-4] WARN  RequestCycleExtra -
    > 
    > 16:34:16.390 [http-nio-8080-exec-4] WARN  RequestCycleExtra - Handling
    > the following exception
    >
    > org.apache.wicket.core.request.handler.ListenerInvocationNotAllowedException:
    > Behavior rejected interface invocation. Component: [AjaxLink
    > [Component id = closeModalLink]] Behavior:
    > org.apache.wicket.ajax.markup.html.AjaxLink$1@5a149041
    > at
    > org.apache.wicket.core.request.handler.ListenerRequestHandler.invoke(ListenerRequestHandler.java:276)
    > at
    > org.apache.wicket.core.request.handler.ListenerRequestHandler.invokeListener(ListenerRequestHandler.java:222)
    > at
    > org.apache.wicket.core.request.handler.ListenerRequestHandler.respond(ListenerRequestHandler.java:208)
    > at
    > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:902)
    > at
    > org.apache.wicket.request.RequestHandlerExecutor.execute(RequestHandlerExecutor.java:63)
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Issue overriding JSession cookie name - Wicket assumes overwritten name contains no uppercase characters

    2020-12-09 Thread Martin Grigorov
    https://issues.apache.org/jira/browse/WICKET-6858
    
    On Tue, Dec 8, 2020 at 11:19 AM Sven Meier  wrote:
    
    > Hi Chris,
    >
    > that #toLowerCase() has been introduced with WICKET-4816.
    >
    > The commit does not mention anything about the requirement for a lower
    > case comparison, and the test does not enforce it either:
    >
    >
    > https://github.com/apache/wicket/commit/66bfc8851c0250c02ff6ee0af0f42407a7873ca5#diff-2eff23be497b622b61b1181a1a97d8dcd70143cde2f14d644df573b3ecf7b5f5
    >
    > So this has probably been just an unnecessary precaution.
    >
    > Please open an issue.
    >
    > Thanks
    > Sven
    >
    >
    > On 08.12.20 08:48, Chris Colman wrote:
    > > Tomcat, and presumably other JEE app containers, now allow the
    > > specification of the name of the JSESSIONID parameter to use in the
    > > URL (even though cookies are largely used in place of this the initial
    > > hit on a web site will include the jsessionid parameter by default)
    > >
    > > This is done by setting a  attribute called 'sessionCookieName'
    > >
    > > e.g.
    > >
    > > 
    > >
    > > This can be specified in mixed case and Tomcat will preserve the case.
    > >
    > > Wicket allows a matching value to be specified via a Java -D command
    > > line option:
    > >
    > > e.g.
    > >
    > > -Dwicket.jsessionid.name=JSESSIONID-Integration
    > >
    > > However Wicket's Strings.stripJSessionId() method assumes that the
    > > JSESSIONID parameter name is always in lowercase which causes failures
    > > if it is not:
    > >
    > >
    > > public static String stripJSessionId(final String url)
    > > {
    > > if (Strings.isEmpty(url))
    > > {
    > > return url;
    > > }
    > >
    > > // http://.../abc;jsessionid=...?param=...
    > > int ixSemiColon =
    > > url.toLowerCase(Locale.ROOT).indexOf(SESSION_ID_PARAM);<--
    > > seemingly unnecessary, unwanted toLowerCase() call
    > > if (ixSemiColon == -1)
    > > {
    > > return url;
    > > }
    > >
    > > ...
    > >
    > > }
    > >
    > >
    > > Is there any need for the toLowerCase() method call in there? No app
    > > container should be performing a "to lower case" on the parameter name
    > > and URLs in general can have case sensitive parameter names in query
    > > parameters etc., so the toLowerCase seems redundant and it causes
    > > issues as detailed above.
    > >
    > >
    > > Regards,
    > >
    > > Chris
    > >
    > >
    > >
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Apache Wicket - Enforcing POST on Ajax calls

    2020-10-19 Thread Martin Grigorov
    https://issues.apache.org/jira/browse/WICKET-6844
    
    I've decided to implement it at AbstractDefaultAjaxBehavior so almost all
    Ajax behaviors could make use of it.
    
    On Mon, Oct 19, 2020 at 8:21 PM Sven Meier  wrote:
    
    > +1 that's a good proposal
    >
    > Sven
    >
    >
    > On 19.10.20 12:33, Maxim Solodovnik wrote:
    > > +1
    > >
    > > On Mon, 19 Oct 2020 at 17:28, Martin Grigorov 
    > wrote:
    > >
    > >> Hi Eric,
    > >>
    > >> You can implement it yourself:
    > >>
    > >> In #onUpdate(AjaxRequestTarget) start with:
    > >>
    > >> AjaxRequestAttributes attrs = getAttributes();
    > >> String desiredMethod = attrs.getMethod().toString();
    > >> String actualMethod = ((HttpServletRequest)
    > >> RequestCycle.get().getRequest().getContainerRequest()).getMethod();
    > >> if (!desiredMethod.equalsIgnoreCase(actualMethod)) {}
    > >>
    > >> @devs: What do you think about adding the above to
    > >> AjaxFormComponentUpdatingBehavior#onEvent() ?
    > >> We can add #onMethodMismatch() to AjaxFormComponentUpdatingBehavior
    > that is
    > >> similar to one in Form. If it returns ABORT then we will execute the
    > code
    > >> above. If it returns CONTINUE (the default) then no need to calculate
    > the
    > >> AjaxRequestAttributes
    > >>
    > >>
    > >> On Sun, Oct 18, 2020 at 11:40 PM Sven Meier  wrote:
    > >>
    > >>> Hi,
    > >>>
    > >>> with AjaxFormComponentUpdatingBehavior only a single component is
    > >>> processed and not the complete Form.
    > >>> So method mismatches are not checked.
    > >>>
    > >>> Have fun
    > >>> Sven
    > >>>
    > >>>
    > >>> On 17.10.20 14:34, Eric Hamel wrote:
    > >>>> Looking at our implementation, we are using an
    > >>> AjaxFormComponentUpdatingBehavior to trigger our data save.
    > >>>> Even though we do a have parent form the onSubmit is never called.
    > >>>>
    > >>>> Is there an alternative to the onMethodMismatch ?
    > >>>>
    > >>>> —
    > >>>> Eric Hamel
    > >>>> Senior Project Manager
    > >>>> Albany Information Technology Group
    > >>>> C. 518-698-4503
    > >>>>
    > >>>>> On Oct 16, 2020, at 4:32 PM, Martin Grigorov 
    > >>> wrote:
    > >>>>> On Fri, Oct 16, 2020, 23:27 Eric Hamel 
    > >> wrote:
    > >>>>>> I apologize in advance for my vague question. Our Wicket 8 based
    > >>>>>> application was submitted to pen testing from our EISO. While I
    > >>> understand
    > >>>>>> the finding, I'm not 100% sure I understand the problem nor do I
    > know
    > >>> how
    > >>>>>> to address it.
    > >>>>>>
    > >>>>>> In one of our complex forms that uses Ajax Calls to automatically
    > >>> update
    > >>>>>> the DB when the fields lose focus, the tester made the following
    > >>> remark:
    > >>>>>> Applications accepts GET requests for coded POST Ajax calls –
    > >>> parameters
    > >>>>>> can be passed in URL
    > >>>>>>
    > >>>>>> It appears that through his "fuzzer", even though our requests are
    > >>> marked
    > >>>>>> as POST, it still processes GET requests. Is there a way to enforce
    > >>> POST ?
    > >>>>>> Is there any way to mitigate this issue globally from a
    > configuration
    > >>>>>> standpoint ?
    > >>>>>>
    > >>>>> See Form#onMethodMismatch()
    > >>>>>
    > >>>> -
    > >>>> 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: Apache Wicket - Enforcing POST on Ajax calls

    2020-10-19 Thread Martin Grigorov
    Hi Eric,
    
    You can implement it yourself:
    
    In #onUpdate(AjaxRequestTarget) start with:
    
    AjaxRequestAttributes attrs = getAttributes();
    String desiredMethod = attrs.getMethod().toString();
    String actualMethod = ((HttpServletRequest)
    RequestCycle.get().getRequest().getContainerRequest()).getMethod();
    if (!desiredMethod.equalsIgnoreCase(actualMethod)) {}
    
    @devs: What do you think about adding the above to
    AjaxFormComponentUpdatingBehavior#onEvent() ?
    We can add #onMethodMismatch() to AjaxFormComponentUpdatingBehavior that is
    similar to one in Form. If it returns ABORT then we will execute the code
    above. If it returns CONTINUE (the default) then no need to calculate the
    AjaxRequestAttributes
    
    
    On Sun, Oct 18, 2020 at 11:40 PM Sven Meier  wrote:
    
    > Hi,
    >
    > with AjaxFormComponentUpdatingBehavior only a single component is
    > processed and not the complete Form.
    > So method mismatches are not checked.
    >
    > Have fun
    > Sven
    >
    >
    > On 17.10.20 14:34, Eric Hamel wrote:
    > > Looking at our implementation, we are using an
    > AjaxFormComponentUpdatingBehavior to trigger our data save.
    > >
    > > Even though we do a have parent form the onSubmit is never called.
    > >
    > > Is there an alternative to the onMethodMismatch ?
    > >
    > > —
    > > Eric Hamel
    > > Senior Project Manager
    > > Albany Information Technology Group
    > > C. 518-698-4503
    > >
    > >> On Oct 16, 2020, at 4:32 PM, Martin Grigorov 
    > wrote:
    > >>
    > >> On Fri, Oct 16, 2020, 23:27 Eric Hamel  wrote:
    > >>
    > >>> I apologize in advance for my vague question. Our Wicket 8 based
    > >>> application was submitted to pen testing from our EISO. While I
    > understand
    > >>> the finding, I'm not 100% sure I understand the problem nor do I know
    > how
    > >>> to address it.
    > >>>
    > >>> In one of our complex forms that uses Ajax Calls to automatically
    > update
    > >>> the DB when the fields lose focus, the tester made the following
    > remark:
    > >>>
    > >>> Applications accepts GET requests for coded POST Ajax calls –
    > parameters
    > >>> can be passed in URL
    > >>>
    > >>> It appears that through his "fuzzer", even though our requests are
    > marked
    > >>> as POST, it still processes GET requests. Is there a way to enforce
    > POST ?
    > >>> Is there any way to mitigate this issue globally from a configuration
    > >>> standpoint ?
    > >>>
    > >>
    > >> See Form#onMethodMismatch()
    > >>
    > > -
    > > 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: Apache Wicket - Enforcing POST on Ajax calls

    2020-10-16 Thread Martin Grigorov
    On Fri, Oct 16, 2020, 23:27 Eric Hamel  wrote:
    
    > I apologize in advance for my vague question. Our Wicket 8 based
    > application was submitted to pen testing from our EISO. While I understand
    > the finding, I'm not 100% sure I understand the problem nor do I know how
    > to address it.
    >
    > In one of our complex forms that uses Ajax Calls to automatically update
    > the DB when the fields lose focus, the tester made the following remark:
    >
    > Applications accepts GET requests for coded POST Ajax calls – parameters
    > can be passed in URL
    >
    > It appears that through his "fuzzer", even though our requests are marked
    > as POST, it still processes GET requests. Is there a way to enforce POST ?
    > Is there any way to mitigate this issue globally from a configuration
    > standpoint ?
    >
    
    
    See Form#onMethodMismatch()
    
    >
    
    

    Re: [ANNOUNCE] WicketStuff 9.1.0 Released

    2020-10-12 Thread Martin Grigorov
    Ernesto, Maxim,
    
    Please do not use announce@ for such discussions!
    You can just create an issue at
    https://github.com/sebfz1/wicket-jquery-ui/issues/new
    
    On Mon, Oct 12, 2020 at 1:47 PM Maxim Solodovnik 
    wrote:
    
    > Are you using `9.x` branch?
    >
    > On Mon, 12 Oct 2020 at 17:26, Ernesto Reinaldo Barreiro
    >  wrote:
    > >
    > > Or has source code moved to somewhere else?
    > >
    > > On Mon, Oct 12, 2020 at 1:20 PM Ernesto Reinaldo Barreiro <
    > > reier...@gmail.com> wrote:
    > >
    > > > I see
    > > >
    > > > https://github.com/sebfz1/wicket-jquery-ui
    > > >
    > > > Doesn't compile against wicket 9.1.0. I will fix and create PR
    > > >
    > > >
    > > > On Mon, Oct 12, 2020 at 12:20 PM Ernesto Reinaldo Barreiro <
    > > > reier...@gmail.com> wrote:
    > > >
    > > >> Many thanks. Can
    > > >>
    > > >> https://github.com/sebfz1/wicket-jquery-ui
    > > >>
    > > >> Be released too?
    > > >>
    > > >>
    > > >> On Mon, Oct 12, 2020 at 8:56 AM Maxim Solodovnik 
    > > >> wrote:
    > > >>
    > > >>> WicketStuff core 9.1.0 based on Apache Wicket 9.1.0 is released
    > > >>> and soon will be available at Maven Central!
    > > >>>
    > > >>> The changelog is:
    > > >>>
    > > >>> Maxim Solodovnik (7):
    > > >>>   Switching to the next development version
    > > >>>   Fixes issue #699: firstDayOfWeek should be displayed as
    > expected
    > > >>>   wicketstuff-datetime-yui: tests are fixed
    > > >>>   Typos and formatting are fixed, some dependencies are updated
    > > >>>   Wicket is switched back to SNAPSHOT
    > > >>>   Release preparation: dependencies are updated
    > > >>>   wicketstuff-core-9.1.0 release
    > > >>>
    > > >>> Andrea Del Bene (2):
    > > >>>   Applied scope test to xml dependencies
    > > >>>   Try new mvn parameters to avoid "peer not authenticated" error
    > > >>>
    > > >>> Erik Geletti (1):
    > > >>>   Bootstrap version 3 (#698)
    > > >>>
    > > >>> The WicketStuff team
    > > >>>
    > > >>> -
    > > >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > > >>> For additional commands, e-mail: users-h...@wicket.apache.org
    > > >>>
    > > >>>
    > > >>
    > > >> --
    > > >> Regards - Ernesto Reinaldo Barreiro
    > > >>
    > > >
    > > >
    > > > --
    > > > Regards - Ernesto Reinaldo Barreiro
    > > >
    > >
    > >
    > > --
    > > Regards - Ernesto Reinaldo Barreiro
    >
    >
    >
    > --
    > Best regards,
    > Maxim
    >
    
    

    Re: Does wicket 9 support reactive programming?

    2020-09-18 Thread Martin Grigorov
    Hi,
    
    A hint: Wicket won't flush the response if the request is in async mode:
    https://github.com/apache/wicket/blob/286240202cc3cc673cc2f973b6e46da66e7097fc/wicket-core/src/main/java/org/apache/wicket/protocol/http/servlet/ServletWebResponse.java#L313
    https://github.com/apache/wicket/blob/286240202cc3cc673cc2f973b6e46da66e7097fc/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java#L242
    
    I've used Servlet 3.1 async functionality in Wicket IResource in the past.
    
    For Rx this won't help you much though.
    At the moment at render time Wicket traverses the component tree and calls
    #render() for each Component and its behaviors. They all append text to the
    WebResponse. At the end of the request cycle the accumulated content is
    being written to
    the HttpServletResponse.
    If a Component uses an Rx model then you will need to postpone somehow its
    contribution to the content. Finally when all Rx data is available you will
    need to lazily evaluate the postponed contributions.
    Components implementing IFeedback interface are treated specially, so
    FeedbackPanels can collect the feedback from Components which are later in
    the Page.
    I hope this information is useful for you to implement this!
    
    Martin
    
    On Fri, Sep 18, 2020 at 12:13 PM Emmanuel Sowah  wrote:
    
    > Sure, Sven!
    >
    > On Fri, Sep 18, 2020 at 11:07 AM Sven Meier  wrote:
    >
    > > That would be a nice addition to wicketstuff.
    > >
    > > Please keep us updated on how you solved it.
    > >
    > > Have fun
    > > Sven
    > >
    > >
    > > On 18.09.20 11:02, Emmanuel Sowah wrote:
    > > > Hi Korbinian,
    > > >
    > > > Thanks for the quick response.
    > > > I will look into the native websockets option and see if I can work
    > > > something out.
    > > > It would be nicer though if wicket could support reactive programming
    > > > natively, and for example simply pass Flux data to a repeater like
    > > > ListView> or a Mono as a model to a wicket Label.
    > > >
    > > > Cheers
    > > >
    > > > On Fri, Sep 18, 2020 at 10:45 AM Korbinian Bachl <
    > > > korbinian.ba...@whiskyworld.de> wrote:
    > > >
    > > >> Maybe Ajax
    > > >>
    > > >>
    > >
    > https://ci.apache.org/projects/wicket/guide/9.x/single.html#_creating_custom_ajax_call_listener
    > > >> or Websockets 
    > > >>
    > > >>
    > >
    > https://ci.apache.org/projects/wicket/guide/9.x/single.html#_native_websockets
    > > >>
    > > >> - Ursprüngliche Mail -
    > > >>> Von: "Emmanuel Sowah"
    > > >>> An: "users" 
    > > >>> Gesendet: Freitag, 18. September 2020 10:35:24
    > > >>> Betreff: Does wicket 9 support reactive programming?
    > > >>> Hi,
    > > >>>
    > > >>> I am using spring 5 and via reactive programming, I am receiving a
    > Flux
    > > >>> data which I am trying to display in a table on a Wicket page.
    > However
    > > I
    > > >>> get an exception during rendering of the table. The exception
    > basically
    > > >>> says the RequestCycle is closed, which sounds logical to me if wicket
    > > is
    > > >>> not supporting reactive programming due to the non-blocking nature of
    > > >>> reactive programming.
    > > >>>
    > > >>> Does someone have a work-around for this problem? I was thinking
    > along
    > > >> the
    > > >>> lines of saving the RequestCycle and reusing it when data arrives
    > later
    > > >> but
    > > >>> I am not sure if that is the right way to go.
    > > >>>
    > > >>> Currently I am using blocking on the reactive stream as a work-around
    > > but
    > > >>> that leads to a sequential behaviour, which of course defeats the
    > basic
    > > >>> idea of reactive programming.
    > > >>>
    > > >>> Any tips or ideas?
    > > >>>
    > > >>> Cheers,
    > > >>> Emmanuel
    > > >> -
    > > >> 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: Display custom page automatically on session expiry without any action

    2020-09-10 Thread Martin Grigorov
    Hi,
    
    On Fri, Sep 11, 2020 at 4:55 AM Arunachalam Sibisakkaravarthi <
    arunacha...@mcruncher.com> wrote:
    
    > Hi guys,
    > When session expires, user is redirected to a page set by
    > getApplicationSettings().setPageExpiredErrorPage(SomePage.class) on his
    >
    
    Note: *page* expiration is not *session* expiration!
    Wicket stores stateful pages in the IPageStore, usually DiskPageStore, i.e.
    on the disk. Each HTTP session has upper limit of bytes that could be
    stored in the file. Once the limit is reached the oldest page is discarded.
    Any attempt to request such
    discarded page will lead to PageExpiredErrorPage.
    For http session expiration see below.
    
    
    > next action.
    > But I want to display a page automatically without his next action.
    > So that last rendered page will not be displayed after session expiry like
    > banking sites.
    > How do I achieve this?
    >
    >
    The http session expires if there is no activity by the user/browser.
    If there is no activity by the user then the server side code (Wicket)
    cannot do anything. You can use HttpSessionListener#sessionDestroyed() to
    be notified that the session expired but you won't be able to navigate to
    another url and update the browser.
    
    Your only option is to use JavaScript timer (setTimeout()) that should fire
    if there is no user activity bigger than your session timeout. The timer
    could just do something like "document.location='/session/timeout'"
    
    
    >
    >
    >
    > *Thanks And RegardsSibi.ArunachalammCruncher*
    >
    
    

    Re: Urgent help

    2020-08-28 Thread Martin Grigorov
    On Fri, Aug 28, 2020 at 9:02 AM Dan Haywood 
    wrote:
    
    > I doubt that Martin (Grigorov) will be able to help much based on this
    > description, Mukesh... there's not enough info here.
    >
    > I would recommend you put together a small quickstart sample application on
    > github somewhere, which demonstrates and explains clearly the issue that
    > you are having.
    >
    
    Thanks, Dan!
    I was writing the same ...
    
    Mukesh: How do you tamper/change the method ?
    Please explain the steps to reproduce the issue once you share the sample
    application with us!
    
    P.S. No need to address me personally. Many people could help you here.
    
    
    >
    >
    > On Fri, 28 Aug 2020 at 06:49, MUKESH S B  wrote:
    >
    > > Hi Grigorov,
    > >This is Mukesh SB,I am working on a project but not
    > able
    > > to fix the bug.We are using JAVA with wicket as a presentation layer.
    > >
    > > In a page,we have a NEXT button with POST request,if we change/tamper to
    > > GET ,and then if I click on NEXT button.It is processing to next page
    > and I
    > > am getting 200 as a response.
    > > I have implemented Methodmismatch()
    > > But I am still getting same 200 response.
    > >
    > > Please help.Very urgent.
    > > Waiting for your reply.
    > >
    > > Thanks,
    > > Mukesh SB
    > >
    >
    
    

    Re: Migration from 7 to 8.9.0 : Missing Ajax target in listener

    2020-08-24 Thread Martin Grigorov
    On Fri, Aug 21, 2020 at 1:31 PM Frédéric Donckels <
    frederic.donck...@gmail.com> wrote:
    
    > I am indeed using Ajax fallback links. What could make the event handlers
    > not properly registered/firing?
    >
    
    Check for JavaScript errors in your browser DevTools > Console.
    Most probably the JavaScript click event event binding has failed for some
    reason.
    
    
    >
    > I'll check the Ajax response.
    >
    > On Fri, 21 Aug 2020 at 11:46, Bas Gooren  wrote:
    >
    > > Hi,
    > >
    > > It sounds like you are using Ajax fallback links, and the javascript
    > event
    > > handlers are not properly registered or firing.
    > > If that happens, the link is processed like a normal/non-ajax link.
    > >
    > > When you inspect the Ajax response when the list is refreshed, do you see
    > > “Wicket.Ajax.ajax” javascript calls?
    > >
    > > Met vriendelijke groet,
    > > Kind regards,
    > >
    > > Bas Gooren
    > >
    > > Op 21 augustus 2020 bij 11:16:01, Frédéric Donckels (
    > > frederic.donck...@gmail.com) schreef:
    > >
    > > Hello,
    > >
    > > we are in the process of migrating from Wicket 7 to 8.9.0 and have a
    > > troubling issue. On one page, we have a list of elements. When we click
    > on
    > > an "Add Button", an ajax panel is modified in the page to add a new
    > > element
    > > in the list. When the "submit button" (ajax) is clicked, the list is
    > > refreshed (added to the ajax target).
    > >
    > > But the puzzling thing, now, is that the Ajax buttons, in the list, do
    > not
    > > have an ajax target when clicked (the optional is empty, and from what
    > > I've
    > > seen so far, the listener doesn't consider it has been called within an
    > > Ajax request). This only happens when the list has been refreshed, when
    > it
    > > is populated initially, the button triggers properly an ajax listener.
    > >
    > >
    > > And this didn't happen with the same code on Wicket 7.
    > >
    > > Is that a known issue? How can I investigate further?
    > >
    > >
    > > Regards
    > >
    > >
    >
    
    

    Re: Issues with refreshing panel with form

    2020-08-04 Thread Martin Grigorov
    On Tue, Aug 4, 2020 at 2:53 PM Zimen, Michal 
    wrote:
    
    > Thanks,
    >
    >  Well, snippets from source code might come later. My concerns are, that
    > the issue I’m facing is related to this
    > https://issues.apache.org/jira/browse/WICKET-6041
    > None weird logs have been found on both sides.
    >
    > DialogA with a nested form uses POST to update its stuff, but the dialogB
    > handle its work through GET only(no form submission).
    >
    > I was trying to catch the root form submission in form.onSubmit(), but I
    > found out, that this is not called, since the
    > wantSubmitOnNestedFormSubmit() returns false.
    > Therefore I conclude, that after POST request, other references among
    > components are broken.
    >
    
    What do you mean with this ?
    
    
    >
    > The question might be: How to "refresh" or keep these references after
    > nested form is submitted?
    >
    > Thanks a lot,
    >
    >
    >  M.
    >
    > -Original Message-
    > From: Martin Grigorov 
    > Sent: Tuesday, August 4, 2020 10:31 AM
    > To: users@wicket.apache.org
    > Subject: Re: Issues with refreshing panel with form
    >
    > Hi,
    >
    > On Mon, Aug 3, 2020 at 2:53 PM Zimen, Michal 
    > wrote:
    >
    > > Hi Wicket Users,
    > >
    > >
    > >I've just started to learn the Wicket by fixing some issues in our
    > > legacy backlog repository.
    > >
    > > Therefore, I need some clarification to manage my blockpoints. Having
    > > spent enough time to fix it by myself, I finally must turn out to this
    > > help.
    > >
    > > The weird problem could be described following:
    > >
    > >
    > >   1.  A base form contains components and links to
    > > AbstractFormDialog(Jquery-ui) for user inputs.
    > >   2.  When the formDialogA is submitted, some parent components are
    > > updated, some remain empty, as it is expected.
    > >   3.  Another modal formDialogB is open and submitted and expecting
    > > components are not updated.
    > >
    > > When this procedure is done in swapped sequence - firstly formDialogB
    > > and then formDialogA is opened, everything works ok.
    > >
    > > Seems as if, the submitting formDialogA breaks the references for
    > > submission formDialogB.
    > >
    > > Could you please clarify me, what should be checked to avoid this
    > problem?
    > >
    >
    > I'd suggest these two things:
    > 1) check for errors both in the server logs and in the browser
    > 2) use a FeedbackPanel to show any validation errors in all Forms. I.e. if
    > you override #onSubmit()/#onUpdate() then make sure you also override
    > #onError() and if you use Ajax then add the FeedbackPanel to the
    > AjaxRequestTarget
    >
    >
    > >
    > > Thanks,
    > >
    > >M.
    > >
    > >
    > >
    > > Michal Zimen
    > > e-mail: michal.zi...@anasoft.com
    > >
    > >
    >
    
    

    Re: Issues with refreshing panel with form

    2020-08-04 Thread Martin Grigorov
    Hi,
    
    On Mon, Aug 3, 2020 at 2:53 PM Zimen, Michal 
    wrote:
    
    > Hi Wicket Users,
    >
    >
    >I've just started to learn the Wicket by fixing some issues in our
    > legacy backlog repository.
    >
    > Therefore, I need some clarification to manage my blockpoints. Having
    > spent enough time to fix it by myself,
    > I finally must turn out to this help.
    >
    > The weird problem could be described following:
    >
    >
    >   1.  A base form contains components and links to
    > AbstractFormDialog(Jquery-ui) for user inputs.
    >   2.  When the formDialogA is submitted, some parent components are
    > updated, some remain empty, as it is expected.
    >   3.  Another modal formDialogB is open and submitted and expecting
    > components are not updated.
    >
    > When this procedure is done in swapped sequence - firstly formDialogB and
    > then formDialogA is opened, everything works ok.
    >
    > Seems as if, the submitting formDialogA breaks the references for
    > submission formDialogB.
    >
    > Could you please clarify me, what should be checked to avoid this problem?
    >
    
    I'd suggest these two things:
    1) check for errors both in the server logs and in the browser
    2) use a FeedbackPanel to show any validation errors in all Forms. I.e. if
    you override #onSubmit()/#onUpdate() then make sure you also override
    #onError() and if you use Ajax then add the FeedbackPanel to the
    AjaxRequestTarget
    
    
    >
    > Thanks,
    >
    >M.
    >
    >
    >
    > Michal Zimen
    > e-mail: michal.zi...@anasoft.com
    >
    >
    
    

    Re: Page with AjaxSelfUpdatingTimerBehavior in multiple browser tabs

    2020-07-28 Thread Martin Grigorov
    Hi,
    
    On Tue, Jul 28, 2020 at 11:09 AM Zbynek Vavros 
    wrote:
    
    > Hi,
    >
    > We have a page with AjaxSelfUpdatingTimerBehavior and now one of our
    > customers is complaining about "weird" behavior when this page is opened in
    > multiple browser tabs (yeah yeah we told him not to do it...).
    >
    > What happens is that after opening this page in new tab, the previous tab
    > gets ajax redirect on mentioned timer.
    >
    > After some digging I found out that this is happening because the page is
    > stateful.
    > Excerpt from Wicket code:
    >
    > // If the page is stateful then we cannot assume that the listener
    > interface is
    > // invoked on its initial state (right after page initialization) and that
    > its
    > // component and/or behavior will be available. That's why the listener
    > interface
    > // should be ignored and the best we can do is to re-paint the newly
    > constructed
    > // page.
    >
    > I did use StatelessChecker (very useful!) and found out that the reason is
    > this AjaxSelfUpdatingTimerBehavior.
    >
    > Googling around I found this thread from 2011 -
    >
    > http://apache-wicket.1842946.n4.nabble.com/Stateless-page-with-an-auto-update-section-td3795927.html
    > .
    > The suggestion here is to "roll your own timer behavior".
    >
    > Well, I spent some time with Wicket already but this is beyond my
    > knowledge. Can anyone please point me the right direction? Is this even
    > possible? I just have to say the AjaxSelfUpdatingTimerBehavior must stay -
    > this page displays progress bar of background task that is non-negotiable.
    >
    
    Try by overwriting AjaxSelfUpdatingTimerBehavior#getStatelessHint() and
    return true.
    Depending on how complex is your logic in #onTimer() it may work or not.
    See https://stackoverflow.com/a/10589807/497381 for more details. We
    integrated the Jolira's Wicket-Stateless approach in Wicket core since
    ver.7.4.0.
    
    
    >
    > Thanks,
    > Zbynek
    >
    
    

    Re: Lambda expressions on StringResourceModel does not work

    2020-07-14 Thread Martin Grigorov
    Hi again,
    
    On Tue, Jul 14, 2020 at 10:46 AM Martin Grigorov 
    wrote:
    
    > Hi,
    >
    > On Tue, Jul 14, 2020 at 10:10 AM Alberto  wrote:
    >
    >>
    >> Hello,
    >>
    >> I have a StringResourceModel in a parent abstract class of all pages.
    >>
    >> IModel titleModel = new StringResourceModel("contentTitle",
    >> getModel());
    >>
    >> where "contentTitle" is a property specified for every child page in
    >> specific
    >> property files and getModel() returns a chain of a CompoundPropertyModel
    >> and a
    >> LoadableDetachableModel.
    >>
    >> If I simple use it, it works:
    >>
    >> add(new Label("pageTitle", titleModel));
    >>
    >>
    >> But if I apply a lambda expression to it (for example):
    >>
    >> add(new Label("pageTitle", titleModel.map(String::trim)));
    >>
    >> I have an exception.:
    >>
    >> java.util.MissingResourceException: Unable to find property:
    >> 'contentTitle'.
    >> Locale: null, style: null
    >>
    >>
    >> Why it happens?
    >>
    >
    > Because .map() returns a new IModel that does not
    > implement IComponentAssignedModel and Wicket cannot find the property in
    > the visible resource bundles.
    > I.e. your properties are in MyPage.properties and Wicket does not look
    > into them because the model does not know the Component it is assigned to.
    > If the property is in MyApplication.properties then it will work, because
    > this is not related to specific Component.
    >
    > Please file a ticket in JIRA. I think this could be improved.
    >
    
    I just took a look at your ticket (
    https://issues.apache.org/jira/browse/WICKET-6801) and it is not exactly as
    I thought it is.
    
    add(new Label("pageTitle", titleModel.map(String::trim)));
    
    at this line titleModel doesn't yet know its component because at the time
    IModel#map() is called titleModel is not yet added as a model to the Label
    and thus IComponentAssignedModel is not yet involved.
    The new IModel returned by .map() does not implement
    IComponentAssignedModel and thus it cannot delegate the
    #wrapOnAssignment(Component) call.
    
    The good news for you is that you can use IModel titleModel = new
    StringResourceModel("contentTitle", *this*, getModel()); to solve your
    problem. By passing 'this' as parameter you tell StringResourceModel to use
    it instead of depending on
    the Component it is added to (the Label in this case).
    
    I'll see what I can do for WICKET-6801!
    
    
    >
    >
    >>
    >>
    >>
    >>
    >> -
    >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    >> For additional commands, e-mail: users-h...@wicket.apache.org
    >>
    >>
    
    

    Re: Change pageId Parameter structure

    2020-07-14 Thread Martin Grigorov
    On Tue, Jul 14, 2020 at 3:54 PM Ravi Knox  wrote:
    
    > Hi Martin,
    >
    >
    >
    > that was a good starting point, thank you.
    >
    > I had to overwrite basically all Mappers within the SystemMapper and mounts
    > (since they create mappers themselves).
    >
    >
    >
    > The following Methods I had to overwrite:
    >
    > -#encodePageComponentInfo - for adding the custom page param
    >
    > -#getPageComponentInfo - for reading the custom page param as
    > component id
    >
    > -#extractPageParameters - to remove the custom page param from the
    > parameter list
    >
    >
    >
    > Does that make sense to you or did I miss something?
    >
    
    I didn't expect that you will need to overwrite all mappers but I haven't
    tried myself such thing so I am not fully certain how many changes are
    needed.
    I've expected that you will need MyPageInstanceMapper registered and this
    one is either consulted before the original one or produces a better
    compatibility score.
    
    
    >
    >
    >
    > Thanks,
    >
    >
    >
    > Ravi
    >
    >
    >
    > 
    >
    > Hi Ravi,
    >
    >
    >
    > The logic you look for is at
    >
    >
    > https://github.com/apache/wicket/blob/267fb06eec31e8e530fb5f0a4f691a0782e3d5
    >
    > b8/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractC
    > omponentMapper.java#L79
    > 
    >
    > It is called by:
    >
    >
    > https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/a
    > pache/wicket/core/request/mapper/PageInstanceMapper.java#L133
    > 
    >
    >
    >
    > You will need to use custom version of PageInstanceMapper that overrides
    >
    > protected void encodePageComponentInfo(Url url, PageComponentInfo info)
    >
    >
    >
    > On Mon, Jul 13, 2020 at 8:40 AM Ravi Knox  wrote:
    >
    >
    >
    > > Hi all,
    >
    > >
    >
    > >
    >
    > >
    >
    > > my client has a website, where he includes our Wicket application (Wicket
    >
    > > 8.3.0) via JQuery.load() in his template.
    >
    > >
    >
    > > Because of a Reverse-Proxy, he has to whitelist all PageParameters.
    >
    > >
    >
    > >
    >
    > >
    >
    > > To keep it short;
    >
    > >
    >
    > > We need to change the pageId Parameter to something like
    >
    > > "myapp.com/homepage?pageId=1".
    >
    > >
    >
    > >
    >
    > >
    >
    > > After reading source code and googleing I couldn't find a way to do this.
    >
    > >
    >
    > > Is it even possible? If so, where would be the place to look for?
    >
    > >
    >
    > >
    >
    > >
    >
    > > Thanks for any hints,
    >
    > >
    >
    > >
    >
    > >
    >
    > > Ravi
    >
    > >
    >
    > >
    >
    >
    >
    > 
    >
    > Quoted from:
    >
    >
    > http://apache-wicket.1842946.n4.nabble.com/Change-pageId-Parameter-structure
    > -tp4684229p4684233.html
    > 
    >
    >
    
    

    Re: Lambda expressions on StringResourceModel does not work

    2020-07-14 Thread Martin Grigorov
    Hi,
    
    On Tue, Jul 14, 2020 at 10:10 AM Alberto  wrote:
    
    >
    > Hello,
    >
    > I have a StringResourceModel in a parent abstract class of all pages.
    >
    > IModel titleModel = new StringResourceModel("contentTitle",
    > getModel());
    >
    > where "contentTitle" is a property specified for every child page in
    > specific
    > property files and getModel() returns a chain of a CompoundPropertyModel
    > and a
    > LoadableDetachableModel.
    >
    > If I simple use it, it works:
    >
    > add(new Label("pageTitle", titleModel));
    >
    >
    > But if I apply a lambda expression to it (for example):
    >
    > add(new Label("pageTitle", titleModel.map(String::trim)));
    >
    > I have an exception.:
    >
    > java.util.MissingResourceException: Unable to find property:
    > 'contentTitle'.
    > Locale: null, style: null
    >
    >
    > Why it happens?
    >
    
    Because .map() returns a new IModel that does not
    implement IComponentAssignedModel and Wicket cannot find the property in
    the visible resource bundles.
    I.e. your properties are in MyPage.properties and Wicket does not look into
    them because the model does not know the Component it is assigned to.
    If the property is in MyApplication.properties then it will work, because
    this is not related to specific Component.
    
    Please file a ticket in JIRA. I think this could be improved.
    
    
    >
    >
    >
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Change pageId Parameter structure

    2020-07-13 Thread Martin Grigorov
    Hi Ravi,
    
    The logic you look for is at
    https://github.com/apache/wicket/blob/267fb06eec31e8e530fb5f0a4f691a0782e3d5b8/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/AbstractComponentMapper.java#L79
    It is called by:
    https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/core/request/mapper/PageInstanceMapper.java#L133
    
    You will need to use custom version of PageInstanceMapper that overrides
    protected void encodePageComponentInfo(Url url, PageComponentInfo info)
    
    On Mon, Jul 13, 2020 at 8:40 AM Ravi Knox  wrote:
    
    > Hi all,
    >
    >
    >
    > my client has a website, where he includes our Wicket application (Wicket
    > 8.3.0) via JQuery.load() in his template.
    >
    > Because of a Reverse-Proxy, he has to whitelist all PageParameters.
    >
    >
    >
    > To keep it short;
    >
    > We need to change the pageId Parameter to something like
    > "myapp.com/homepage?pageId=1".
    >
    >
    >
    > After reading source code and googleing I couldn't find a way to do this.
    >
    > Is it even possible? If so, where would be the place to look for?
    >
    >
    >
    > Thanks for any hints,
    >
    >
    >
    > Ravi
    >
    >
    
    

    Re: Preventing the ModalWindow from being rendered as iframe

    2020-07-07 Thread Martin Grigorov
    Hi,
    
    On Tue, Jul 7, 2020 at 1:26 PM Lukas Fülling 
    wrote:
    
    > Hi,
    >
    > I'm currently trying to get Javascript callbacks from/to a Wicket
    > ModalWindow to work.
    > Currently, the WebPage the ModalWindow consis of is being redered as an
    > iframe.
    >
    > The Wicket documentation states the following:
    >
    > > Modal window is a draggable window (with either div or iframe content)
    > > that prevent user from interacting the rest of page (using a mask)
    > > until the window is closed.
    > (
    > https://ci.apache.org/projects/wicket/apidocs/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html
    > )
    >
    > Unfortunately I can't find any info on how to make the ModalWindow being
    > rendered as a div instead of an iframe and I wondered if someone on this
    > list knows how to do it.
    >
    
    You should use ModelWindow#setContent(new SomePanel()) instead of passing
    it a Page with ModalWindow#setPageCreator().
    
    
    >
    > Thanks for you help
    >
    > Lukas
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Page locked for a long time

    2020-07-06 Thread Martin Grigorov
    On Sun, Jul 5, 2020 at 9:16 PM Sven Meier  wrote:
    
    > Hi Maxim,
    >
    > you'll have to upload these files to a resource separately.
    >
    > I'm not aware of a reusable solution for that.
    >
    
    Here is a blog article on this topic:
    http://wicketinaction.com/2012/11/uploading-files-to-wicket-iresource/ and
    its demo app: https://github.com/martin-g/blogs/tree/master/file-upload
    
    
    >
    > Have fun
    > Sven
    >
    >
    > On 05.07.20 17:20, Maxim Solodovnik wrote:
    > > Hello All,
    > >
    > > our app allows huge file uploads
    > > I have noticed the page is locked while incoming input stream is being
    > > copied
    > > (might take more than an hour)
    > >
    > >   at java.base@11.0.7/java.io.InputStream.read(InputStream.java:205)
    > > at org.apache.commons.fileupload.util.Streams.copy(Streams.java:98)
    > > at org.apache.commons.fileupload.util.Streams.copy(Streams.java:68)
    > > at
    > >
    > org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:346)
    > > at
    > >
    > org.apache.wicket.protocol.http.servlet.MultipartServletWebRequestImpl.parseFileParts(MultipartServletWebRequestImpl.java:196)
    > > at
    > org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1470)
    > >
    > > Are there any options to prevent page lock?
    > >
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Focusout event fires twice

    2020-06-13 Thread Martin Grigorov
    Hi Claudia,
    
    I'd suggest you to use your browser's Dev Tools and put a breakpoint on
    'focusout' event and see how many times it fires and what is the
    reason/initiator.
    
    On Fri, Jun 12, 2020 at 11:56 AM Claudia Beck  wrote:
    
    > Hi all,
    >
    > i came across the issue when binding a focusout event to a text field,
    > it fires twices each time when leaving the textfield.
    >
    > Example code:
    >
    > TextField textbox = new TextField<>("textbox");
    > textbox.add(new AjaxEventBehavior("focusout") {
    >  @Override
    >  protected void onEvent(AjaxRequestTarget target) {
    >  System.out.println("Focus lost on TextField");
    >  }
    > });
    > add(textbox);
    >
    > This does not happen for blur event. Can this may be caused by event
    > bubbling of focusout?
    >
    > Best regards,
    > Claudia Beck
    >
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: Locatable UnsupportedOperationException

    2020-06-01 Thread Martin Grigorov
    https://issues.apache.org/jira/browse/WICKET-6796
    
    On Mon, Jun 1, 2020 at 4:08 PM Sven Meier  wrote:
    
    > +1 that should have no negative impact
    >
    > Sven
    >
    > On 01.06.20 11:22, Martin Grigorov wrote:
    > > Hi,
    > >
    > > I like the idea to catch UnsupportedOperationException at
    > > org.apache.wicket.IGenericComponent#setModelObject(T) and re-throw it as:
    > > throw new WicketRuntimeException("You need to use read/write Model for
    > > component '{}", this.getPageRelativePath(), uox)
    > >
    > > Does anyone see a drawback ?
    > >
    > > Martin
    > >
    > > On Sat, May 30, 2020 at 11:42 PM Sven Meier  wrote:
    > >
    > >> Hi,
    > >>
    > >> just put a breakpoint on IModel#setObject().
    > >>
    > >> Once your problem hits that breakpoint, you'll be able to derive the
    > >> offending component/model from the stacktrace/variables in your favorite
    > >> IDE.
    > >>
    > >> Have fun
    > >> Sven
    > >>
    > >>
    > >> On 30.05.20 17:13, smallufo wrote:
    > >>> Is it possible to try { setObjectObject(value) } catch { e }
    > >>> and pinpoint which class/model causes this problem ?
    > >>> Or is it too costly ?
    > >>>
    > >>>
    > >>> Francois Meillet  於 2020年5月30日 週六
    > 下午11:02寫道:
    > >>>
    > >>>> Hope that help
    > >>>>
    > >>>> During the process of throwing an exception, the Java Virtual Machine
    > >>>> abruptly completes, one by one, any expressions, statements, method
    > and
    > >>>> constructor invocations, initializers, and field initialization
    > >> expressions
    > >>>> that have begun but not completed execution in the current thread.
    > This
    > >>>> process continues until a handler is found that indicates that it
    > >> handles
    > >>>> that particular exception by naming the class of the exception or a
    > >>>> superclass of the class of the exception (§11.2 <
    > >>>>
    > https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html#jls-11.2
    > >>> ).
    > >>>> If no such handler is found, then the exception may be handled by one
    > >> of a
    > >>>> hierarchy of uncaught exception handlers (§11.3 <
    > >>>>
    > https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html#jls-11.3
    > >>> )
    > >>>> - thus every effort is made to avoid letting an exception go
    > unhandled.
    > >>>>
    > >>>> https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html <
    > >>>> https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html>
    > >>>>
    > >>>>
    > >>>> François
    > >>>>
    > >>>>
    > >>>>
    > >>>>> Le 30 mai 2020 à 16:52, smallufo  a écrit :
    > >>>>>
    > >>>>> Francois Meillet  於 2020年5月30日 週六
    > >> 下午10:48寫道:
    > >>>>>> sompage?67-1.-border-content-border_body-form is the path to your
    > >> model
    > >>>>> Yes , but it may contains deep-nested model
    > >>>>>
    > >>>>> The form contains FormComponentPanel and contains another
    > >>>>> FormComponentPanels and widgets , very deep ...
    > >>>>> The error may lay under very deep model , which is very hard to
    > debug.
    > >>>>> And the error message should be able to pinpoint which model causes
    > the
    > >>>>> problem
    > >> -
    > >> 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: Locatable UnsupportedOperationException

    2020-06-01 Thread Martin Grigorov
    Hi,
    
    I like the idea to catch UnsupportedOperationException at
    org.apache.wicket.IGenericComponent#setModelObject(T) and re-throw it as:
    throw new WicketRuntimeException("You need to use read/write Model for
    component '{}", this.getPageRelativePath(), uox)
    
    Does anyone see a drawback ?
    
    Martin
    
    On Sat, May 30, 2020 at 11:42 PM Sven Meier  wrote:
    
    > Hi,
    >
    > just put a breakpoint on IModel#setObject().
    >
    > Once your problem hits that breakpoint, you'll be able to derive the
    > offending component/model from the stacktrace/variables in your favorite
    > IDE.
    >
    > Have fun
    > Sven
    >
    >
    > On 30.05.20 17:13, smallufo wrote:
    > > Is it possible to try { setObjectObject(value) } catch { e }
    > > and pinpoint which class/model causes this problem ?
    > > Or is it too costly ?
    > >
    > >
    > > Francois Meillet  於 2020年5月30日 週六 下午11:02寫道:
    > >
    > >> Hope that help
    > >>
    > >> During the process of throwing an exception, the Java Virtual Machine
    > >> abruptly completes, one by one, any expressions, statements, method and
    > >> constructor invocations, initializers, and field initialization
    > expressions
    > >> that have begun but not completed execution in the current thread. This
    > >> process continues until a handler is found that indicates that it
    > handles
    > >> that particular exception by naming the class of the exception or a
    > >> superclass of the class of the exception (§11.2 <
    > >> https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html#jls-11.2
    > >).
    > >> If no such handler is found, then the exception may be handled by one
    > of a
    > >> hierarchy of uncaught exception handlers (§11.3 <
    > >> https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html#jls-11.3
    > >)
    > >> - thus every effort is made to avoid letting an exception go unhandled.
    > >>
    > >> https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html <
    > >> https://docs.oracle.com/javase/specs/jls/se11/html/jls-11.html>
    > >>
    > >>
    > >> François
    > >>
    > >>
    > >>
    > >>> Le 30 mai 2020 à 16:52, smallufo  a écrit :
    > >>>
    > >>> Francois Meillet  於 2020年5月30日 週六
    > 下午10:48寫道:
    > >>>
    >  sompage?67-1.-border-content-border_body-form is the path to your
    > model
    > 
    > >>> Yes , but it may contains deep-nested model
    > >>>
    > >>> The form contains FormComponentPanel and contains another
    > >>> FormComponentPanels and widgets , very deep ...
    > >>> The error may lay under very deep model , which is very hard to debug.
    > >>> And the error message should be able to pinpoint which model causes the
    > >>> problem
    > >>
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

    Re: WebSocket concurrent modification

    2020-05-28 Thread Martin Grigorov
    On Thu, May 28, 2020 at 9:43 AM fanfy  wrote:
    
    > Hello,I finally found the problem ... It seems that I didn't understood
    > very
    > well how to use WebSocketMessageBroadcaster from wicket-spring-boot. The
    > proper way to broadcast websocket messages from an ajax call is to use
    > org.apache.wicket.protocol.ws.api.WebSocketPushBroadcaster with an
    > additional configuration of the Executor that must broadcast the messages
    > using a separate threadFor example, if using springframework (with wicket
    > application as a bean) you must configure the executor:
    > java.util.concurrent.Executor executor =
    > Executors.newSingleThreadExecutor();
    >
    > WebSocketSettings.Holder.get(webApplication).setWebSocketPushMessageExecutor(new
    > Executor() {@Override
    >  public void run(Runnable command) {
    > executor.execute(command);  }   });
    > To broadcast messages from business code you can use spring events
    > (published from your business code) To broadcast from ajax handlers inject
    > this bean and call broadcastToAll(event) directly.
    > /** *  * @author Elvis Ciocoiu * */@Componentpublic class
    > TaskEventWebSocketBroadcaster { private WebSocketPushBroadcaster
    > broadcaster;@Autowired private Application application;
    >  @PostConstruct
    > public void init() {WebSocketSettings webSocketSettings =
    > WebSocketSettings.Holder.get(application);
    > IWebSocketConnectionRegistry
    > webSocketConnectionRegistry = webSocketSettings.getConnectionRegistry();
    >
    > broadcaster = new WebSocketPushBroadcaster(webSocketConnectionRegistry);
    >   }
    > @EventListener  public void onTaskEvent(TaskEvent taskEvent) {
    > broadcastToAll(taskEvent);  }   public void
    > broadcastToAll(TaskEvent
    > taskEvent) {broadcaster.broadcastAll(application, new
    > TaskEventWebSocketPushMessage(taskEvent));  }   /**
    > *   * @author Elvis
    > Ciocoiu  *   */ public static class TaskEventWebSocketPushMessage
    > implements
    > IWebSocketPushMessage { private static final long serialVersionUID
    > = 1L;
    > private TaskEvent taskEvent;public
    > TaskEventWebSocketPushMessage(TaskEvent taskEvent) {
    > this.taskEvent =
    > taskEvent;  }   public TaskEvent
    > getTaskEvent() {   return taskEvent;   }
    >}}
    > I think these distinct scenarios (broadcast from ajaxhandler and from
    > business thread) should be documented a little more in user guide. Sorry to
    > waste your time.Thank you
    >
    
    https://issues.apache.org/jira/browse/WICKET-6791
    https://github.com/apache/wicket/pull/435
    Thank you!
    
    
    >
    > --
    > Sent from:
    > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
    >
    > -
    > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
    > For additional commands, e-mail: users-h...@wicket.apache.org
    >
    >
    
    

      1   2   3   4   5   6   7   8   9   10   >