Re: Enjoy Hints on wicket application

2019-09-06 Thread Jeroen Steenbeeke
Short answer: yes, this is possible.
Long answer: including the library is easy (check chapter 16 of the Wicket
guide for several ways to do this:
https://ci.apache.org/projects/wicket/guide/8.x/single.html#_resource_management_with_wicket
), as the only dependencies are JQuery (already in Wicket) and KineticJS
(which should be included in EnjoyHint). Whether or not the library is easy
to use once you get it included in your pages I don't know. The examples of
EnjoyHint suggest it matches elements by CSS class (which would be trivial
to do), but if you need to refer to components by ID the solution gets a
little bit more involved on the Wicket end (though not by much).

Sincerely,

Jeroen

Op vr 6 sep. 2019 om 11:07 schreef Sibgha Nazir :

> Hi,
>
> I want to integrate https://xbsoftware.com/products/enjoyhint/ in my
> wicket
> application. Just need a little idea if its possible. I havent tries yet.
> But it seems like a angular js application. I always had some trouble
> integrating complex javascript with wicket and  I apologize for lack of
> knowledge in how angular js works. But if anyone thins its doable I will
> put my effort into it.
>
> Thanks. Regards,
> Sibgha
>


-- 
Jeroen Steenbeeke


Re: Integrate Wicket with Keycloak

2019-04-16 Thread Jeroen Steenbeeke
Hello David,

Excellent idea! I went ahead and did just that:
https://tech.jeroensteenbeeke.nl/2019/04/16/using-keycloak-with-wicket.html

Hope it's helpful.

Regards,

Jeroen

Op ma 15 apr. 2019 om 19:53 schreef David Beer :

> Hi Jeroen
>
> This sounds good, I once tried to setup a link between Wicket and Keycloak,
> would be good if you had a blog post, or posted this on the wicket site,
> along with code examples on github. Just a thought.
>
> Thanks
>
> David
>
> On Thu, 11 Apr 2019 at 09:23, Jeroen Steenbeeke  >
> wrote:
>
> > I've recently created an application that has a Wicket frontend (and
> Spring
> > backend) authenticated by Keycloak. It's a relatively simple integration
> > really, all pages require a valid Keycloak session, so it uses the
> default
> > Keycloak servlet filter adapter:
> >
> >
> >
> https://search.maven.org/artifact/org.keycloak/keycloak-servlet-filter-adapter/5.0.0/jar
> >
> > In my setup I've mapped the Keycloak filter to all URLs (before the
> Wicket
> > filter). Using this filter is simply a matter of adding it to your
> web.xml
> > and making sure you have a keycloak.json file in your WEB-INF folder.
> >
> > In Wicket, you can then get the Keycloak context from the RequestCycle:
> >
> > ServletWebRequest request = (ServletWebRequest)
> > RequestCycle.get().getRequest();
> > HttpServletRequest containerRequest = request.getContainerRequest();
> > KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
> > containerRequest.getAttribute(KeycloakSecurityContext.class.getName());
> >
> > Hope this helps.
> >
> > Sincerely,
> >
> > Jeroen
> >
> >
> > Op wo 10 apr. 2019 om 16:43 schreef Calin Pavel :
> >
> > > Hi everybody,
> > >
> > > Did anybody integrated Wicket with Keycloak?
> > > Do you have any sample how this could be done - to restrict access to
> > > pages, to authenticate user 
> > >
> > >
> > > Thank you,
> > > Calin Pavel
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> >
> > --
> > Jeroen Steenbeeke
> >
>


-- 
Jeroen Steenbeeke


Re: Integrate Wicket with Keycloak

2019-04-11 Thread Jeroen Steenbeeke
I've recently created an application that has a Wicket frontend (and Spring
backend) authenticated by Keycloak. It's a relatively simple integration
really, all pages require a valid Keycloak session, so it uses the default
Keycloak servlet filter adapter:

https://search.maven.org/artifact/org.keycloak/keycloak-servlet-filter-adapter/5.0.0/jar

In my setup I've mapped the Keycloak filter to all URLs (before the Wicket
filter). Using this filter is simply a matter of adding it to your web.xml
and making sure you have a keycloak.json file in your WEB-INF folder.

In Wicket, you can then get the Keycloak context from the RequestCycle:

ServletWebRequest request = (ServletWebRequest)
RequestCycle.get().getRequest();
HttpServletRequest containerRequest = request.getContainerRequest();
KeycloakSecurityContext securityContext = (KeycloakSecurityContext)
containerRequest.getAttribute(KeycloakSecurityContext.class.getName());

Hope this helps.

Sincerely,

Jeroen


Op wo 10 apr. 2019 om 16:43 schreef Calin Pavel :

> Hi everybody,
>
> Did anybody integrated Wicket with Keycloak?
> Do you have any sample how this could be done - to restrict access to
> pages, to authenticate user 
>
>
> Thank you,
> Calin Pavel
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
Jeroen Steenbeeke


Re: setOutputMarkupId(true) on everything?

2017-08-01 Thread Jeroen Steenbeeke
You could try an IComponentInstantiationListener for that:

https://ci.apache.org/projects/wicket/apidocs/7.x/org/apache/wicket/application/IComponentInstantiationListener.html

You can set them in your Application class:

https://ci.apache.org/projects/wicket/apidocs/7.x/org/apache/wicket/Application.html#getComponentInstantiationListeners()

It seems harmless to me as well, but maybe I'm missing something important.

- Jeroen

2017-08-01 15:02 GMT+02:00 Entropy <blmulholl...@gmail.com>:

> While resolving our latest issue, a co-worker asked me why we don't just
> make
> a visitor to set every component to have setOutputMarkupId(true)?  It seems
> harmless, and corrects a common mistake people make of not setting it.
>
> Is there something I'm not seeing?  Is there a way to default this to true
> for all components other than a visitor in every page?  And if I did this,
> are there side effects that I am not seeing?  Some reason why this isn't
> standard behavior?
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/
> setOutputMarkupId-true-on-everything-tp4678394.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
>
>


-- 
Jeroen Steenbeeke


Re: Too many 302 redirects with 1.5.8 Wicket

2016-05-03 Thread Jeroen Steenbeeke
There are no less than 7 newer versions of 1.5.x, so perhaps update to
1.5.15 to see if you're having better luck? According to the changelog,
there were several redirect-related bugs fixed in 1.5.11:

https://github.com/apache/wicket/blob/wicket-1.5.x/CHANGELOG-1.5#L41

Sincerely,

Jeroen

2016-05-03 13:57 GMT+02:00 tomask79 <tomas.klou...@embedit.cz>:

> Hi guys,
>
> currently in the older deployed versions of our system in the cluster
> environment, we're experiencing sometimes strange behaviour where one
> session loops in the 302 redirect cyclethis is the log from load
> balancer:
>
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
> "GET /wicket/page?420-1. 302 333 (redir=-,
>
> SID=h_pXgpfMGo80oe7JYFor4SeZtr6kz_QC9BWFzlRyjw37_T9y6XhL!22895550!902922496)
> "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"
>
> *when this 302 redirect loop could have happended with 1.5.8 please? *
>
> We've got sticky sessions ON, session replication ON as well. Btw we're not
> experiencing this with Wicket 6.0..
>
> thanks a lot in advance
>
> Tomas
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Too-many-302-redirects-with-1-5-8-Wicket-tp4674532.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
>
>


-- 
Jeroen Steenbeeke


Re: Announcing DEVdev: the Deventer Developers meetup

2014-01-10 Thread Jeroen Steenbeeke
The 30th of January is a Thursday, not a Wednesday


2014/1/10 Martijn Dashorst martijn.dasho...@gmail.com

 We just launched a new meetup in Deventer, the Netherlands: the
 DEVdev. We intend this to be a general developer oriented meetup that
 has semi-regular events.

 We want to kick off the meetup series with a Wicket oriented evening
 consisting of 3 presentations in dutch (we do plan to invite non-dutch
 speakers at later events).

 Since this is a mainly Netherlands oriented event, I will continue
 this message in dutch, with apologies to our international readers:

 Op woensdag 30 januari zal er in Deventer de eerste DEVdev meetup
 plaatsvinden met als hoofdonderwerp Apache Wicket. Het programma:

 17:30-18:00 Ontvangst
 18:00-18:30 State of the Wicket
 18:30-19:15 Pizza uit eigen oven
 19:15-19:45 Letting Wicket REST
 19:45-20:15 Wicket: What else?
 20:15-21:00 Afsluitende borrel

 State of the Wicket – Martijn Dashorst
 Over het verleden, heden en de toekomst van Apache Wicket, waaronder
 Wicket 7.

 Letting Wicket REST
 Waarom zou je Wicket toepassen in een RESTful-architectuur en hoe zou
 je het moeten doen?

 Wicket: What else?
 Een kleine blik in de Wicket-stuff projecten. Wat zijn leuke, mooie,
 handige projecten.

 De presentaties van deze avond worden gegeven in het Nederlands.

 Je kan registreren voor de meetup op onderstaand adres:

 http://www.meetup.com/DEVdev-powered-by-Topicus

 Als je je registreert voor de DEVdev groep ontvang je een
 welkomstbericht. Je bent dan nog niet aangemeld voor 30 januari–graag
 RSVP-en. Er zijn zo'n 80 plaatsen beschikbaar, en registratie
 geschiedt op basis van wie het eerst komt die het eerst maalt...

 DEVdev wordt gesponsord door Topicus. De pizza, drankjes en de
 locatie–een oud schoolgebouw recht tegenover het Deventer NS station.
 Met z'n ligging aan de juiste kant van de IJssel en rijke historie is
 Deventer een mooie plek om te bezoeken.

 DEVdev is sponsored by Topicus. They provide the food, drinks and the
 venue in our new office–an old school–located right across the
 Deventer train station. Located on the right side of the IJssel river,
 Deventer is a great town and has a well known historic center worth a
 visit.

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




-- 
Jeroen Steenbeeke
www.fortuityframework.com


Re: under the hood

2013-10-21 Thread Jeroen Steenbeeke
I'm not sure how up-to-date this is, but isn't this what you want?

https://cwiki.apache.org/confluence/display/WICKET/Request+processing+overview

If you need more details than that you should probably just dive into the
source code.

- Jeroen

PS. Google is your friend, this was the first hit for wicket request
handling

2013/10/20 Farrukhjon SATTOROV (farrukh) fireda...@gmail.com

 Hi everyone. I'm interesting how wicket farmework work under the hood, for
 example class colling sequence or steps by web server (tomcat):
 webserver-deploy-war-WicketFilter-WebApplication ? Thanks an advance.



Re: RSS

2013-03-12 Thread Jeroen Steenbeeke
I usually just implement RSS as a page rather than a resource. You
simply create a Page like you normally would, and override
getMarkupType:

@Override
public MarkupType getMarkupType() {
return new MarkupType(rss, application/rss+xml);
}

Then, instead of an HTML file you provide an RSS file that contains
your markup (with wicket:id attributes and such).

Maybe not exactly what you're looking for, but I hope it helps regardless.

- Jeroen

2013/3/12 Stephen Walsh step...@connectwithawalsh.com:
 Anyone have a working solution for producing RSS feeds from content stored
 in a DB on a Wicket 6.5+ page?  I've been reading through all of the old
 docs on wicketstuff-rome, but it seems it's not supported with the changes
 made to 6.5+.

 I can generate my xml file, but not really sure how to go about actually
 publishing it and having Wicket recognize it as a resource once it's on the
 file system.  Hope that makes sense...

 ___
 Stephen Walsh | http://connectwithawalsh.com



-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Eclipse-IDE Plugin Wicket Bench not existing (any more)?

2012-03-26 Thread Jeroen Steenbeeke
You could try Qwickie:

http://code.google.com/p/qwickie/

2012/3/24 Stefan Lindner lind...@visionet.de:
 It's dead. Someone tried to continue i tat 
 http://sourceforge.net/projects/stump/ but no release is available.

 -Ursprüngliche Nachricht-
 Von: Ben Stover [mailto:bxsto...@yahoo.co.uk]
 Gesendet: Samstag, 24. März 2012 01:32
 An: Wicket Users
 Betreff: Eclipse-IDE Plugin Wicket Bench not existing (any more)?

 When I go to page

 http://wicket.apache.org/learn/ides.html

 and click on Wicket Bench link for Eclipse then this link goes to nowhere.

 Is this project out of date/closed?

 Ben







 -
 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




-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Apache Wicket is a Flawed Framework

2011-11-17 Thread Jeroen Steenbeeke
I really liked the comment by javakata on that post. Counters every
argument with a counter-example and doesn't attack the speaker once.

2011/11/18 Attila Király kiralyattila...@gmail.com:
 Currently a link to this mail is the most popular on dzone:
 http://www.dzone.com/links/apache_wicket_is_a_flawed_framework.html

 Attila




-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
I'd suggest running the transaction in the background (separate
thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
check if the thread was finished and only do the redirect after
finishing. This way, the pagemap remains unlocked.

2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
 Hi,

 if any of you could help, we have a problem in one of our wicket
 installations. We have a system that connects to another system. Sometimes
 the system's reply lasts for more than a minute.
 Wicket is having problem with regards to the page map being locked.

 I click for example on a page to request for a balance, the host doesn't
 return anymessage for about 1 minute or more.

 So instead of waiting, i will try to move to another page, problem is... i
 can't switch pages. wicket seems to have locked the page map and i can't
 get out or even logout.

 After  a minute, an exception is thrown saying that the page map may have
 been locked for more than 1 minute

 is there any way around this?

 Thanks A Lot
 Carlo




-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
I'd suggest adapting your application to use Wicket properly instead
of the other way around. I'm not a Wicket Dev but I'm pretty sure that
desynchronizing page map access will cause more problems than it
solves.

Your problem is that Page A displays data which can take a lot of time
to gather due to polling an external system. So use this scenario.

1) Upon load, Page A starts a thread that fetches the information, and
displays a placeholder (a loading image or something like that).
Once the page is loaded your thread will be running and the pagemap
unlocked.
2) Use Ajax polling (in the way I suggested) to check if the thread
has finished. This will not lock the pagemap so you are free to
navigate the site. Once the thread is finished, you can replace the
placeholder from step 1 with the actual panel

Alternatively, you could use a push solution (e.g. wicketstuff-push)
to automatically publish the data upon thread completion (or append it
as the data comes in).

2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
 hi,

 i believe this is due to the fact that wicket has synchronized page maps for
 access.

 do you think it is safe to remove it?
 what are the precautions when removing synchronized for wicket page maps?

 Is there a setting that I could use to disable this?

 Thanks A Lot

 Carlo

 On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke j.steenbeeke.ml@
 gmail.com wrote:

 I'd suggest running the transaction in the background (separate
 thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
 check if the thread was finished and only do the redirect after
 finishing. This way, the pagemap remains unlocked.

 2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
  Hi,
 
  if any of you could help, we have a problem in one of our wicket
  installations. We have a system that connects to another system.
 Sometimes
  the system's reply lasts for more than a minute.
  Wicket is having problem with regards to the page map being locked.
 
  I click for example on a page to request for a balance, the host doesn't
  return anymessage for about 1 minute or more.
 
  So instead of waiting, i will try to move to another page, problem is...
 i
  can't switch pages. wicket seems to have locked the page map and i
 can't
  get out or even logout.
 
  After  a minute, an exception is thrown saying that the page map may have
  been locked for more than 1 minute
 
  is there any way around this?
 
  Thanks A Lot
  Carlo
 



 --
 Jeroen Steenbeeke
 www.fortuityframework.com

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






-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
If you do it my way, then you don't have to

2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
 is there anyway that i could just kill the previous thread?

 On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:

 if i can't do this, is there anyway that i could at least increase the
 timeout of the pagemap to greater than 1 minute?
 1 minute would be too little i guess


 On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Why not follow the Jeroen's suggestion instead of trying to trick
 framework
 internals?

 Ernesto

 On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
 carlo.camer...@gmail.comwrote:

  hi,
 
  i believe this is due to the fact that wicket has synchronized page maps
  for
  access.
 
  do you think it is safe to remove it?
  what are the precautions when removing synchronized for wicket page
 maps?
 
  Is there a setting that I could use to disable this?
 
  Thanks A Lot
 
  Carlo
 
  On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke j.steenbeeke.ml@
  gmail.com wrote:
 
   I'd suggest running the transaction in the background (separate
   thread) and using an AjaxStoppableSelfUpdatingTimer to periodically
   check if the thread was finished and only do the redirect after
   finishing. This way, the pagemap remains unlocked.
  
   2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
Hi,
   
if any of you could help, we have a problem in one of our wicket
installations. We have a system that connects to another system.
   Sometimes
the system's reply lasts for more than a minute.
Wicket is having problem with regards to the page map being locked.
   
I click for example on a page to request for a balance, the host
  doesn't
return anymessage for about 1 minute or more.
   
So instead of waiting, i will try to move to another page, problem
  is...
   i
can't switch pages. wicket seems to have locked the page map and
 i
   can't
get out or even logout.
   
After  a minute, an exception is thrown saying that the page map may
  have
been locked for more than 1 minute
   
is there any way around this?
   
Thanks A Lot
Carlo
   
  
  
  
   --
   Jeroen Steenbeeke
   www.fortuityframework.com
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 







-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
My apologies, that is a class we use internally. Must have confused it
with some basic wicket class.

You can use AbstractAjaxTimerBehavior to similar effect. Just override
the onTimer method

2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
 where do i get this class?

 AjaxStoppableSelfUpdatingTimer ?
 On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:

 hi,

 please do.

 thanks a lot!


 On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Carlo,

 If you need some code illustrating  how to do this, I can mail you the
 source code of a similar use case: creating a lengthy PDF and providing
 users with progress feedback... It uses the same approach Jeroen
 mentioned.

 Best,

 Ernesto

 On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke j.steenbeeke.ml@
 gmail.com wrote:

  If you do it my way, then you don't have to
 
  2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
   is there anyway that i could just kill the previous thread?
  
   On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino 
  carlo.camer...@gmail.comwrote:
  
   if i can't do this, is there anyway that i could at least increase
 the
   timeout of the pagemap to greater than 1 minute?
   1 minute would be too little i guess
  
  
   On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
   Why not follow the Jeroen's suggestion instead of trying to trick
   framework
   internals?
  
   Ernesto
  
   On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
   carlo.camer...@gmail.comwrote:
  
hi,
   
i believe this is due to the fact that wicket has synchronized
 page
  maps
for
access.
   
do you think it is safe to remove it?
what are the precautions when removing synchronized for wicket
 page
   maps?
   
Is there a setting that I could use to disable this?
   
Thanks A Lot
   
Carlo
   
On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke 
 j.steenbeeke.ml@
gmail.com wrote:
   
 I'd suggest running the transaction in the background (separate
 thread) and using an AjaxStoppableSelfUpdatingTimer to
 periodically
 check if the thread was finished and only do the redirect after
 finishing. This way, the pagemap remains unlocked.

 2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
  Hi,
 
  if any of you could help, we have a problem in one of our
 wicket
  installations. We have a system that connects to another
 system.
 Sometimes
  the system's reply lasts for more than a minute.
  Wicket is having problem with regards to the page map being
  locked.
 
  I click for example on a page to request for a balance, the
 host
doesn't
  return anymessage for about 1 minute or more.
 
  So instead of waiting, i will try to move to another page,
  problem
is...
 i
  can't switch pages. wicket seems to have locked the page
 map
  and
   i
 can't
  get out or even logout.
 
  After  a minute, an exception is thrown saying that the page
 map
  may
have
  been locked for more than 1 minute
 
  is there any way around this?
 
  Thanks A Lot
  Carlo
 



 --
 Jeroen Steenbeeke
 www.fortuityframework.com


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


   
  
  
  
  
 
 
 
  --
  Jeroen Steenbeeke
  www.fortuityframework.com
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 







-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Page Map Is Locked, Can't Switch Pages When A Transaction Is Ongoing

2010-01-21 Thread Jeroen Steenbeeke
Afraid not, but I believe wicketstuff-push is integrated with comet.

2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
 no prob.

 i was thinking, if was going to do timerbehaior approach, might as well go
 with comet

 have any of you guys used comet for this kind of situation before?

 thanks
 carlo

 On Thu, Jan 21, 2010 at 3:54 AM, Jeroen Steenbeeke j.steenbeeke.ml@
 gmail.com wrote:

 My apologies, that is a class we use internally. Must have confused it
 with some basic wicket class.

 You can use AbstractAjaxTimerBehavior to similar effect. Just override
 the onTimer method

 2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
  where do i get this class?
 
  AjaxStoppableSelfUpdatingTimer ?
  On Thu, Jan 21, 2010 at 3:43 AM, Carlo Camerino 
 carlo.camer...@gmail.comwrote:
 
  hi,
 
  please do.
 
  thanks a lot!
 
 
  On Thu, Jan 21, 2010 at 3:38 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
  Carlo,
 
  If you need some code illustrating  how to do this, I can mail you the
  source code of a similar use case: creating a lengthy PDF and providing
  users with progress feedback... It uses the same approach Jeroen
  mentioned.
 
  Best,
 
  Ernesto
 
  On Thu, Jan 21, 2010 at 12:21 PM, Jeroen Steenbeeke j.steenbeeke.ml@
  gmail.com wrote:
 
   If you do it my way, then you don't have to
  
   2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
is there anyway that i could just kill the previous thread?
   
On Thu, Jan 21, 2010 at 3:05 AM, Carlo Camerino 
   carlo.camer...@gmail.comwrote:
   
if i can't do this, is there anyway that i could at least increase
  the
timeout of the pagemap to greater than 1 minute?
1 minute would be too little i guess
   
   
On Thu, Jan 21, 2010 at 2:34 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:
   
Why not follow the Jeroen's suggestion instead of trying to trick
framework
internals?
   
Ernesto
   
On Thu, Jan 21, 2010 at 11:17 AM, Carlo Camerino
carlo.camer...@gmail.comwrote:
   
 hi,

 i believe this is due to the fact that wicket has synchronized
  page
   maps
 for
 access.

 do you think it is safe to remove it?
 what are the precautions when removing synchronized for wicket
  page
maps?

 Is there a setting that I could use to disable this?

 Thanks A Lot

 Carlo

 On Thu, Jan 21, 2010 at 5:13 PM, Jeroen Steenbeeke 
  j.steenbeeke.ml@
 gmail.com wrote:

  I'd suggest running the transaction in the background
 (separate
  thread) and using an AjaxStoppableSelfUpdatingTimer to
  periodically
  check if the thread was finished and only do the redirect
 after
  finishing. This way, the pagemap remains unlocked.
 
  2010/1/21 Carlo Camerino carlo.camer...@gmail.com:
   Hi,
  
   if any of you could help, we have a problem in one of our
  wicket
   installations. We have a system that connects to another
  system.
  Sometimes
   the system's reply lasts for more than a minute.
   Wicket is having problem with regards to the page map being
   locked.
  
   I click for example on a page to request for a balance, the
  host
 doesn't
   return anymessage for about 1 minute or more.
  
   So instead of waiting, i will try to move to another page,
   problem
 is...
  i
   can't switch pages. wicket seems to have locked the
 page
  map
   and
i
  can't
   get out or even logout.
  
   After  a minute, an exception is thrown saying that the
 page
  map
   may
 have
   been locked for more than 1 minute
  
   is there any way around this?
  
   Thanks A Lot
   Carlo
  
 
 
 
  --
  Jeroen Steenbeeke
  www.fortuityframework.com
 
 
   -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail:
 users-h...@wicket.apache.org
 
 

   
   
   
   
  
  
  
   --
   Jeroen Steenbeeke
   www.fortuityframework.com
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
 
 
 
 



 --
 Jeroen Steenbeeke
 www.fortuityframework.com

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






-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: wicket bench in eclipse

2010-01-21 Thread Jeroen Steenbeeke
Does it support parent POMs yet? This was an issue I had back when I
used Netbeans and had to work with a multi-module project.

2010/1/21 Andreas Lüdtke sam.lued...@t-online.de:
 Hi Lionel,

 since you don't write what exactly doesn't work, I can only guess: is the
 M2_REPO variable beeing defined/set in eclipse?

 This was my main problem when I used eclipse. You should give NetBeans a try.
 Just open the pom file and everything is fine and working.

 Andreas


 -Original Message-
 From: Lionel Port [mailto:lio...@portconnection.com]
 Sent: Thursday, January 21, 2010 4:48 AM
 To: users@wicket.apache.org
 Subject: wicket bench in eclipse

 Hi Guys,

 Not strictly a wicket question, I know. Does anyone have wicket bench
 working in Galileo or recent version of eclipse or know of a good
 plugin I should be using?. My project has a maven structure, not sure
 if thats why it doesn't work.


 regards,
 Lionel


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





-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: PageLink deprecated

2010-01-19 Thread Jeroen Steenbeeke
Which is what I suggested earlier in this discussion as well. So long
as nobody touches the IPageLink interface then simply adapting
SecurePageLink to use IPageLink directly would work without any
significant break in SecurePageLink's API. That way there are no icky
constructors and no unnecessary link classes.

-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: PageLink deprecated

2010-01-18 Thread Jeroen Steenbeeke
Because neither has a getPageClass() method?

2010/1/18 Igor Vaynberg igor.vaynb...@gmail.com:
 well, if the functionality can be accomplished using either
 BookmarkablePageLink or Link, why do we need yet another way to do it?

 -igor

 On Sun, Jan 17, 2010 at 11:44 PM, Jeroen Steenbeeke
 j.steenbeeke...@gmail.com wrote:
 Guys, no need to keep explaining what's wrong with passing a Page in
 the constructor, we understand that!

 Forget about that filthy 3rd constructor, I know it's wrong and I
 never used it anyway. That wasn't what my question was about.

 There are two more constructors:

 PageLink(String, Class)
 PageLink(String, IPageLink)

 Both of these do not replicate the dangerous behavior illustrated in
 this thread so far. I understand that we can easily create our own
 implementation that simulates the behavior we want. I just wanted to
 understand the reasoning for removing the whole class when only one of
 the constructors is dangerous. From what Martijn Dashorst just told
 me, it was a case of seeing as we already have Link and
 BookmarkablePageLink, we figured you could just use those instead.

 This is also the source of miscommunication so far. The Javadoc simply
 states what you should use instead, but does not explicitly state why.
 The assumption is that any behavior you can achieve with the
 PageLink/IPageLink combination can also be done with a simple Link.
 This does not take into account the use of the Page Identity for
 security checks however (mainly for determining link visibility,
 which, frankly, does not need an actual instance of the page in
 question), which brings us back to Emond's original point.

 On the other hand, one could argue that the only use for the page
 identity is for security purposes, and it would therefore be more at
 home in a specialized class in wicket-security.

 --
 Jeroen Steenbeeke
 www.fortuityframework.com

 -
 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





-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: PageLink deprecated

2010-01-17 Thread Jeroen Steenbeeke
Jeremy,

That does not explain why the whole class is deprecated. Getting rid
of the constructor you linked to is a good thing, but why get rid of
the whole class when using an IPageLink is really just an indirection
to overriding onClick (with the added benefit of being able to use the
page identity for security checks).

2010/1/16 Jeremy Thomerson jer...@wickettraining.com:
 Gone because creating the page(s) during the rendering of another page is a
 bad idea.  It should be done in the onClick handler.  See the comment in the
 deprecation note (of the method, not just the class).

 http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/link/PageLink.java?r=814819#l122

 --
 Jeremy Thomerson
 http://www.wickettraining.com


-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: PageLink deprecated

2010-01-17 Thread Jeroen Steenbeeke
Guys, no need to keep explaining what's wrong with passing a Page in
the constructor, we understand that!

Forget about that filthy 3rd constructor, I know it's wrong and I
never used it anyway. That wasn't what my question was about.

There are two more constructors:

PageLink(String, Class)
PageLink(String, IPageLink)

Both of these do not replicate the dangerous behavior illustrated in
this thread so far. I understand that we can easily create our own
implementation that simulates the behavior we want. I just wanted to
understand the reasoning for removing the whole class when only one of
the constructors is dangerous. From what Martijn Dashorst just told
me, it was a case of seeing as we already have Link and
BookmarkablePageLink, we figured you could just use those instead.

This is also the source of miscommunication so far. The Javadoc simply
states what you should use instead, but does not explicitly state why.
The assumption is that any behavior you can achieve with the
PageLink/IPageLink combination can also be done with a simple Link.
This does not take into account the use of the Page Identity for
security checks however (mainly for determining link visibility,
which, frankly, does not need an actual instance of the page in
question), which brings us back to Emond's original point.

On the other hand, one could argue that the only use for the page
identity is for security purposes, and it would therefore be more at
home in a specialized class in wicket-security.

-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: PageLink deprecated

2010-01-15 Thread Jeroen Steenbeeke
The obvious answer is to rewrite SecurePageLink to extend Link and
take an IPageLink as parameter. IPageLink is not deprecated so I would
hope that no trigger happy Wicket devs will be removing it. A quick
look at the SVN trunk shows it is still available whereas PageLink is
already gone.

Then again, I am also curious as to why PageLink was deprecated in the
first place.

-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Wicket Acegi Security

2010-01-09 Thread Jeroen Steenbeeke
I'm not sure if I fully understood your question, but perhaps this can help:

http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html

Of course, you could have simply Googled that yourself:

http://en.lmgtfy.com/?q=wicket+acegi+security+role

2010/1/9 raj kamal rajkamal@gmail.com:
 Hi,

   I am Working as Software Eng in India.Currently Working on WICKET
 Security. i can't find security that based on Database Interaction  can u
 send any link that understand (WICKET+ACEGI+DATABASE+ROLE_
 BASED)

 Regards
 Rajkamal.S




-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: TabbedPanel + authorization strategy

2010-01-08 Thread Jeroen Steenbeeke
I take it you configured wicket-auth-roles by doing
getSecuritySettings().setAuthorizationStrategy(...) in your
application's init?

If so, then the security check for that component is done by an
IComponentInstantiationListener that is automatically initialized by
the constructor of Application.

In other words: the permissions are checked automatically. I believe
the default behavior is to throw an UnauthorizedInstantiationException
if component instantiation is not authorized, but you can tweak this
by calling 
getSecuritySettings().setUnauthorizedComponentInstantiationListener(...).
An example implementation for making components invisible if not
authorized would be:

getSecuritySettings().setUnauthorizedComponentInstantiationListener(new
IUnauthorizedComponentInstantiationListener() {
  public void onUnauthorizedInstantiation(final Component component)
  {
if (component instanceof Page) {
  // Redirect to index
  throw new RestartResponseAtInterceptPageException(YourLoginPage.class);
  // Or you can just throw the original UnauthorizedInstantiationException
} else {
  component.setVisible(false);
}
}
);

DISCLAIMER: This post was constructed after studying the relevant
source for about 2 minutes and googling for about 1 minute to get some
info about wicket-auth-roles.

2010/1/8 toberger torben.ber...@gmx.de:

 This is my problem. How do I get the information, if the user has not the
 permission to see the panel?

 I create a tab list like this:

  ListITab tabs = new ArrayListITab();
 tabs.add(new AbstractTab(new ModelString(panel)) {

  public Panel getPanel(String panelId) {
    return new FooPanel(panelId);
  }
 ...
 });

 And I'm securing the panel through annotation:

 @AuthorizeInstantiation(ADMIN)
 public class FooPanel extends Panel {
 ...
 }

 So the tab will be added before I get the information about its auths.



 James Carman-3 wrote:

 Can't you just not add the tab if the user doesn't have the
 role/permission required?


 --
 View this message in context: 
 http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27073005.html
 Sent from the Wicket - User 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





-- 
Jeroen Steenbeeke
www.fortuityframework.com

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



Re: Need Wicket Book

2009-08-18 Thread Jeroen Steenbeeke
I realize you asked for freely available information sources, but you really
can't go wrong with Wicket in Action:
http://manning.com/dashorst/
It isn't that expensive at $45, and you get a PDF copy as well. You can also
skip the dead tree version and get just the PDF for $27.50. And I'm not just
saying this because Martijn is a co-worker, it really is an excellent book.
- Jeroen

2009/8/18 Haulyn R. Jason saharab...@gmail.com

 you can start from wicket tutorial, live demo
 http://wicketstuff.org/wicket13/and the quick start is very good:
 http://wicket.apache.org/quickstart.html




 On Tue, Aug 18, 2009 at 1:26 PM, Gerald Fernando 
 gerald.anto.ferna...@gmail.com wrote:

  Hello Friends,
 
  Am Gerald Fernando as well as new to Wicket.
  I was assigned to do a  project using Wicket.
  So first i Need to study well Wicket(from the very basic steps)
  What can be Achieved and What cant be Achieved.
  please tell me the Books for Wicket(Free DownLoad).
  so that i can go ahead.
  from the basic i want to study throughly
  please Help me
 
 
 
  --
  Thanksregards,
  Gerald A
 



 --
 --
 Enjoy. Thanks!

 Haulyn Microproduction

 Mobile: +086-15864011231
 email: saharab...@gmail.com,
 hmp.hau...@foxmail.com
 website: http://haulynjason.net
 gtalk: saharab...@gmail.com
 yahoo: jia_hao...@yahoo.com
 msn: saharab...@gmail.com
 skype: saharabear
 QQ: 378606292

 Haulyn Jason



Re: Use Guice....

2009-07-24 Thread Jeroen Steenbeeke
If Dependency Injection is all you want to do then indeed Spring may not be
the best choice, but in my case at least I use it for more than that, as I
also use the Spring Transaction Manager and Spring Mailer.
Also, Spring does seem to cater mainly to XML fetishists, but they do offer
alternatives:
 ?xml version=1.0 encoding=utf-8?
beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:context=http://www.springframework.org/schema/context;
  xsi:schemaLocation=http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd

context:annotation-config /
context:component-scan
  base-package=path.to.your.beans /
/beans
After this, you just use @Component and @Autowired annotations for your
beans and dependencies, respectively. No need to muck around in XML aside
from some initial config.
Spring does not need to be painful.
Cheers, Jeroen

DISCLAIMER: I have never used Guice

2009/7/23 francisco treacy francisco.tre...@gmail.com

 http://fiber-space.de/wordpress/?p=1016

 2009/7/23 Uwe Schäfer schae...@thomas-daily.de:
  Johannes Schneider schrieb:
 
  It's the better Spring ;-)
 
  agreed!
 
  -
  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: Spring Autowired and @SpringBean

2009-06-02 Thread Jeroen Steenbeeke
Not sure if this will help, but I have the following in my Spring
configuration file:
?xml version=1.0 encoding=utf-8?
beans xmlns=http://www.springframework.org/schema/beans;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:context=http://www.springframework.org/schema/context;
  xsi:schemaLocation=http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-2.5.xsd
  
  context:annotation-config /

  context:component-scan
  base-package=path.to.my.beans.impl /
/beans
For each bean implementation I use
@org.springframework.stereotype.Component, and for each property that needs
to be set on these beans I use
@org.springframework.beans.factory.annotation.Autowired.
This way you can do the following:

@Component
public class FooServiceImpl implements FooService {
  @Autowired
  private BarService bar;
  public void doSomething() {
// Does something
  }
  public void setBar(BarService bar) {
this.bar = bar;
  }
}
And in your Wicket pages you use:
public class MyPage extends Page {
  @SpringBean
  private FooService service;
  public MyPage() {
super();
service.doSomething();
  }
}
And of course, don't forget the SpringComponentInjector (which you already
have) - and the required fields in your web.xml:

context-param
  param-namecontextConfigLocation/param-name
  param-valueclasspath:your_application_context.xml/param-value
  /context-param
Hope this helps,
Jeroen


Re: GSoC ideas for 09

2009-02-26 Thread Jeroen Steenbeeke

 Once again it seems a lame excuse to say you're too busy or the various
 other things when this could both give the project good pr and possibly add
 more people who contribute to the framework.

I've found that the best way to convince people does not involve insulting
the person you're trying to convince. There is merit to your argument of
good PR and possible new contributors, but let's not forget that the people
working on Wicket do so in their spare time - and you know that there are a
lot of things in life that require time. It is fully understandable that
what little time the developers have to spend on Wicket, they'd rather use
that time to improve the framework and fix bugs.
Mentoring a SoC student takes a considerable amount of time and
concentration, and while some students may blossom on their own, a lot of
them need guidance on a regular basis - this requires a massive investment
of spare time that could otherwise have been used for improving Wicket. A
mentor that is only half interested will not be an advantage to the student,
and be bad PR rather than good - you need mentors that are willing, good,
know the framework well and have loads of time - the last of which does not
apply to a lot of Wicket Devs. Calling it lame doesn't change anything about
it, but it does agitate the developers, which doesn't exactly help your
cause.
- Jeroen