Problem with dynamic links in DataView.

2014-11-03 Thread Aleksey
I use Wicket 1.5.10 and I'm stuck at problem with DataView.
I have overview page which contains filter and some container with elements.

You can see simple example prepared by me:

Filter contains TextField and AjaxLink. 
*HTML:*
p
labelSearch field/label
input wicket:id=filteredField type=text
/p
p
 Filter Link 
/p

*JAVA*
TextFieldString filteredField = new TextFieldString(filteredField, new
PropertyModelString(HomePage.this, searchLink));
filteredField.add(new AjaxFormComponentUpdatingBehavior(onchange) {
private static final long serialVersionUID = -4317299769705904431L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
//do nothing
}
});
filteredField.setOutputMarkupId(true);
add(filteredField); 

add(new AjaxLinkVoid(filterLink) {
private static final long serialVersionUID = -1544074968276382557L;

@Override
public void onClick(AjaxRequestTarget target) {
target.add(dataViewContainer);
try {
// use to demonstare the problem
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});

Container with elements is DataView  where each element is Link.
*JAVA*:
private class MyDataView extends DataViewString {
private static final long serialVersionUID = -4473460467718688831L;

protected MyDataView(String id) {
super(id, new MyDataProvider());
}

@Override
protected void populateItem(ItemString item) {
LinkVoid link = new LinkVoid(elementLink) {

private static final long serialVersionUID = 
1582520788088815276L;

@Override
public void onClick() {

}

};
link.add(new Label(label, item.getModelObject()));
item.add(link);
}

}

*HTML*:
div wicket:id=dataViewContainer
div wicket:id=dataView
 
   /div
/div

If I click on filterLink and then immediately click on some link in
DataView, then Wicket throws exception:
pre
org.apache.wicket.request.handler.ComponentNotFoundException: Could not find
component 'dataViewContainer:dataView:5:elementLink' on page 'class
com.mycompany.HomePage
 at
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
 at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
 at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
 at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
 at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
/pre

We meet this problem very often when our customers do not wait for response
and click on a link in DataView.
What do I have to do in this case? What approach is the best here?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-dynamic-links-in-DataView-tp4668229.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Problem with dynamic links in DataView.

2014-11-03 Thread Martin Grigorov
Hi,

You can show a veil above the data view container or the whole page until
the Ajax response comes.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 1:24 PM, Aleksey axel@gmail.com wrote:

 I use Wicket 1.5.10 and I'm stuck at problem with DataView.
 I have overview page which contains filter and some container with
 elements.

 You can see simple example prepared by me:

 Filter contains TextField and AjaxLink.
 *HTML:*
 p
 labelSearch field/label
 input wicket:id=filteredField type=text
 /p
 p
  Filter Link
 /p

 *JAVA*
 TextFieldString filteredField = new TextFieldString(filteredField,
 new
 PropertyModelString(HomePage.this, searchLink));
 filteredField.add(new AjaxFormComponentUpdatingBehavior(onchange) {
 private static final long serialVersionUID = -4317299769705904431L;

 @Override
 protected void onUpdate(AjaxRequestTarget target) {
 //do nothing
 }
 });
 filteredField.setOutputMarkupId(true);
 add(filteredField);

 add(new AjaxLinkVoid(filterLink) {
 private static final long serialVersionUID = -1544074968276382557L;

 @Override
 public void onClick(AjaxRequestTarget target) {
 target.add(dataViewContainer);
 try {
 // use to demonstare the problem
 Thread.sleep(1000);
 } catch (InterruptedException e) {
 e.printStackTrace();
 }
 }
 });

 Container with elements is DataView  where each element is Link.
 *JAVA*:
 private class MyDataView extends DataViewString {
 private static final long serialVersionUID = -4473460467718688831L;

 protected MyDataView(String id) {
 super(id, new MyDataProvider());
 }

 @Override
 protected void populateItem(ItemString item) {
 LinkVoid link = new LinkVoid(elementLink) {

 private static final long serialVersionUID
 = 1582520788088815276L;

 @Override
 public void onClick() {

 }

 };
 link.add(new Label(label,
 item.getModelObject()));
 item.add(link);
 }

 }

 *HTML*:
 div wicket:id=dataViewContainer
 div wicket:id=dataView

/div
 /div

 If I click on filterLink and then immediately click on some link in
 DataView, then Wicket throws exception:
 pre
 org.apache.wicket.request.handler.ComponentNotFoundException: Could not
 find
 component 'dataViewContainer:dataView:5:elementLink' on page 'class
 com.mycompany.HomePage
  at

 org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
  at

 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
  at

 org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
  at

 org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:784)
  at

 org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
  at
 org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:255)
  at

 org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
  at

 org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:283)
  at

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

 org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:244)
 /pre

 We meet this problem very often when our customers do not wait for response
 and click on a link in DataView.
 What do I have to do in this case? What approach is the best here?

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Problem-with-dynamic-links-in-DataView-tp4668229.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: Ordering of OnDomReadyHeaderItem

2014-11-03 Thread Martin Grigorov
Hi,

A colleague of mine asked me the same question recently so I've just added
a new global event that is fired once all Wicket.Ajax.ajax() calls are done.
https://issues.apache.org/jira/browse/WICKET-5746

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Fri, Oct 31, 2014 at 7:58 PM, Nick Pratt nbpr...@gmail.com wrote:

 I got the required JS to be rendered lower down the page (using
 Application#setHeaderResponseDecorator( new IHeaderResponseDecorator(){} )
 , but I couldn't get the FilteredHeaderItem to be added in the head
 section of the page (only outside of the head element).  Not too much of
 an issue, but what Im seeing now is that my OnDomReadyHeader items rendered
 at the foot of the page are firing before the Wicket click handlers are
 fired (which are in the script inside the head of the page).

 Is this expected? I was expecting that the Wicket click handlers in head
 would execute before my script lower down the page.




 On Fri, Oct 31, 2014 at 11:01 AM, Nick Pratt nbpr...@gmail.com wrote:
 
  Is is possible to modify the ordering of OnDomReadyHeaderItem? I see a
 way to modify the JS lib ordering using
 IResourceSettings#setHeaderItemComparator, but that doesn't get invoked for
 all the click handlers and scripts added via OnDomReadyHeaderItem.  I have
 a script that needs to be invoked after all of the Wicket click handlers
 etc have been executed.
 
  Do I have to implement a filter on FilteredHeaderItem and add my script
 into a separate script bucket that is ordered at the end of the head or
 in the footer?



Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
Hi Martin  Michael,

There is a bug in the Navbar Component which causes NavbarDropDownButtons to 
not work.

DropDownButton's newInitializerScript function uses 'this' so in the header it 
renders: $('#component2 .dropdown-toggle').dropdown();

But the Navbar component does not call setOutputMarkupId(true) on the 
components contained in the alignedComponentListViews.

Best,
Marvin


Re: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Martin Grigorov
Hi,

Thanks for reporting!
Do you have a GitHub account ? Send us a Pull Request please !

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin 
marvin.rich...@freenetdigital.com wrote:

 Hi Martin  Michael,

 There is a bug in the Navbar Component which causes NavbarDropDownButtons
 to not work.

 DropDownButton's newInitializerScript function uses 'this' so in the
 header it renders: $('#component2 .dropdown-toggle').dropdown();

 But the Navbar component does not call setOutputMarkupId(true) on the
 components contained in the alignedComponentListViews.

 Best,
 Marvin



RE: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
That's the thing, I couldn't find a solution that seems to be the right way to 
fix it.

My dirty workaround is to override the newIntitializerScript function and just 
remove the 'this'.

Because applying setOutputMarkupId(true) doesn't have the expected effect, 
neither on the ListView nor the Component itself. I think that is because of 
the wicket:enclosure.


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, November 03, 2014 2:55 PM
To: users@wicket.apache.org
Subject: Re: Bug in wicket-bootstrap's Navbar

Hi,

Thanks for reporting!
Do you have a GitHub account ? Send us a Pull Request please !

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin  
marvin.rich...@freenetdigital.com wrote:

 Hi Martin  Michael,

 There is a bug in the Navbar Component which causes 
 NavbarDropDownButtons to not work.

 DropDownButton's newInitializerScript function uses 'this' so in the 
 header it renders: $('#component2 .dropdown-toggle').dropdown();

 But the Navbar component does not call setOutputMarkupId(true) on the 
 components contained in the alignedComponentListViews.

 Best,
 Marvin



Re: Problem with dynamic links in DataView.

2014-11-03 Thread Aleksey
Hi Martin Grigorov-4,

Thanks a lot for the answer.

Don't you know any other solutions?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-with-dynamic-links-in-DataView-tp4668229p4668246.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
Ah no. It's because of this:

@Override
protected void onInitialize() {
super.onInitialize();

this.setRenderBodyOnly(true);
}

In the NavbarDropDownButton.


-Original Message-
From: Richter, Marvin 
Sent: Monday, November 03, 2014 3:21 PM
To: users@wicket.apache.org
Subject: RE: Bug in wicket-bootstrap's Navbar

That's the thing, I couldn't find a solution that seems to be the right way to 
fix it.

My dirty workaround is to override the newIntitializerScript function and just 
remove the 'this'.

Because applying setOutputMarkupId(true) doesn't have the expected effect, 
neither on the ListView nor the Component itself. I think that is because of 
the wicket:enclosure.


-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org]
Sent: Monday, November 03, 2014 2:55 PM
To: users@wicket.apache.org
Subject: Re: Bug in wicket-bootstrap's Navbar

Hi,

Thanks for reporting!
Do you have a GitHub account ? Send us a Pull Request please !

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin  
marvin.rich...@freenetdigital.com wrote:

 Hi Martin  Michael,

 There is a bug in the Navbar Component which causes 
 NavbarDropDownButtons to not work.

 DropDownButton's newInitializerScript function uses 'this' so in the 
 header it renders: $('#component2 .dropdown-toggle').dropdown();

 But the Navbar component does not call setOutputMarkupId(true) on the 
 components contained in the alignedComponentListViews.

 Best,
 Marvin


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



Re: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Martin Grigorov
Create an issue at https://github.com/l0rdn1kk0n/wicket-bootstrap please

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 4:22 PM, Richter, Marvin 
marvin.rich...@freenetdigital.com wrote:

 Ah no. It's because of this:

 @Override
 protected void onInitialize() {
 super.onInitialize();

 this.setRenderBodyOnly(true);
 }

 In the NavbarDropDownButton.


 -Original Message-
 From: Richter, Marvin
 Sent: Monday, November 03, 2014 3:21 PM
 To: users@wicket.apache.org
 Subject: RE: Bug in wicket-bootstrap's Navbar

 That's the thing, I couldn't find a solution that seems to be the right
 way to fix it.

 My dirty workaround is to override the newIntitializerScript function and
 just remove the 'this'.

 Because applying setOutputMarkupId(true) doesn't have the expected effect,
 neither on the ListView nor the Component itself. I think that is because
 of the wicket:enclosure.


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 03, 2014 2:55 PM
 To: users@wicket.apache.org
 Subject: Re: Bug in wicket-bootstrap's Navbar

 Hi,

 Thanks for reporting!
 Do you have a GitHub account ? Send us a Pull Request please !

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin 
 marvin.rich...@freenetdigital.com wrote:

  Hi Martin  Michael,
 
  There is a bug in the Navbar Component which causes
  NavbarDropDownButtons to not work.
 
  DropDownButton's newInitializerScript function uses 'this' so in the
  header it renders: $('#component2 .dropdown-toggle').dropdown();
 
  But the Navbar component does not call setOutputMarkupId(true) on the
  components contained in the alignedComponentListViews.
 
  Best,
  Marvin
 

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




Re: Ordering of OnDomReadyHeaderItem

2014-11-03 Thread Nick Pratt
Thanks Martin.

I added this in JIRA.  Im still curious why we need to requeue the events -
cant we just fire the click handlers as and where defined?



On Mon, Nov 3, 2014 at 8:27 AM, Martin Grigorov mgrigo...@apache.org
wrote:

 Hi,

 A colleague of mine asked me the same question recently so I've just added
 a new global event that is fired once all Wicket.Ajax.ajax() calls are
 done.
 https://issues.apache.org/jira/browse/WICKET-5746

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Fri, Oct 31, 2014 at 7:58 PM, Nick Pratt nbpr...@gmail.com wrote:

  I got the required JS to be rendered lower down the page (using
  Application#setHeaderResponseDecorator( new IHeaderResponseDecorator(){}
 )
  , but I couldn't get the FilteredHeaderItem to be added in the head
  section of the page (only outside of the head element).  Not too much
 of
  an issue, but what Im seeing now is that my OnDomReadyHeader items
 rendered
  at the foot of the page are firing before the Wicket click handlers are
  fired (which are in the script inside the head of the page).
 
  Is this expected? I was expecting that the Wicket click handlers in
 head
  would execute before my script lower down the page.
 
 
 
 
  On Fri, Oct 31, 2014 at 11:01 AM, Nick Pratt nbpr...@gmail.com wrote:
  
   Is is possible to modify the ordering of OnDomReadyHeaderItem? I see a
  way to modify the JS lib ordering using
  IResourceSettings#setHeaderItemComparator, but that doesn't get invoked
 for
  all the click handlers and scripts added via OnDomReadyHeaderItem.  I
 have
  a script that needs to be invoked after all of the Wicket click handlers
  etc have been executed.
  
   Do I have to implement a filter on FilteredHeaderItem and add my script
  into a separate script bucket that is ordered at the end of the head or
  in the footer?
 



RE: Bug in wicket-bootstrap's Navbar

2014-11-03 Thread Richter, Marvin
Done https://github.com/l0rdn1kk0n/wicket-bootstrap/issues/460

If you need more information please let me know.

-Original Message-
From: Martin Grigorov [mailto:mgrigo...@apache.org] 
Sent: Monday, November 03, 2014 3:27 PM
To: users@wicket.apache.org
Subject: Re: Bug in wicket-bootstrap's Navbar

Create an issue at https://github.com/l0rdn1kk0n/wicket-bootstrap please

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 4:22 PM, Richter, Marvin  
marvin.rich...@freenetdigital.com wrote:

 Ah no. It's because of this:

 @Override
 protected void onInitialize() {
 super.onInitialize();

 this.setRenderBodyOnly(true);
 }

 In the NavbarDropDownButton.


 -Original Message-
 From: Richter, Marvin
 Sent: Monday, November 03, 2014 3:21 PM
 To: users@wicket.apache.org
 Subject: RE: Bug in wicket-bootstrap's Navbar

 That's the thing, I couldn't find a solution that seems to be the 
 right way to fix it.

 My dirty workaround is to override the newIntitializerScript function 
 and just remove the 'this'.

 Because applying setOutputMarkupId(true) doesn't have the expected 
 effect, neither on the ListView nor the Component itself. I think that 
 is because of the wicket:enclosure.


 -Original Message-
 From: Martin Grigorov [mailto:mgrigo...@apache.org]
 Sent: Monday, November 03, 2014 2:55 PM
 To: users@wicket.apache.org
 Subject: Re: Bug in wicket-bootstrap's Navbar

 Hi,

 Thanks for reporting!
 Do you have a GitHub account ? Send us a Pull Request please !

 Martin Grigorov
 Wicket Training and Consulting
 https://twitter.com/mtgrigorov

 On Mon, Nov 3, 2014 at 3:46 PM, Richter, Marvin  
 marvin.rich...@freenetdigital.com wrote:

  Hi Martin  Michael,
 
  There is a bug in the Navbar Component which causes 
  NavbarDropDownButtons to not work.
 
  DropDownButton's newInitializerScript function uses 'this' so in the 
  header it renders: $('#component2 .dropdown-toggle').dropdown();
 
  But the Navbar component does not call setOutputMarkupId(true) on 
  the components contained in the alignedComponentListViews.
 
  Best,
  Marvin
 

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




Re: Ordering of OnDomReadyHeaderItem

2014-11-03 Thread Martin Grigorov
Hi,

I have no idea what requeueing you are talking about...
I haven't read your ticket yet.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Nov 3, 2014 at 4:27 PM, Nick Pratt nbpr...@gmail.com wrote:

 Thanks Martin.

 I added this in JIRA.  Im still curious why we need to requeue the events -
 cant we just fire the click handlers as and where defined?



 On Mon, Nov 3, 2014 at 8:27 AM, Martin Grigorov mgrigo...@apache.org
 wrote:

  Hi,
 
  A colleague of mine asked me the same question recently so I've just
 added
  a new global event that is fired once all Wicket.Ajax.ajax() calls are
  done.
  https://issues.apache.org/jira/browse/WICKET-5746
 
  Martin Grigorov
  Wicket Training and Consulting
  https://twitter.com/mtgrigorov
 
  On Fri, Oct 31, 2014 at 7:58 PM, Nick Pratt nbpr...@gmail.com wrote:
 
   I got the required JS to be rendered lower down the page (using
   Application#setHeaderResponseDecorator( new
 IHeaderResponseDecorator(){}
  )
   , but I couldn't get the FilteredHeaderItem to be added in the head
   section of the page (only outside of the head element).  Not too much
  of
   an issue, but what Im seeing now is that my OnDomReadyHeader items
  rendered
   at the foot of the page are firing before the Wicket click handlers are
   fired (which are in the script inside the head of the page).
  
   Is this expected? I was expecting that the Wicket click handlers in
  head
   would execute before my script lower down the page.
  
  
  
  
   On Fri, Oct 31, 2014 at 11:01 AM, Nick Pratt nbpr...@gmail.com
 wrote:
   
Is is possible to modify the ordering of OnDomReadyHeaderItem? I see
 a
   way to modify the JS lib ordering using
   IResourceSettings#setHeaderItemComparator, but that doesn't get invoked
  for
   all the click handlers and scripts added via OnDomReadyHeaderItem.  I
  have
   a script that needs to be invoked after all of the Wicket click
 handlers
   etc have been executed.
   
Do I have to implement a filter on FilteredHeaderItem and add my
 script
   into a separate script bucket that is ordered at the end of the head
 or
   in the footer?
  
 



wicket6 + sso and redirects

2014-11-03 Thread Jason Novotny

Hi,

I'm adding support to my application use SSO outbound from my webapp to 
an Identity provider (IP) to authenticate a user from my webapp to an 
external web application.


I have SSO code and the steps involved on my page are:

1. send redirect to

https://www.3rdparty.com?authnReqRedirectUrl=myurl

where myurl is a wicket page e.g. /sso

2. Now the wicket page at /sso should receive a SAMLRequest parameter, 
which is then used to create a SAMLResponse


3. The SAMLResponse should be posted back to the 3rd party thru a form:

form wicket:id=form method=post action=third party url
input wicket:id=samlresponse type=hidden/
input type=submit value=Submit/
/form

I believe the form can be auto-submitted thru javascript:

script type=text/javascript
window.onload = function () {
document.forms[0].submit();
}
/script

And then the user should land on the 3rdparty web application.

So basically my question is how do I do step 1, I'm using wicket6 and tried:

add(new AjaxLinkVoid(test) {
@Override
public void onClick(AjaxRequestTarget target) {
throw new 
RedirectToUrlException(https://thirdparty.com?authnReqRedirectUrl=https://mysite.com/sso;);

}
});


But seems that it doesn't return to my wicket page mounted at /sso. Am I 
doing this right?


Thanks, Jason



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



Migrating SecondLevelCacheSessionStore

2014-11-03 Thread ChambreNoire
Hello Wicketeers,

I am posting this question in the hope that some if the more knowledgeable
members of the wicket community can help me understand Wicket's
serialisation process and use of SessionStores, etc..

I have been tasked with overhauling a fairly old Wicket project and this
includes migrating from Wicket 1.3.8 to 1.6+. I have been migrating
incrementally and I'm now working my way to 1.5.12 compliance. The issue I
have encountered is as follows : in 1.3 a SecondLevelCacheSessionStore was
used with a DiskPageStore which had most of it's methods overridden and
either left empty or set to return null or false. The original programmer
left no indication of why this was done (I'm told there was a ‘valid’ reason
but no-one remembers and it would seem that this former colleague didn’t
believe in documentation and/or commenting). 

This is an area of Wicket I've always left alone so consequently I have
little notion of what is actually happening here. I’d appreciate any
information about this aspect of Wicket as I’m having trouble finding online
resources which can spell this out. This would certainly bolster my Wicket
knowledge and help me understand what my predecessor was trying to achieve,
why,  whether it’s still applicable and if need be how to port it to 1.5+.

Many thanks in advance,

C

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-SecondLevelCacheSessionStore-tp4668256.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Migrating SecondLevelCacheSessionStore

2014-11-03 Thread ChambreNoire
I should add that this web application uses a Single Page approach.
Everything is achieved via ajax panel replacement (which would make page
versioning redundant wouldn't it?)...

C

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Migrating-SecondLevelCacheSessionStore-tp4668256p4668257.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Migrating SecondLevelCacheSessionStore

2014-11-03 Thread Martin Grigorov
Hi,

I don't remember what SecondLevelCacheSessionStore was about.
But most applications do not need to tune/tweak anything in the storages
nowadays, so I'd recommend to just drop this custom code completely.

See http://wicket.apache.org/guide/guide/internals.html#pagestoring for
Wicket 1.5+.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Tue, Nov 4, 2014 at 2:27 AM, ChambreNoire a...@tentelemed.com wrote:

 I should add that this web application uses a Single Page approach.
 Everything is achieved via ajax panel replacement (which would make page
 versioning redundant wouldn't it?)...

 C

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Migrating-SecondLevelCacheSessionStore-tp4668256p4668257.html
 Sent from the Users forum mailing list archive at Nabble.com.

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




Re: wicket6 + sso and redirects

2014-11-03 Thread Martin Grigorov
Hi,

On Mon, Nov 3, 2014 at 8:43 PM, Jason Novotny jason.novo...@gmail.com
wrote:

 Hi,

 I'm adding support to my application use SSO outbound from my webapp to
an Identity provider (IP) to authenticate a user from my webapp to an
external web application.

 I have SSO code and the steps involved on my page are:

 1. send redirect to

 https://www.3rdparty.com?authnReqRedirectUrl=myurl

 where myurl is a wicket page e.g. /sso

 2. Now the wicket page at /sso should receive a SAMLRequest parameter,
which is then used to create a SAMLResponse

 3. The SAMLResponse should be posted back to the 3rd party thru a form:

 form wicket:id=form method=post action=third party url
 input wicket:id=samlresponse type=hidden/
 input type=submit value=Submit/
 /form

 I believe the form can be auto-submitted thru javascript:

 script type=text/javascript
 window.onload = function () {
 document.forms[0].submit();
 }
 /script

 And then the user should land on the 3rdparty web application.

 So basically my question is how do I do step 1, I'm using wicket6 and
tried:

 add(new AjaxLinkVoid(test) {
 @Override
 public void onClick(AjaxRequestTarget target) {
 throw new RedirectToUrlException(
https://thirdparty.com?authnReqRedirectUrl=https://mysite.com/sso;);
 }
 });

You can simplify this by using ExternalLink.




 But seems that it doesn't return to my wicket page mounted at /sso. Am I
doing this right?

This is an issue with your SSO provider. Check why it doesn't call you
back.


 Thanks, Jason



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

Hi,

I'm adding support to my application use SSO outbound from my webapp to an
Identity provider (IP) to authenticate a user from my webapp to an external
web application.

I have SSO code and the steps involved on my page are:

1. send redirect to

https://www.3rdparty.com?authnReqRedirectUrl=myurl

where myurl is a wicket page e.g. /sso

2. Now the wicket page at /sso should receive a SAMLRequest parameter,
which is then used to create a SAMLResponse

3. The SAMLResponse should be posted back to the 3rd party thru a form:

form wicket:id=form method=post action=third party url
input wicket:id=samlresponse type=hidden/
input type=submit value=Submit/
/form

I believe the form can be auto-submitted thru javascript:

script type=text/javascript
window.onload = function () {
document.forms[0].submit();
}
/script

And then the user should land on the 3rdparty web application.

So basically my question is how do I do step 1, I'm using wicket6 and tried:

add(new AjaxLinkVoid(test) {
@Override
public void onClick(AjaxRequestTarget target) {
throw new RedirectToUrlException(https://thirdparty.com?
authnReqRedirectUrl=https://mysite.com/sso;);
}
});


But seems that it doesn't return to my wicket page mounted at /sso. Am I
doing this right?

Thanks, Jason



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