Re: Wicket+Spring Security the Wicket way
Hello, I really would like to read some comments about this topic. Anyone have some experience with putting Spring Security and Wicket together? 2012/9/18 Luis Pureza pur...@gmail.com Hi, I'm new to both Wicket and Spring Security, so bear that in mind :) I'm trying to integrate Wicket and Spring Security into my webapp, but I'm not feeling happy with the end result. As you might know, Spring Security works by listening to requests sent to virtual URLs. So, for example, to login you have to send a request to '/j_spring_security_check' with the username in a parameter called 'j_username' and the password in 'j_password'. Similarly, to logout you send a request to '/j_spring_security_logout'. Currently I have a simple HTML login form with action set to '/j_spring_security_check' and it works fine, but this just bypasses Wicket completely. Moreover, it doesn't feel like the Wicket way. As someone else put it at http://tomaszdziurko.pl/2012/09/remember-functionality-apache-wicket/, (...) in my opinion using request based authentication framework with component based web framework is not the best idea. These two worlds just do not fit well together I tend to agree with his view. However, I don't want to reinvent the wheel and I'd like to reuse as much as possible from Spring Security. I've seen some articles on integrating Wicket and Spring Security (such as http://javajeedevelopment.blogspot.co.uk/2011/03/integrating-spring-security-3-with.html ), but it seems to me like the approach followed here would force me to re-implementing lots of stuff that Spring Security already provides -- for instance, remember-me functionality. Do you have any thoughts on this? Thanks! Luis Pureza -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
Re: E-mail validation link
Hello, I've implemented this in the same way as Josh does. My code for register participant for our conference[1] is open source. You can view it here[2] in particular: https://bitbucket.org/margielm/confitura/src/06588ec117c8/src/main/java/jelatyna/pages/confitura/registration/form/RegistrationForm.java https://bitbucket.org/margielm/confitura/src/06588ec117c8/src/main/java/jelatyna/pages/confitura/registration/Registration.java [1] www.confitura.pl [2] https://bitbucket.org/margielm/confitura -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
Re: E-mail validation link
2012/7/19 Pierre Goupil goupilpie...@gmail.com It looks nice, Michal! I'm browsing it and I'll come back here if I have any questions, if it doesn't bother you. No problemo! we are here to help each other. So bug me as much as you want ;) btw. I was doing this for the first time. So if anyone has better, or at least different, idea - I am eager to hear it! -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
Re: add a component (submitLink) multiple times?
Hello, No, your code is not correct. You should use some kind of repeaters, like ListView: https://cwiki.apache.org/WICKET/listview-and-other-repeaters.html 2012/6/13 oliver.stef ova...@gmail.com How can I add a component (submitLink) multiple times? like this: ListString categories = Arrays.asList(English, Japanese, ); for (String str : language) { form.add(new SubmitLink(Name,str) { @Override public void onSubmit() { ...} } } and HTML: # Any ideas? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/add-a-component-submitLink-multiple-times-tp4649936p4649939.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 -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
Re: Exception handling and testing
2012/6/8 Alec Swan alecs...@gmail.com That's clever. I will give it a try. What is the recommendation on verifying that an exception was thrown during page rendering using Wicket tester? I am not talking just about authentication here, but exceptions in general. Hello, Why you want to verify that exception was thrown in WicketTester? IMHO it is not proper place to check that. In my code I am verifying expcetions in services tests using catch-exception library [1]. And then while testing Page I am mocking my service to throw exception and I am verifying behaviour on exception (e.g. redirecting to login page, showing error message etc...) That makes not only clearer code but also simplify testing. you can see example of services tests in [2] and page tests in [3] [1] http://code.google.com/p/catch-exception/ [2] https://bitbucket.org/margielm/confitura/src/8599eae2ba00/src/test/java/jelatyna/services/UserServiceImplShould.java [3] https://bitbucket.org/margielm/confitura/src/8599eae2ba00/src/test/java/jelatyna/pages/admin/login/LoginPageShould.java -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
Re: AjaxButton in Wicket 6.0
Thanks a lot. 2012/6/4 Martin Grigorov mgrigo...@apache.org Hi, As Vineet said there is a link in the migration page to a more detailed page about how Ajax works in Wicket 6. Since there is no script to decorate (because we don't use inline attributes anymore but event registration) the old AjaxCallDecorator is removed. The new way is: @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); AjaxCallListener listener = new AjaxCallListener(); listener.onPrecondition(yourConfirmLogicHere); attributes.getAjaxCallListeners().add(listener); } On Mon, Jun 4, 2012 at 12:26 AM, vineet semwal vineetsemwal1...@gmail.com wrote: Hi, decorator is replaced with iajaxcallistener ,take a look at wicket 6 migration , after that override updateAjaxAttributes(AjaxRequestAttributes attributes) in your ajaxbutton and add your ajaxCallListener in attributes.getAjaxCallListeners() On Mon, Jun 4, 2012 at 2:24 AM, Michal Margiel michal.marg...@gmail.com wrote: Hello, Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2 One of the problems is that *getAjaxCallDecorator* method was removed from * AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find how I can replace its functionality. In 1.5 we use this metthod to add JavaScript showing popup window in which user can confirm/cancel his/her action. [1] https://bitbucket.org/margielm/confitura/ [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel -- thank you, regards, Vineet Semwal - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
Re: portlet support in 1.5 1.6?
Hello, I have very, very little experience with portlet (and to be honest I am not very keen in getting more ;) ). And I have to surprise you - because I share your opinion about portlets sand portals. But I noticed lately that corporations like to say that whey offer portal for their clients and goes into Liferay or something like that. It would be just nice to use wicket in in, but it is not required - I agree that maintaining/developing it might cost more than it is worth. 2012/6/4 Martin Grigorov mgrigo...@apache.org Michal, Do you have experience with Portlets ? Can you explain me what it is good for ? What pure Servlet cannot do and Portlet can do or at least can do much simpler ? I guess you will say that a Portal can consume Porlets from many providers. But I can do the same with plain Servlet, and I personally don't know many providers of Portlet services. I've looked once or twice at it and I found just limitations. The specs always lag 2-3 years after Servlet/JSF specs releases... There are some bridges which fill some gaps with the other technologies ... On Mon, Jun 4, 2012 at 8:01 PM, Michal Margiel michal.marg...@gmail.com wrote: Hello, I know at least 2 projects that really wanted to use Wicket but had to drop it because of lack of official support for Portals (both of them runs on Liferay). Maybe it would be good to rethink this decision ? 2012/6/4 Dan Retzlaff dretzl...@gmail.com Nino, this came up last month: http://bit.ly/M5Zc2j http://mail-archives.apache.org/mod_mbox/wicket-users/201205.mbox/%3CCAMomwMoDASEG22Hnb4tWOruZkhfykSRBXS3X3WKDMJFxw+9=z...@mail.gmail.com%3E On Mon, Jun 4, 2012 at 9:07 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: So is there any? -- Best regards / Med venlig hilsen Nino Martinez -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel http://www.margiel.eu
AjaxButton in Wicket 6.0
Hello, Experimentally I tried to move our project[1] to Wicket 6.0.0-beta2 One of the problems is that *getAjaxCallDecorator* method was removed from * AjaxButton*. Neither in migration[2] guid nor in JavaDoc I cannot find how I can replace its functionality. In 1.5 we use this metthod to add JavaScript showing popup window in which user can confirm/cancel his/her action. [1] https://bitbucket.org/margielm/confitura/ [2] https://cwiki.apache.org/WICKET/migration-to-wicket-60.html -- Pozdrawiam/Best regards Michał Margiel http://www.confitura.pl (dawniej Javarsovia) http://www.linkedin.com/in/MichalMargiel