Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem

2019-03-06 Thread kyc
Hi Bas,

Thanks for your reply.

Since we are saving data in the page of Modal Page itself, it is no problem.
However,  we have problem to close that modalwindow with a separate close
button.  
Even I change the form to StatelessForm, the close button still have the
PageExpiredException

addOrReplace(new AjaxLink("btnClose") {
private static final long serialVersionUID = 
-8174543450190822811L;

@Override
public void onClick(AjaxRequestTarget target) {
window.close(target);
}
});

KYC





--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem

2019-03-06 Thread Bas Gooren
Hi,

Since you are not storing pages, how does the form in your modal
window work? I assume you are using a stateless form?

Since your on close callback is stateful, it will not work; you will
either need to use a stateless Ajax behavior or stateless form where
in onsubmit you redirect to a new page with up-to-date information.

// Bas

Verstuurd vanaf mijn iPhone

> Op 7 mrt. 2019 om 07:56 heeft kyc  het volgende geschreven:
>
> Our page open a WindowModal for editing a form, there is an exception throw
> when closed the modal window.
> This problem only happens when our site is using NoPageStore but we have to
> use NoPageStore.
>
> The following exception happen and the setWindowClosedCallback cannot be
> called.
> Page with id '16' has expired.
> org.apache.wicket.protocol.http.PageExpiredException: Page with id '16' has
> expired.
>
>
> The modal window close call back function works on without NoPageStore
> setting:
>
>abcModalWindow.setWindowClosedCallback(new WindowClosedCallback() {
>private static final long serialVersionUID = 
> 7961678233294274184L;
>
>public void onClose(AjaxRequestTarget target) {
>doRefresh(target);
>}
>});
>
> Please help if anyone knows the solution.  Thanks a lot.
>
>
> --
> 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
>

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



ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem

2019-03-06 Thread kyc
Our page open a WindowModal for editing a form, there is an exception throw
when closed the modal window.
This problem only happens when our site is using NoPageStore but we have to
use NoPageStore.

The following exception happen and the setWindowClosedCallback cannot be
called.
Page with id '16' has expired.
org.apache.wicket.protocol.http.PageExpiredException: Page with id '16' has
expired.


The modal window close call back function works on without NoPageStore
setting:

abcModalWindow.setWindowClosedCallback(new 
WindowClosedCallback() {
private static final long serialVersionUID = 
7961678233294274184L;

public void onClose(AjaxRequestTarget target) {
doRefresh(target);
}
});

Please help if anyone knows the solution.  Thanks a lot.


--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: Wicket and material theme

2019-03-06 Thread Martin Grigorov
Hi,

On Thu, Mar 7, 2019 at 12:14 AM Zbynek Vavros 
wrote:

> Hi Martin,
>
> sorry if the message understood was to put this project in a bad light, not
> at all!
>
> I played with it a while and seems to be doing exactly what advertised.
> Maybe a question (since I see you are one of the authors) - how does one
> add a theme?
> By checking the ThemeProvider I see only "bootstrap" theme is available by
> default.
> How to add new theme into provider?
>

"bootstrap" theme is the default one and it is in wicket-bootstrap-core
module.
All other themes are in wicket-bootstrap-themes module:
https://github.com/l0rdn1kk0n/wicket-bootstrap/tree/wicket-7.x/bootstrap-themes
To set it up you need to do something like:

final IBootstrapSettings settings = new BootstrapSettings();
Bootstrap.builder().withBootstrapSettings(settings).install(yourApplication);
ThemeProvider themeProvider = new SingleThemeProvider(new
MaterialDesignTheme());
settings.setThemeProvider(themeProvider);

See how the demo application does it here:
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/10a60be4e68038e4b1d275bc598835d12f5a715d/bootstrap-samples/src/main/java/de/agilecoders/wicket/samples/WicketApplication.java#L209-L218


>
> Thanks,
> Zbynek
>
> On Wed, Mar 6, 2019 at 9:51 AM Martin Grigorov 
> wrote:
>
> > Hi,
> >
> > On Wed, Mar 6, 2019 at 1:36 AM Zbynek Vavros 
> > wrote:
> >
> > > Hi,
> > >
> > > for a new project we would like to use (hopefully) well known material
> > > design.
> > > After some discussion we discarded using any popular JS frameworks.
> > > Since most of us work with Wicket for quite some time and we all like
> it
> > > we would like to stick with it.
> > >
> > > Now would be the recommended way to use material design with Wicket?
> > >
> > > There is an integration project
> > > https://github.com/l0rdn1kk0n/wicket-bootstrap
> > > that doesn't seem to be very actual (failed builds, TBD in docs...).
> > >
> >
> > - failed builds are due to bad CI servers. The project uses TravisCI
> > because it is free and the builds there are very unstable. If you build
> the
> > project locally with "mvn clean package" it will build just fine.
> > - TBD in docs: well, it is an open source project... People contribute as
> > much as they need for their apps. It is better than nothing.
> >
> >
> > > It also doesn't seem to implement even basic components (
> > >
> > >
> >
> https://material-components.github.io/material-components-web-catalog/#/component/text-field
> > > ).
> > > Or maybe I missed something?
> > >
> >
> > Wicket-Bootstrap project, as its name suggests, provides integration with
> > Bootstrap . The Material design is just one
> of
> > the themes for Bootstrap, provided by
> > https://github.com/FezVrasta/bootstrap-material-design/
> >
> >
> https://fezvrasta.github.io/bootstrap-material-design/docs/4.0/examples/checkout/
> > shows a form with this theme. I am not sure whether it completely
> > implements the "specification"
> >
> >
> > >
> > > Another option would be to do all styling manually, well...
> > >
> > > Did anyone used material with Wicket?
> > >
> > > Thanks,
> > > Zbynek
> > >
> >
>


Re: Wicket and material theme

2019-03-06 Thread Zbynek Vavros
Hi Martin,

sorry if the message understood was to put this project in a bad light, not
at all!

I played with it a while and seems to be doing exactly what advertised.
Maybe a question (since I see you are one of the authors) - how does one
add a theme?
By checking the ThemeProvider I see only "bootstrap" theme is available by
default.
How to add new theme into provider?

Thanks,
Zbynek

On Wed, Mar 6, 2019 at 9:51 AM Martin Grigorov  wrote:

> Hi,
>
> On Wed, Mar 6, 2019 at 1:36 AM Zbynek Vavros 
> wrote:
>
> > Hi,
> >
> > for a new project we would like to use (hopefully) well known material
> > design.
> > After some discussion we discarded using any popular JS frameworks.
> > Since most of us work with Wicket for quite some time and we all like it
> > we would like to stick with it.
> >
> > Now would be the recommended way to use material design with Wicket?
> >
> > There is an integration project
> > https://github.com/l0rdn1kk0n/wicket-bootstrap
> > that doesn't seem to be very actual (failed builds, TBD in docs...).
> >
>
> - failed builds are due to bad CI servers. The project uses TravisCI
> because it is free and the builds there are very unstable. If you build the
> project locally with "mvn clean package" it will build just fine.
> - TBD in docs: well, it is an open source project... People contribute as
> much as they need for their apps. It is better than nothing.
>
>
> > It also doesn't seem to implement even basic components (
> >
> >
> https://material-components.github.io/material-components-web-catalog/#/component/text-field
> > ).
> > Or maybe I missed something?
> >
>
> Wicket-Bootstrap project, as its name suggests, provides integration with
> Bootstrap . The Material design is just one of
> the themes for Bootstrap, provided by
> https://github.com/FezVrasta/bootstrap-material-design/
>
> https://fezvrasta.github.io/bootstrap-material-design/docs/4.0/examples/checkout/
> shows a form with this theme. I am not sure whether it completely
> implements the "specification"
>
>
> >
> > Another option would be to do all styling manually, well...
> >
> > Did anyone used material with Wicket?
> >
> > Thanks,
> > Zbynek
> >
>


Re: Skip URL escape on redirect

2019-03-06 Thread Calin Pavel

Hi Martin,

It works fine if using this status code. Thank you for your help.

Calin Pavel

On 3/6/2019 5:47 PM, Martin Grigorov wrote:

Hi,

Use RedirectToUrlException(yourUrl, HttpServletResponse.SC_SEE_OTHER)

See https://markmail.org/message/bis57nb2yecdgzqx for more details. It has
been discussed last week.

On Wed, Mar 6, 2019 at 5:02 PM Calin Pavel  wrote:


Hello,

I'm doing a redirect from Wicket code like*   throw new
RedirectToUrlException("
http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2");
*and this should redirect user to this page which is accessible if
signature is valid (checks if URL did not changed).

But, when doing the redirect Wicket escapes the brackets - so browser
received in header
location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *,
but the server does not accepts the request because signature does not
match this URL.

For this:
1. is there any other way to do the redirect without escaping URL?

2. is it a browser problem - it should unescape URL before doing
redirect? have some doubts, since all (Chrome, IE, Firefox) works the same
3. would it be the responsibility of the targeted server to decode /
unescape URL and then check for the signature?

Thank you,
Calin Pavel
*
*




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



Re: Skip URL escape on redirect

2019-03-06 Thread Martin Grigorov
Hi,

Use RedirectToUrlException(yourUrl, HttpServletResponse.SC_SEE_OTHER)

See https://markmail.org/message/bis57nb2yecdgzqx for more details. It has
been discussed last week.

On Wed, Mar 6, 2019 at 5:02 PM Calin Pavel  wrote:

> Hello,
>
> I'm doing a redirect from Wicket code like*   throw new
> RedirectToUrlException("
> http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2");
> *and this should redirect user to this page which is accessible if
> signature is valid (checks if URL did not changed).
>
> But, when doing the redirect Wicket escapes the brackets - so browser
> received in header
> location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *,
> but the server does not accepts the request because signature does not
> match this URL.
>
> For this:
> 1. is there any other way to do the redirect without escaping URL?
>
> 2. is it a browser problem - it should unescape URL before doing
> redirect? have some doubts, since all (Chrome, IE, Firefox) works the same
> 3. would it be the responsibility of the targeted server to decode /
> unescape URL and then check for the signature?
>
> Thank you,
> Calin Pavel
> *
> *
>


Re: Skip URL escape on redirect

2019-03-06 Thread Maxim Solodovnik
IMO better way would be to create hash for encoded URL

On Wed, 6 Mar 2019 at 22:02, Calin Pavel  wrote:
>
> Hello,
>
> I'm doing a redirect from Wicket code like*   throw new
> RedirectToUrlException("http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2");
> *and this should redirect user to this page which is accessible if
> signature is valid (checks if URL did not changed).
>
> But, when doing the redirect Wicket escapes the brackets - so browser
> received in header
> location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *,
> but the server does not accepts the request because signature does not
> match this URL.
>
> For this:
> 1. is there any other way to do the redirect without escaping URL?
>
> 2. is it a browser problem - it should unescape URL before doing
> redirect? have some doubts, since all (Chrome, IE, Firefox) works the same
> 3. would it be the responsibility of the targeted server to decode /
> unescape URL and then check for the signature?
>
> Thank you,
> Calin Pavel
> *
> *



-- 
WBR
Maxim aka solomax

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



Skip URL escape on redirect

2019-03-06 Thread Calin Pavel

Hello,

I'm doing a redirect from Wicket code like*   throw new 
RedirectToUrlException("http://mydomain/file(1).txt?Signature=JdfsuerJQEWQA2"); 
*and this should redirect user to this page which is accessible if 
signature is valid (checks if URL did not changed).


But, when doing the redirect Wicket escapes the brackets - so browser 
received in header 
location=*http://mydomain/file%281%29.txt?Signature=JdfsuerJQEWQA2 *, 
but the server does not accepts the request because signature does not 
match this URL.


For this:
1. is there any other way to do the redirect without escaping URL?

2. is it a browser problem - it should unescape URL before doing 
redirect? have some doubts, since all (Chrome, IE, Firefox) works the same
3. would it be the responsibility of the targeted server to decode / 
unescape URL and then check for the signature?


Thank you,
Calin Pavel
*
*


4 Apache Events in 2019: DC Roadshow soon; next up Chicago, Las Vegas, and Berlin!

2019-03-06 Thread Rich Bowen
Dear Apache Enthusiast,

(You’re receiving this because you are subscribed to one or more user
mailing lists for an Apache Software Foundation project.)

TL;DR:
 * Apache Roadshow DC is in 3 weeks. Register now at
https://apachecon.com/usroadshowdc19/
 * Registration for Apache Roadshow Chicago is open.
http://apachecon.com/chiroadshow19
 * The CFP for ApacheCon North America is now open.
https://apachecon.com/acna19
 * Save the date: ApacheCon Europe will be held in Berlin, October 22nd
through 24th.  https://apachecon.com/aceu19


Registration is open for two Apache Roadshows; these are smaller events
with a more focused program and regional community engagement:

Our Roadshow event in Washington DC takes place in under three weeks, on
March 25th. We’ll be hosting a day-long event at the Fairfax campus of
George Mason University. The roadshow is a full day of technical talks
(two tracks) and an open source job fair featuring AWS, Bloomberg, dito,
GridGain, Linode, and Security University. More details about the
program, the job fair, and to register, visit
https://apachecon.com/usroadshowdc19/

Apache Roadshow Chicago will be held May 13-14th at a number of venues
in Chicago’s Logan Square neighborhood. This event will feature sessions
in AdTech, FinTech and Insurance, startups, “Made in Chicago”, Project
Shark Tank (innovations from the Apache Incubator), community diversity,
and more. It’s a great way to learn about various Apache projects “at
work” while playing at a brewery, a beercade, and a neighborhood bar.
Sign up today at https://www.apachecon.com/chiroadshow19/

We’re delighted to announce that the Call for Presentations (CFP) is now
open for ApacheCon North America in Las Vegas, September 9-13th! As the
official conference series of the ASF, ApacheCon North America will
feature over a dozen Apache project summits, including Cassandra,
Cloudstack, Tomcat, Traffic Control, and more. We’re looking for talks
in a wide variety of categories -- anything related to ASF projects and
the Apache development process. The CFP closes at midnight on May 26th.
In addition, the ASF will be celebrating its 20th Anniversary during the
event. For more details and to submit a proposal for the CFP, visit
https://apachecon.com/acna19/ . Registration will be opening soon.

Be sure to mark your calendars for ApacheCon Europe, which will be held
in Berlin, October 22-24th at the KulturBrauerei, a landmark of Berlin's
industrial history. In addition to innovative content from our projects,
we are collaborating with the Open Source Design community
(https://opensourcedesign.net/) to offer a track on design this year.
The CFP and registration will open soon at https://apachecon.com/aceu19/ .

Sponsorship opportunities are available for all events, with details
listed on each event’s site at http://apachecon.com/.

We look forward to seeing you!

Rich, for the ApacheCon Planners
@apachecon


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



Re: Wicket and material theme

2019-03-06 Thread Martin Grigorov
Hi,

On Wed, Mar 6, 2019 at 1:36 AM Zbynek Vavros  wrote:

> Hi,
>
> for a new project we would like to use (hopefully) well known material
> design.
> After some discussion we discarded using any popular JS frameworks.
> Since most of us work with Wicket for quite some time and we all like it
> we would like to stick with it.
>
> Now would be the recommended way to use material design with Wicket?
>
> There is an integration project
> https://github.com/l0rdn1kk0n/wicket-bootstrap
> that doesn't seem to be very actual (failed builds, TBD in docs...).
>

- failed builds are due to bad CI servers. The project uses TravisCI
because it is free and the builds there are very unstable. If you build the
project locally with "mvn clean package" it will build just fine.
- TBD in docs: well, it is an open source project... People contribute as
much as they need for their apps. It is better than nothing.


> It also doesn't seem to implement even basic components (
>
> https://material-components.github.io/material-components-web-catalog/#/component/text-field
> ).
> Or maybe I missed something?
>

Wicket-Bootstrap project, as its name suggests, provides integration with
Bootstrap . The Material design is just one of
the themes for Bootstrap, provided by
https://github.com/FezVrasta/bootstrap-material-design/
https://fezvrasta.github.io/bootstrap-material-design/docs/4.0/examples/checkout/
shows a form with this theme. I am not sure whether it completely
implements the "specification"


>
> Another option would be to do all styling manually, well...
>
> Did anyone used material with Wicket?
>
> Thanks,
> Zbynek
>