how to clear validation error
I have a form with a html submit button. In java I wrote my own onSubmit to handle the form processing. In the form I have a firstName field that is required. li First Name: span wicket:id=borderFirstName input type=text wicket:id=firstName/input /span /li TextField firstName = new TextField(firstName); firstName.setRequired(true); form.add( new FormComponentFeedbackBorder(borderFirstName).add( firstName ) ); All works great as long as the user input is valid. If I attempt to submit an empty firstName field I get the expected message in my FeedbackPanel and my firstName text field gets the red asterisk. I then add a valid firstName and submit again. The page remains showing the valid firstName input along with the validation errors and onSubmit does not fire. I must be doing something wrong but can't figure it out. Thanks for your help. I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9.
RE: how to clear validation error
Shouldn't the FeedbackPanel be a child of the forms panel, instead of the form itself ? (don't know exactly = Your way the feedbackpanel gets submitted too) Jérôme -Original Message- From: Chuck Brinkman [mailto:chasb1...@gmail.com] Sent: Friday, January 08, 2010 9:02 AM To: users@wicket.apache.org Subject: how to clear validation error I have a form with a html submit button. In java I wrote my own onSubmit to handle the form processing. In the form I have a firstName field that is required. li First Name: span wicket:id=borderFirstName input type=text wicket:id=firstName/input /span /li TextField firstName = new TextField(firstName); firstName.setRequired(true); form.add( new FormComponentFeedbackBorder(borderFirstName).add( firstName ) ); All works great as long as the user input is valid. If I attempt to submit an empty firstName field I get the expected message in my FeedbackPanel and my firstName text field gets the red asterisk. I then add a valid firstName and submit again. The page remains showing the valid firstName input along with the validation errors and onSubmit does not fire. I must be doing something wrong but can't figure it out. Thanks for your help. I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to clear validation error
maybe i left out too much code... form wicket:id=currentUserPanelForm ul li span wicket:id=feedback/span /li .more html omitted /ul input type=submit value=Update / /form or am I still missing something? On Fri, Jan 8, 2010 at 3:10 AM, Bodis, Jerome bo...@uni-mainz.de wrote: Shouldn't the FeedbackPanel be a child of the forms panel, instead of the form itself ? (don't know exactly = Your way the feedbackpanel gets submitted too) Jérôme -Original Message- From: Chuck Brinkman [mailto:chasb1...@gmail.com] Sent: Friday, January 08, 2010 9:02 AM To: users@wicket.apache.org Subject: how to clear validation error I have a form with a html submit button. In java I wrote my own onSubmit to handle the form processing. In the form I have a firstName field that is required. li First Name: span wicket:id=borderFirstName input type=text wicket:id=firstName/input /span /li TextField firstName = new TextField(firstName); firstName.setRequired(true); form.add( new FormComponentFeedbackBorder(borderFirstName).add( firstName ) ); All works great as long as the user input is valid. If I attempt to submit an empty firstName field I get the expected message in my FeedbackPanel and my firstName text field gets the red asterisk. I then add a valid firstName and submit again. The page remains showing the valid firstName input along with the validation errors and onSubmit does not fire. I must be doing something wrong but can't figure it out. Thanks for your help. I'm using wicket 1.4.5, tomcat 6, java 1.6 and firefox 3.0.8 on fc9. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TabbedPanel + authorization strategy
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
Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?
Guice has a concept of providers, I cant remember if spring has the same. You could in that provider ask what kind of mode wicket were in and then return the appropriate service. Im not sure this is a desired way togo since it will impact performance in production.. However resource filtering in maven as IIja writes are better and does not impact production performance. regards Nino 2010/1/7 Liam Clarke-Hutchinson l...@steelsky.co.nz: Hi all, This is probably more of a Spring question than a Wicket question, but I'm asking here in the hopes that someone else has done this before. Basically, we have a page that uses the @SpringBean annotation to inject a credit card validation service. At the moment, when we're developing, it's injecting the actual service, that then goes off to our card processor and validates the card etc. For integration testing etc. I want to avoid this, so I've created a simple implementation of the validation service that always returns true. Question I have, is how can I provide this bean instead of the real bean, based on the value of WebApplication.getConfigurationType()? The obvious solution for me would be to do it in the initialization of our WicketApplication - we already have a if we're in development mode section where we output component paths and turn on request logging and session size recording etc. is there a way I can programmatically provide my bean at this point? Or am I going about this entirely the wrong way? Many thanks for any advice offered, Regards, Liam Clarke - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: TabbedPanel + authorization strategy
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: Help with Wicket Adoption Numbers
Hi, We also had the same consideration when we chose Wicket. But why choose an inferior technology just because of it's Adoption Numbers? Also, Wicket is becoming more and more popular as people see the light :) Check out Jobs Trends (Relative Growth) here (JSF vs Struts vs Wicket): http://www.indeed.com/jobtrends?q=Struts%2C+JSF%2C+Wicketl=relative=1 We have a couple of hundred customers and so far the feedback is great both from our Developers and our Software Architects. Customers like that the GUIs are faster due to the simplicity of Ajax Adoption in Wicket. I also know that several large privately held companies in Sweden are using Wicket, as well as large Government Agencies (e.g. the Swedish Immigration Office). Sincerely yours Leo Erlandsson Lester Chua cicowic...@gmail.com 2010-01-08 01:43 Sänd svar till users@wicket.apache.org Till users@wicket.apache.org Kopia Ärende Help with Wicket Adoption Numbers Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help with Wicket Adoption Numbers
The dutch railways use wicket in at least one of their online apps (http://eropuit.nl), I know some dutch government agencies are using Wicket, dutch royal airlines (KLM) had/have a project using Wicket. Martijn On Fri, Jan 8, 2010 at 10:09 AM, leo.erlands...@tyringe.com wrote: Hi, We also had the same consideration when we chose Wicket. But why choose an inferior technology just because of it's Adoption Numbers? Also, Wicket is becoming more and more popular as people see the light :) Check out Jobs Trends (Relative Growth) here (JSF vs Struts vs Wicket): http://www.indeed.com/jobtrends?q=Struts%2C+JSF%2C+Wicketl=relative=1 We have a couple of hundred customers and so far the feedback is great both from our Developers and our Software Architects. Customers like that the GUIs are faster due to the simplicity of Ajax Adoption in Wicket. I also know that several large privately held companies in Sweden are using Wicket, as well as large Government Agencies (e.g. the Swedish Immigration Office). Sincerely yours Leo Erlandsson Lester Chua cicowic...@gmail.com 2010-01-08 01:43 Sänd svar till users@wicket.apache.org Till users@wicket.apache.org Kopia Ärende Help with Wicket Adoption Numbers Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help with Wicket Adoption Numbers
The Flemish Goverenemt (Belgium) has at least 2 intranet applications built on wicket. These are intranet applications, so I cannot give you some fancy urls. (but the apps are really fancy, I can assure you :-) ) Pieter On Fri, Jan 8, 2010 at 10:32 AM, Martijn Dashorst martijn.dasho...@gmail.com wrote: The dutch railways use wicket in at least one of their online apps (http://eropuit.nl), I know some dutch government agencies are using Wicket, dutch royal airlines (KLM) had/have a project using Wicket. Martijn On Fri, Jan 8, 2010 at 10:09 AM, leo.erlands...@tyringe.com wrote: Hi, We also had the same consideration when we chose Wicket. But why choose an inferior technology just because of it's Adoption Numbers? Also, Wicket is becoming more and more popular as people see the light :) Check out Jobs Trends (Relative Growth) here (JSF vs Struts vs Wicket): http://www.indeed.com/jobtrends?q=Struts%2C+JSF%2C+Wicketl=relative=1 We have a couple of hundred customers and so far the feedback is great both from our Developers and our Software Architects. Customers like that the GUIs are faster due to the simplicity of Ajax Adoption in Wicket. I also know that several large privately held companies in Sweden are using Wicket, as well as large Government Agencies (e.g. the Swedish Immigration Office). Sincerely yours Leo Erlandsson Lester Chua cicowic...@gmail.com 2010-01-08 01:43 Sänd svar till users@wicket.apache.org Till users@wicket.apache.org Kopia Ärende Help with Wicket Adoption Numbers Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be
Re: TabbedPanel + authorization strategy
Okay, with your example implementation I can disable the content of the tab. But the tab itself is still visible. And I am searching a way to disable this tab itself too. Jeroen Steenbeeke wrote: 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(...). -- View this message in context: http://old.nabble.com/TabbedPanel-%2B-authorization-strategy-tp13949910p27073815.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
Re: Help with Wicket Adoption Numbers
Lester Chua wrote: Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Hi Lester Did you point out that someone like Gavin King recommends wicket (and hence the Seam support for it) ? It may help to convince about wicket's credibility. hope it helps ++ -- Joseph Pachod IT THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 310 F + 49 761 3 85 59 550 E joseph.pac...@thomas-daily.de www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter www.signin.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet redakt...@thomas-daily.de. To receive the free TD News International - a selection of the day's top issues delivered to your mail box every day - please register at www.signin.thomas-daily.de Please note: Information received for our TD News International after 4 p.m. will be given priority for publication the following day. The daily editorial deadline is 8:30 a.m. You can reach our editorial staff at redakt...@thomas-daily.de. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help with Wicket Adoption Numbers
Do you mean this post? http://in.relation.to/Bloggers/HowToStartLearningJavaEE6 Ernesto On Fri, Jan 8, 2010 at 11:40 AM, Joseph Pachod j...@thomas-daily.de wrote: Lester Chua wrote: Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org Hi Lester Did you point out that someone like Gavin King recommends wicket (and hence the Seam support for it) ? It may help to convince about wicket's credibility. hope it helps ++ -- Joseph Pachod IT THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 310 F + 49 761 3 85 59 550 E joseph.pac...@thomas-daily.de www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter www.signin.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet redakt...@thomas-daily.de. To receive the free TD News International - a selection of the day's top issues delivered to your mail box every day - please register at www.signin.thomas-daily.de Please note: Information received for our TD News International after 4 p.m. will be given priority for publication the following day. The daily editorial deadline is 8:30 a.m. You can reach our editorial staff at redakt...@thomas-daily.de. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: TabbedPanel + authorization strategy
You can extend TabbedPanel and overwrite the newLink() method. toberger mailto:torben.ber...@gmx.de wrote: Okay, with your example implementation I can disable the content of the tab. But the tab itself is still visible. And I am searching a way to disable this tab itself too. Jeroen Steenbeeke wrote: 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(...). - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Wicket session not threadsafe?
Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/
RE: [announce] Wicket Stuff Core - JavaEE Inject
1. Each EJB must be declared in web.xml2. @PersistenceUnit and @EJB cannot be used together Don't think JavaEE Injection should be like this. Date: Thu, 31 Dec 2009 00:51:28 +0100 From: majorpe...@sch.bme.hu Subject: [announce] Wicket Stuff Core - JavaEE Inject To: users@wicket.apache.org; d...@wicket.apache.org Hi all, I am proud to announce the semi-new JavaEE Inject project in Wicket Stuff Core, which was formerly known as wicket-contrib-javaee. The goal of the project: Make the @EJB, @Resource and @PersistenceUnit annotations available for Wicket users, to make the development more easier. This means, that when your components are instantiating, the annotated fields will be injected properly, so you can use them for whatever you want. The project itself didn't changed much, some javac warnings has been solved, but it has now a newer Example application too, which will demonstrate for you the usage of the annotation based injecting. The example is based on maven, so this would be also a good example on how to use enterprise applications with wicket and maven. So now, if you think, that this stuff is cool and want to use it, you only have to do the followings: - Add Wicket Stuff Repository to your maven repository list (if you've not already done so): repository idwicket-stuff/id layoutdefault/layout urlhttp://wicketstuff.org/maven/repository/url /repository - Add the JavaEE Inject dependency to your web module: dependency groupIdorg.wicketstuff/groupId artifactIdjavaee-inject/artifactId version1.4-SNAPSHOT/version /dependency - Follow the Wiki instructions at http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee or try out for yourself the example application. - Profit Project Future: In the future, I would like to create a more up-to-date documentation for the project, better JavaDoc, and solve the JIRA issues too, and of course follow the modifications of the Wicket framework, so the project could work with the newest version always. Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org _ 上Windows Live 中国首页,下载Messenger2009安全版! http://www.windowslive.cn
Re: Wicket session not threadsafe?
That's very odd... As I understood, methods on the Session can be called by several threads. So, Session methods must be thread safe. Maybe something is wrong with your dao. (Since that wone will be called by multiple threads a the same time...) Pieter On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be
Re: Wicket session not threadsafe?
If your servlet container bind an different session for your users requests, you get the problem described too. Only one property of your session has user B values for user A requests? Or the entire session are different? On Fri, Jan 8, 2010 at 9:52 AM, Pieter Degraeuwe pieter.degrae...@systemworks.be wrote: That's very odd... As I understood, methods on the Session can be called by several threads. So, Session methods must be thread safe. Maybe something is wrong with your dao. (Since that wone will be called by multiple threads a the same time...) Pieter On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be -- Pedro Henrique Oliveira dos Santos
Re: Wicket session not threadsafe?
Look for static variables on your code too, they may be erroneous sharing values between session. On Fri, Jan 8, 2010 at 10:00 AM, Pedro Santos pedros...@gmail.com wrote: If your servlet container bind an different session for your users requests, you get the problem described too. Only one property of your session has user B values for user A requests? Or the entire session are different? On Fri, Jan 8, 2010 at 9:52 AM, Pieter Degraeuwe pieter.degrae...@systemworks.be wrote: That's very odd... As I understood, methods on the Session can be called by several threads. So, Session methods must be thread safe. Maybe something is wrong with your dao. (Since that wone will be called by multiple threads a the same time...) Pieter On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Pieter Degraeuwe Systemworks bvba Belgiëlaan 61 9070 Destelbergen GSM: +32 (0)485/68.60.85 Email: pieter.degrae...@systemworks.be visit us at http://www.systemworks.be -- Pedro Henrique Oliveira dos Santos -- Pedro Henrique Oliveira dos Santos
Re: Wicket session not threadsafe?
A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket session not threadsafe?
Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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
Re: Wicket session not threadsafe?
1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to clear validation error
I created a simple example. Here is my html and java. Once I get a validation error my onSubmit is not called. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head titleCurrent Page/title link rel=stylesheet href=dis.css type=text/css / meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / /head body div id=myPage div id=feedbackContent span wicket:id=feedback / /div form wicket:id=validateForm ul li First Name: span wicket:id=borderFirstName input type=text wicket:id=firstName/input /span /li /ul input type=submit value=Update / /form /div !-- myPage -- /body /html public class Validate extends WebPage { private static final Logger log = Logger.getLogger(Validate.class); private String firstName; public Validate() { super(); init(); } private void init() { DisSession session = null; session = DisSession.get(); setFirstName(session.getUser().getFirstName()); setDefaultModel(new CompoundPropertyModel(this)); Form form = new Form(validateForm) { DisSession session = null; @Override protected void onSubmit() { log.info(onSubmit called!); } }; add(form); TextField firstName = new TextField(firstName); firstName.setRequired(true); form.add(new FormComponentFeedbackBorder(borderFirstName) .add(firstName)); FeedbackPanel fbp = new FeedbackPanel(feedback); add(fbp); } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } }
Re: how to clear validation error
Override Form#onError Martijn On Fri, Jan 8, 2010 at 1:16 PM, Chuck Brinkman chasb1...@gmail.com wrote: I created a simple example. Here is my html and java. Once I get a validation error my onSubmit is not called. !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head titleCurrent Page/title link rel=stylesheet href=dis.css type=text/css / meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 / /head body div id=myPage div id=feedbackContent span wicket:id=feedback / /div form wicket:id=validateForm ul li First Name: span wicket:id=borderFirstName input type=text wicket:id=firstName/input /span /li /ul input type=submit value=Update / /form /div !-- myPage -- /body /html public class Validate extends WebPage { private static final Logger log = Logger.getLogger(Validate.class); private String firstName; public Validate() { super(); init(); } private void init() { DisSession session = null; session = DisSession.get(); setFirstName(session.getUser().getFirstName()); setDefaultModel(new CompoundPropertyModel(this)); Form form = new Form(validateForm) { DisSession session = null; �...@override protected void onSubmit() { log.info(onSubmit called!); } }; add(form); TextField firstName = new TextField(firstName); firstName.setRequired(true); form.add(new FormComponentFeedbackBorder(borderFirstName) .add(firstName)); FeedbackPanel fbp = new FeedbackPanel(feedback); add(fbp); } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } } -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket session not threadsafe?
1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.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
Several entities and DataTable
Hello! I am not using JPA and Spring. Write all with plain JDBC. I am write page which displays data with DataTable using SortableDataProvider. How i can display fields from another table (entity)? Wicket says that no get method found. Thank you! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket session not threadsafe?
The first thing to do would be to reproduce the issue in a dev environment, then try upgrading that environment to 1.3.7 and see if that solves the problem. There shouldn't be any API breaks in the 1.3 series so this should be a simple POM dependency version update. It might also be your Hibernate implementation caching and returning the wrong object as well. Steve On 08/01/2010, at 11:21 PM, allgo wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.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 smime.p7s Description: S/MIME cryptographic signature
Re: Wicket session not threadsafe?
unfortunately it is extremely difficult to reproduce in dev. Have tried it a lot. but the issue seems to happen vaer rare in a multi-user env. Thing is though ti happens rarely... it is a client facing issue and data integrity as promised is challenged. Steve Swinsburg-3 wrote: The first thing to do would be to reproduce the issue in a dev environment, then try upgrading that environment to 1.3.7 and see if that solves the problem. There shouldn't be any API breaks in the 1.3 series so this should be a simple POM dependency version update. It might also be your Hibernate implementation caching and returning the wrong object as well. Steve On 08/01/2010, at 11:21 PM, allgo wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.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 -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075321.html Sent from the Wicket - User mailing list archive at Nabble.com.
Re: Several entities and DataTable
Show your code. 2010/1/8 Ivan Dudko ivan.du...@gmail.com: Hello! I am not using JPA and Spring. Write all with plain JDBC. I am write page which displays data with DataTable using SortableDataProvider. How i can display fields from another table (entity)? Wicket says that no get method found. Thank you! - 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: Wicket session not threadsafe?
Are there any issues reported in the Wicket JIRA [1] that affect the 1.3 series in this way? Can you just upgrade Wicket version to 1.3.7 to see if that resolves your issue? Then you can keep digging. [1] http://issues.apache.org/jira/browse/WICKET On 08/01/2010, at 11:40 PM, allgo wrote: unfortunately it is extremely difficult to reproduce in dev. Have tried it a lot. but the issue seems to happen vaer rare in a multi-user env. Thing is though ti happens rarely... it is a client facing issue and data integrity as promised is challenged. Steve Swinsburg-3 wrote: The first thing to do would be to reproduce the issue in a dev environment, then try upgrading that environment to 1.3.7 and see if that solves the problem. There shouldn't be any API breaks in the 1.3 series so this should be a simple POM dependency version update. It might also be your Hibernate implementation caching and returning the wrong object as well. Steve On 08/01/2010, at 11:21 PM, allgo wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands,
Re: Wicket session not threadsafe?
Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: DiskPageStore file increasing to max size by only refreshing a HomePage
It's bookmarked pages that avoid new page creation isn't it? -Original Message- From: Matej Knopp [mailto:matej.kn...@gmail.com] Sent: Thursday, January 07, 2010 3:55 PM To: users@wicket.apache.org Subject: Re: DiskPageStore file increasing to max size by only refreshing a HomePage SetVersioned(false) does not help with new page instances being created. -Matej On Thu, Jan 7, 2010 at 9:46 PM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: about unversioned, i have just done a quick test on wicket-examples helloworld, adding serialVersionUID (not informed in the examples) and the result is the same: pagestore file increasing to the infinite (max size of course :) I meant Wicket's setVersioned(false); the serialVersionUID is just for binary serialization, as long as the fields do not change the computed value the VM generates for you should be the same. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Help with Wicket Adoption Numbers
Ernesto Reinaldo Barreiro wrote: Do you mean this post? http://in.relation.to/Bloggers/HowToStartLearningJavaEE6 Ernesto On Fri, Jan 8, 2010 at 11:40 AM, Joseph Pachod j...@thomas-daily.de wrote: For example yes Gavin said so as well on others occasions (I kind of remember having read it on some infoq's comment) ++ -- Joseph Pachod IT THOMAS DAILY GmbH Adlerstraße 19 79098 Freiburg Deutschland T + 49 761 3 85 59 310 F + 49 761 3 85 59 550 E joseph.pac...@thomas-daily.de www.thomas-daily.de Geschäftsführer/Managing Directors: Wendy Thomas, Susanne Larbig Handelsregister Freiburg i.Br., HRB 3947 Registrieren Sie sich unter www.signin.thomas-daily.de für die kostenfreien TD Morning News, eine Auswahl aktueller Themen des Tages morgens um 9:00 in Ihrer Mailbox. Hinweis: Der Redaktionsschluss für unsere TD Morning News ist täglich um 8:30 Uhr. Es werden vorrangig Informationen berücksichtigt, die nach 16:00 Uhr des Vortages eingegangen sind. Die Email-Adresse unserer Redaktion lautet redakt...@thomas-daily.de. To receive the free TD News International - a selection of the day's top issues delivered to your mail box every day - please register at www.signin.thomas-daily.de Please note: Information received for our TD News International after 4 p.m. will be given priority for publication the following day. The daily editorial deadline is 8:30 a.m. You can reach our editorial staff at redakt...@thomas-daily.de. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: Wicket session not threadsafe?
The session object is bound to the HttpSession, so it is as safe as Tomcat or whatever servlet container is running your application. Here are some things to consider that have bit me in the butt, and have nothing to do with your local setup: * Is that happening locally in your test environment? * Does your client have caching proxies? (do they even know?) * Do your response headers have the no-cache entries? What might be happening is the first person to log in through the caching proxy gets their information cached by the proxy. The second person comes in and sees it. Typically the problem has to do with poorly configured proxy servers and they don't properly distinguish the pages with the cache control headers you supply. The only way around it is to turn off client caching completely. -Original Message- From: Soumya [mailto:soumya_...@yahoo.co.in] Sent: Friday, January 08, 2010 6:18 AM To: users@wicket.apache.org Subject: Wicket session not threadsafe? Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket session not threadsafe?
ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075144.html
RE: Wicket session not threadsafe?
Hi Berin, No the users are all from different companies and no way there woudl be caching of their side. User A belongs to a client X say working in New York , while User B may be of client Y working in texas. It doesnt happen in test environment. but then that is not a multi-user environment in true sense of teh word. As hardly 3-4 people test it and we never got into that situation. For live however there are 500+ users using it everyday. no-cache entry? I am bit sketchy on this one. Can you give an example? Thanks for ur help. Loritsch, Berin C. wrote: The session object is bound to the HttpSession, so it is as safe as Tomcat or whatever servlet container is running your application. Here are some things to consider that have bit me in the butt, and have nothing to do with your local setup: * Is that happening locally in your test environment? * Does your client have caching proxies? (do they even know?) * Do your response headers have the no-cache entries? What might be happening is the first person to log in through the caching proxy gets their information cached by the proxy. The second person comes in and sees it. Typically the problem has to do with poorly configured proxy servers and they don't properly distinguish the pages with the cache control headers you supply. The only way around it is to turn off client caching completely. -Original Message- From: Soumya [mailto:soumya_...@yahoo.co.in] Sent: Friday, January 08, 2010 6:18 AM To: users@wicket.apache.org Subject: Wicket session not threadsafe? Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27076126.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
Re: Help with Wicket Adoption Numbers
Someone should craft a very nice dilbert mashup for wicket ;) ** Martin 2010/1/8 Loritsch, Berin C. berin.lorit...@gd-ais.com: But why choose an inferior technology just because of its adoption numbers? The pointy haired bosses that do this believe in their heart of hearts that if you choose the same technology everyone else is using that they can turn thinking developers for mindless drones. It has more to do with avoiding training costs and rational thought, and more to do with trying to turn software development into an assembly line process. Reality never fits this mold, but it doesn't stop the pointy haired boss from trying. In this respect they are eternal optimists. -Original Message- From: leo.erlands...@tyringe.com [mailto:leo.erlands...@tyringe.com] Sent: Friday, January 08, 2010 4:09 AM To: users@wicket.apache.org Subject: Re: Help with Wicket Adoption Numbers Hi, We also had the same consideration when we chose Wicket. But why choose an inferior technology just because of it's Adoption Numbers? Also, Wicket is becoming more and more popular as people see the light :) Check out Jobs Trends (Relative Growth) here (JSF vs Struts vs Wicket): http://www.indeed.com/jobtrends?q=Struts%2C+JSF%2C+Wicketl=relative=1 We have a couple of hundred customers and so far the feedback is great both from our Developers and our Software Architects. Customers like that the GUIs are faster due to the simplicity of Ajax Adoption in Wicket. I also know that several large privately held companies in Sweden are using Wicket, as well as large Government Agencies (e.g. the Swedish Immigration Office). Sincerely yours Leo Erlandsson - 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: Wicket session not threadsafe?
There has been a session leak somewhere in 1.3 iirc. This has to do with the thread locals that store Session, RequestCycle and Application during a request not being removed correctly. Martijn On Fri, Jan 8, 2010 at 2:38 PM, allgo soumya_...@yahoo.co.in wrote: ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.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 -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4
RE: Wicket session not threadsafe?
Essentially your response headers should have the following headers: Cache-Control: no-cache, no-store Pragma: no-cache For more details on HTTP response headers and cache controls see this page: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html Not all proxy servers are documented, unfortunately. If your system lives in a DMZ (which it sounds like it might), then the proxy server might be within your ISP. -Original Message- From: allgo [mailto:soumya_...@yahoo.co.in] Sent: Friday, January 08, 2010 8:44 AM To: users@wicket.apache.org Subject: RE: Wicket session not threadsafe? Hi Berin, No the users are all from different companies and no way there woudl be caching of their side. User A belongs to a client X say working in New York , while User B may be of client Y working in texas. It doesnt happen in test environment. but then that is not a multi-user environment in true sense of teh word. As hardly 3-4 people test it and we never got into that situation. For live however there are 500+ users using it everyday. no-cache entry? I am bit sketchy on this one. Can you give an example? Thanks for ur help. Loritsch, Berin C. wrote: The session object is bound to the HttpSession, so it is as safe as Tomcat or whatever servlet container is running your application. Here are some things to consider that have bit me in the butt, and have nothing to do with your local setup: * Is that happening locally in your test environment? * Does your client have caching proxies? (do they even know?) * Do your response headers have the no-cache entries? What might be happening is the first person to log in through the caching proxy gets their information cached by the proxy. The second person comes in and sees it. Typically the problem has to do with poorly configured proxy servers and they don't properly distinguish the pages with the cache control headers you supply. The only way around it is to turn off client caching completely. -Original Message- From: Soumya [mailto:soumya_...@yahoo.co.in] Sent: Friday, January 08, 2010 6:18 AM To: users@wicket.apache.org Subject: Wicket session not threadsafe? Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27076126 .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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Google analytics on home page slowing down access
Just an FYI, the call to google-analytics on the Wicket home page is causing the site to crawl as I have to wait for the connection to time out before I see anything (at least 30s). That is because the call is in the header, and it should be placed at the bottom of the body section to avoid this problem. Most browsers will be able to display the page as it is loading resources in the order they are declared. For things like google analytics and populating ads, it's best to incorporate those javascript goodies after the page is rendered. Example: Move the following snippet: html head !-- ... -- SCRIPT type=text/javascript _uacct = UA-2350632-1; urchinTracker(); /SCRIPT !-- ... -- /head /html To the following location: html body !-- ... -- SCRIPT type=text/javascript _uacct = UA-2350632-1; urchinTracker(); /SCRIPT /body /html
Re: Wicket session not threadsafe?
1.3.4 fixed this issue From the release notes [1]: * cross session leakage due to a dangling thread local in exceptional circumstances * memory leak in localizer (WICKET-1667) Martijn [1] http://wicket.apache.org/news.html#News-ApacheWicket1.3.4released%21 On Fri, Jan 8, 2010 at 2:56 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: There has been a session leak somewhere in 1.3 iirc. This has to do with the thread locals that store Session, RequestCycle and Application during a request not being removed correctly. Martijn On Fri, Jan 8, 2010 at 2:38 PM, allgo soumya_...@yahoo.co.in wrote: ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://old.nabble.com/Wicket-session-not-threadsafe--tp27074491p27075050.html Sent from the Wicket - User mailing list archive at Nabble.com. - To
Re: Wicket session not threadsafe?
the fix was a by-product of this issue: https://issues.apache.org/jira/browse/WICKET-1409 So yes, upgrading to 1.3.4 or newer will fix your issue. Go convince your management and tell them that it helps to keep up-to-date with open source products because we tend to fix things (at no cost for that matter!) Martijn On Fri, Jan 8, 2010 at 3:17 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: 1.3.4 fixed this issue From the release notes [1]: * cross session leakage due to a dangling thread local in exceptional circumstances * memory leak in localizer (WICKET-1667) Martijn [1] http://wicket.apache.org/news.html#News-ApacheWicket1.3.4released%21 On Fri, Jan 8, 2010 at 2:56 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: There has been a session leak somewhere in 1.3 iirc. This has to do with the thread locals that store Session, RequestCycle and Application during a request not being removed correctly. Martijn On Fri, Jan 8, 2010 at 2:38 PM, allgo soumya_...@yahoo.co.in wrote: ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4
Re: Wicket session not threadsafe?
Thanks a Ton Martijn and Berin! I will soon try an upgrade to 1.3.4 and try it out. Once again my sincere thanks to you all for your speedy help! Martijn Dashorst wrote: the fix was a by-product of this issue: https://issues.apache.org/jira/browse/WICKET-1409 So yes, upgrading to 1.3.4 or newer will fix your issue. Go convince your management and tell them that it helps to keep up-to-date with open source products because we tend to fix things (at no cost for that matter!) Martijn On Fri, Jan 8, 2010 at 3:17 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: 1.3.4 fixed this issue From the release notes [1]: * cross session leakage due to a dangling thread local in exceptional circumstances * memory leak in localizer (WICKET-1667) Martijn [1] http://wicket.apache.org/news.html#News-ApacheWicket1.3.4released%21 On Fri, Jan 8, 2010 at 2:56 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: There has been a session leak somewhere in 1.3 iirc. This has to do with the thread locals that store Session, RequestCycle and Application during a request not being removed correctly. Martijn On Fri, Jan 8, 2010 at 2:38 PM, allgo soumya_...@yahoo.co.in wrote: ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting mixed up between users. Please can someone lead me to the route cause of the issue? Thanks in advance! SSP The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/ -- Become a Wicket expert, learn from the
RE: Help with Wicket Adoption Numbers
Leo, I actually persuaded my then pointy haired boss to go with Wicket by putting together a side-by-side comparison of techniques required for creating JSF, Struts and Wicket-based applications. It was obvious that the Wicket approach was just plain out cleaner, and would save money in medium-to-long run. As they say, it's just HTML and Java -- it makes it fun being a mindless drone :-P Loritsch, Berin C. wrote: The pointy haired bosses that do this believe in their heart of hearts that if you choose the same technology everyone else is using that they can turn thinking developers for mindless drones. It has more to do with avoiding training costs and rational thought, and more to do with trying to turn software development into an assembly line process. -- View this message in context: http://old.nabble.com/Help-with-Wicket-Adoption-Numbers-tp27069702p27077379.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
Re: Wicket session not threadsafe?
On Fri, 2010-01-08 at 15:21 +0100, Martijn Dashorst wrote: the fix was a by-product of this issue: https://issues.apache.org/jira/browse/WICKET-1409 So yes, upgrading to 1.3.4 or newer will fix your issue. Go convince your management and tell them that it helps to keep up-to-date with open source products because we tend to fix things (at no cost for that matter!) While I agree with you I (and my management) also think that you don't have to be up-to-date unless you need a fix or a new feature otherwise you have to do extensive testing or you may encounter a newly introduced bug(s) Martijn On Fri, Jan 8, 2010 at 3:17 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: 1.3.4 fixed this issue From the release notes [1]: * cross session leakage due to a dangling thread local in exceptional circumstances * memory leak in localizer (WICKET-1667) Martijn [1] http://wicket.apache.org/news.html#News-ApacheWicket1.3.4released%21 On Fri, Jan 8, 2010 at 2:56 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: There has been a session leak somewhere in 1.3 iirc. This has to do with the thread locals that store Session, RequestCycle and Application during a request not being removed correctly. Martijn On Fri, Jan 8, 2010 at 2:38 PM, allgo soumya_...@yahoo.co.in wrote: ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account = accountDao.getAccount(username, password) MyAppSession session = (MyAppSession )getSession(); session.setAccount(account); setResponsePage(Home.class); So effectively I fetch the accout object using hibernate and store it in wicket session. But I am not sure how these account objects are getting
RE: Help with Wicket Adoption Numbers
Lester, While I can't show actual numbers that speak to adoption rate, we struggled with the same question. In the end we decided that it made sense and in the past 5 months have developed and deployed a web application for one of our clients and are 1.5 months into development for another client. Unfortunately the deployed application is not available to the public. It is a medical device sales/manufacturing tool for sales reps and named customers. The application that is under development is a e-commerce site with a custom product configuration tool that will be ready for deployment in the late March timeframe. The application will be heavily based on AJAX and use JQuery. The reason we wanted to use Wicket was because of the great AJAX support. We built a similar application for another client a few years ago using servlets/jsp, json, rest. The speed of development with Wicket is unbelievable. What took many weeks with the old architecture, we were able to accomplish in less than half that time. Also the code is much cleaner. Feel free to ping me if you need any more information. Jeff -Original Message- From: Lester Chua [mailto:cicowic...@gmail.com] Sent: Thursday, January 07, 2010 7:44 PM To: users@wicket.apache.org Subject: Help with Wicket Adoption Numbers Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - 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: Help with Wicket Adoption Numbers
Have you considered Google Web Toolkit (GWT)? J.D. -Original Message- From: Lester Chua [mailto:cicowic...@gmail.com] Sent: Thursday, January 07, 2010 5:44 PM To: users@wicket.apache.org Subject: Help with Wicket Adoption Numbers Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - 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: Wicket session not threadsafe?
Why not upgrade to 1.3.7? AFAIK there shouldn't be any differences in API or functionality between 1.3.4 and 1.3.7, so you might as well benefit from the other bugfixes as well. It's only if you should decide to upgrade to the 1.4 releases, that you will have to do some coding. (And even that should be rather limited) 2010/1/8 allgo soumya_...@yahoo.co.in Thanks a Ton Martijn and Berin! I will soon try an upgrade to 1.3.4 and try it out. Once again my sincere thanks to you all for your speedy help! Martijn Dashorst wrote: the fix was a by-product of this issue: https://issues.apache.org/jira/browse/WICKET-1409 So yes, upgrading to 1.3.4 or newer will fix your issue. Go convince your management and tell them that it helps to keep up-to-date with open source products because we tend to fix things (at no cost for that matter!) Martijn On Fri, Jan 8, 2010 at 3:17 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: 1.3.4 fixed this issue From the release notes [1]: * cross session leakage due to a dangling thread local in exceptional circumstances * memory leak in localizer (WICKET-1667) Martijn [1] http://wicket.apache.org/news.html#News-ApacheWicket1.3.4released%21 On Fri, Jan 8, 2010 at 2:56 PM, Martijn Dashorst martijn.dasho...@gmail.com wrote: There has been a session leak somewhere in 1.3 iirc. This has to do with the thread locals that store Session, RequestCycle and Application during a request not being removed correctly. Martijn On Fri, Jan 8, 2010 at 2:38 PM, allgo soumya_...@yahoo.co.in wrote: ok will do. But just a question to the experts - have you heard of this issue before? I went through the links below http://old.nabble.com/Storing-user-entity-in-session--tt22113666.html#a22113666 http://old.nabble.com/Wicket-Session-and-threading-tt14595666.html#a14599963 and apparently storing hibernate session object in wicket session was causing similar issues. Am doing the same and could this be one possible reason. I will try an upgrade, but unfortunately as I told I had tried for long to replicate this is dev but in vain. Only way could be to release in Live and test. But that would need quite a bit of convincing of my superiors (which is a bit tricky for a junior developer like me - the application had been coded and released 2 yrs back and no upgrade doen since those developers left !! :-) ). But worth a shot. If it is a hibernate issue I can store the account Id instead of teh Account object itself in wicket session and do a minor release. I will try an upgrade for 1.3.7 in the mean time in dev and see if I need any code / API changes. Regards, Soumya Martijn Dashorst wrote: Seriously... *BETA*? upgrade and then come back if things are still wrong. Martijn On Fri, Jan 8, 2010 at 1:21 PM, allgo soumya_...@yahoo.co.in wrote: 1.3.0-beta3 actually. Copied it from the Manifest file Martijn Dashorst wrote: 1.3.0? Martijn On Fri, Jan 8, 2010 at 1:12 PM, allgo soumya_...@yahoo.co.in wrote: Hi, The wicket version is 1.3. Sorry should have mentioned that. As such the User A, after he logs on is getting assigned the Account object of User B. And after soem logs we can see that User B had logged on a while before. Hence that Accoutn object was definitely fetched a whiel before. I did see a few threads which say Hibernate may eb a culprit but am not sure thats the case here. Please do let me know if you need any more info. Thanks, SSP Martijn Dashorst wrote: A wicket version number would be helpful... Martijn On Fri, Jan 8, 2010 at 12:17 PM, Soumya soumya_...@yahoo.co.in wrote: Hi all, I am fairly a newbie in wicket and would appreciate your help! I have a wicket application which are used on Live by more than 500 users. Now the problem which has arisen is - say User A logs on - he is able to view details of User B. It has happened for different users and I am trying to dig the real reason. Here is my code details - 1) I use Hibernate to fetch 'Account' objects from backend passing on the username/password. 2) I use MyAppSession extends WebSession { private Account account; public InboundSession(Request request) { super(request); } public void setAccount(Account account) { this.account = account; } public Account getAccount() { return account; } public boolean isUserLoggedIn() { return account !=null; } } So effectively I check if the Account object in session is null or not and accordingly decide whether a user is logged in or not. 2) In Login class I pass on the username/password to HibernateAccountDao and fetch the Account object. Account account =
Re: DiskPageStore file increasing to max size by only refreshing a HomePage
no just the opposite bookmarkable url will create a new page (which can be state full or stateless) On Fri, Jan 8, 2010 at 14:09, Loritsch, Berin C. berin.lorit...@gd-ais.comwrote: It's bookmarked pages that avoid new page creation isn't it? -Original Message- From: Matej Knopp [mailto:matej.kn...@gmail.com] Sent: Thursday, January 07, 2010 3:55 PM To: users@wicket.apache.org Subject: Re: DiskPageStore file increasing to max size by only refreshing a HomePage SetVersioned(false) does not help with new page instances being created. -Matej On Thu, Jan 7, 2010 at 9:46 PM, Wilhelmsen Tor Iver toriv...@arrive.no wrote: about unversioned, i have just done a quick test on wicket-examples helloworld, adding serialVersionUID (not informed in the examples) and the result is the same: pagestore file increasing to the infinite (max size of course :) I meant Wicket's setVersioned(false); the serialVersionUID is just for binary serialization, as long as the fields do not change the computed value the VM generates for you should be the same. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Handling NULL values in a DropDownChoice
I'm using a DropDownChoice to select one of a number of items loaded from my DAO: DropDownChoiceAuditTrain train_drop_down = new DropDownChoiceAuditTrain(new-train, new_audit_train, new DetachableAuditTrainsModel(this.train_dao.getList())); This works fine. But my the property I'm setting is nullable; that is, it accepts NULL values. So I'd like to add an item to the beginning of the list entitled No Audit Train. I've tried a few ways, but all seem to get dirtier and kludgier the farther down the rabbit hole I dig. For instance, I've tried modifying my DAO to prepend the list with NULL, then use a custom ChoiceRenderer to catch this and format it properly. But then my DetachableLoadable model needs to be able to catch and reload this NULL value. Things get out of hand quickly. Is there a standard way to solve this problem? Thanks, Norman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to clear validation error
Thanks for your help but I don't understand. I even got the source code for http://www.wicket-library.com/wicket-examples/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignInand when I run this in my environment I have the same issue I have with my code. Once I get a validation error onSubmit is never called even after the input error is fixed. This works fine when running at www.wicket-library.com. What should I do in the onError method to correct this situation? Sorry to be so lame and thanks for your help.
Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?
I assume you're actually talking about stubbing rather then mocking. Mock frameworks belong more in unit testing then in integration testing. If you are in fact talking about stubs then Ilja is right, just use a different applicationContext to inject the stubbed version of your validation service. Hi Liam, I recommend you read up on the Spring TestContext framework. (See the relevent section in your Spring Reference) Basically you will have to: 1) create a second applicationContext which only contains your stubbed version of the service. (With the same beanname as the real service) 2) Add the following annotations to your integration test (If it uses the TestContext framework) @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={/applicationContext.xml, /applicationContext-test.xml}) This way your test will used the stubbed version and your normal code will use the real version. If you were on the other hand talking about unit tests and mock objects then none of the above applies. :o) Kind regards, Stijn
Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?
Hmmm, I seem to have inserted that Hi Liam in entirely wrong place! Hope it doesn't distract you from the content of the message though ;o) 2010/1/8 Stijn Maller stijn.mal...@gmail.com I assume you're actually talking about stubbing rather then mocking. Mock frameworks belong more in unit testing then in integration testing. If you are in fact talking about stubs then Ilja is right, just use a different applicationContext to inject the stubbed version of your validation service. Hi Liam, I recommend you read up on the Spring TestContext framework. (See the relevent section in your Spring Reference) Basically you will have to: 1) create a second applicationContext which only contains your stubbed version of the service. (With the same beanname as the real service) 2) Add the following annotations to your integration test (If it uses the TestContext framework) @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={/applicationContext.xml, /applicationContext-test.xml}) This way your test will used the stubbed version and your normal code will use the real version. If you were on the other hand talking about unit tests and mock objects then none of the above applies. :o) Kind regards, Stijn
autologin redirect for https cookie and go back
Hi, I'd like to create automatic login with the following setup: - The auto-login key is stored in a secure cookie issued only over https. - I have created a separate page for this, it can read (a do authentication) or update the cookie (on form login), and it is sending the cookie only over https. - Most of the things the users will land on are http The HttpsRequestCycleProcessor gives a great job to achieve most of that, however I'm struggling with the autologin, because I'd like to do an initial redirect on session create. I can do a redirect to the cookie page, it will be https, it can send the cookie, however I do not know how to redirect back to the original page. I have no page nor pageClass information, because the redirect happens in WebApplication.newSession(...) and at that time the request.getPage() is null. Any idea or example how this should work? I'm storing the cookie page's redirect information in the session as pageClass and PageParameters, and these are populated manually, as the origin is well known. Thanks, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Handling NULL values in a DropDownChoice
http://wicket.apache.org/docs/1.4/org/apache/wicket/markup/html/form/AbstractSingleSelectChoice.html#setNullValid%28boolean%29 Kind regards, Stijn 2010/1/8 Norman Elton normel...@gmail.com I'm using a DropDownChoice to select one of a number of items loaded from my DAO: DropDownChoiceAuditTrain train_drop_down = new DropDownChoiceAuditTrain(new-train, new_audit_train, new DetachableAuditTrainsModel(this.train_dao.getList())); This works fine. But my the property I'm setting is nullable; that is, it accepts NULL values. So I'd like to add an item to the beginning of the list entitled No Audit Train. I've tried a few ways, but all seem to get dirtier and kludgier the farther down the rabbit hole I dig. For instance, I've tried modifying my DAO to prepend the list with NULL, then use a custom ChoiceRenderer to catch this and format it properly. But then my DetachableLoadable model needs to be able to catch and reload this NULL value. Things get out of hand quickly. Is there a standard way to solve this problem? Thanks, Norman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Avoid folder image in Tree table
Hello, Could anyone explain, how to avoid the folder image in the tree table?
Re: autologin redirect for https cookie and go back
It seems that I've buried myself too deep in the world of bookmarkable pages that I've forgotten the basics of http. Oh dear, such a simple answer, it must be Friday... :) Thanks, Istvan On Fri, Jan 8, 2010 at 5:30 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: but you do have the original url, so redirect back to that -igor On Fri, Jan 8, 2010 at 8:16 AM, Istvan Soos istvan.s...@gmail.com wrote: Hi, I'd like to create automatic login with the following setup: - The auto-login key is stored in a secure cookie issued only over https. - I have created a separate page for this, it can read (a do authentication) or update the cookie (on form login), and it is sending the cookie only over https. - Most of the things the users will land on are http The HttpsRequestCycleProcessor gives a great job to achieve most of that, however I'm struggling with the autologin, because I'd like to do an initial redirect on session create. I can do a redirect to the cookie page, it will be https, it can send the cookie, however I do not know how to redirect back to the original page. I have no page nor pageClass information, because the redirect happens in WebApplication.newSession(...) and at that time the request.getPage() is null. Any idea or example how this should work? I'm storing the cookie page's redirect information in the session as pageClass and PageParameters, and these are populated manually, as the origin is well known. Thanks, Istvan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
[whishlist] JS libraries
Hi This is a whishlist for js that should be integrated with wicket but arent.. So please go ahead and whish, I just might do an integration if it's something I need aswell :) regards Nino - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
component xxx:yyy:zzz not found on page
Our application periodically gets these errors, where wicket say the component could not be found. Take this example. 1) There is a delete link on the page. 2) The user clicks the delete button 3) They get the delete button component not found error. The intriguing part is that the item is actually deleted. This makes me think it could be a double click error. i.e. the item is delete and the js has another click call queued up but the page changes before it comes through. Is this possible? If so how do I prevent it? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [whishlist] JS libraries
I wish for the ExtJS integration to be more full-featured. The base is there and seems to be extensible but there are a lot of details missing (editable grids, row-editors etc). We started looking at it for a project but in the end moving the Wicket extjs project forward at the same time as our commercial project was just too much and we switched over the GWT/GXT specifically for the widget support .. :( John- On Fri, Jan 8, 2010 at 10:30 AM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi This is a whishlist for js that should be integrated with wicket but arent.. So please go ahead and whish, I just might do an integration if it's something I need aswell :) regards Nino - 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: [announce] Wicket Stuff Core - JavaEE Inject
Hi, 2010-01-08 12:38 keltezéssel, 谢非 írta: 1. Each EJB must be declared in web.xml In the example I'm not doing so, and it's still working under GF, but if you love to write XML files, then nothing stops you, to declare your EJBs in web.xml and use their names in the annotation. 2. @PersistenceUnit and @EJB cannot be used together Did you read the documentation? Check: http://wicketstuff.org/confluence/display/STUFFWIKI/HowToUsePersistenceUnitAnnotation Please note the warning: Beware! Due to classloading limitations for entities, you cannot mix the usage of @PersistenceUnit and @EJB do persist your entities. So you have to choose only one of these approaches in your application Don't think JavaEE Injection should be like this. If you know better, then share your knowledge with us and send me patches.. Thanks for the feedback anyway. Regards, Peter Date: Thu, 31 Dec 2009 00:51:28 +0100 From: majorpe...@sch.bme.hu Subject: [announce] Wicket Stuff Core - JavaEE Inject To: users@wicket.apache.org; d...@wicket.apache.org Hi all, I am proud to announce the semi-new JavaEE Inject project in Wicket Stuff Core, which was formerly known as wicket-contrib-javaee. The goal of the project: Make the @EJB, @Resource and @PersistenceUnit annotations available for Wicket users, to make the development more easier. This means, that when your components are instantiating, the annotated fields will be injected properly, so you can use them for whatever you want. The project itself didn't changed much, some javac warnings has been solved, but it has now a newer Example application too, which will demonstrate for you the usage of the annotation based injecting. The example is based on maven, so this would be also a good example on how to use enterprise applications with wicket and maven. So now, if you think, that this stuff is cool and want to use it, you only have to do the followings: - Add Wicket Stuff Repository to your maven repository list (if you've not already done so): repository idwicket-stuff/id layoutdefault/layout urlhttp://wicketstuff.org/maven/repository/url /repository - Add the JavaEE Inject dependency to your web module: dependency groupIdorg.wicketstuff/groupId artifactIdjavaee-inject/artifactId version1.4-SNAPSHOT/version /dependency - Follow the Wiki instructions at http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-javaee or try out for yourself the example application. - Profit Project Future: In the future, I would like to create a more up-to-date documentation for the project, better JavaDoc, and solve the JIRA issues too, and of course follow the modifications of the Wicket framework, so the project could work with the newest version always. Best Regards, Peter Major - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: component xxx:yyy:zzz not found on page
I your site is slow and the user manages to click the delete twice i could happen (I can see you write that too).. Put a veil over the button when it's clicked so the user cant click it twice.. 2010/1/8 Douglas Ferguson doug...@douglasferguson.us: Our application periodically gets these errors, where wicket say the component could not be found. Take this example. 1) There is a delete link on the page. 2) The user clicks the delete button 3) They get the delete button component not found error. The intriguing part is that the item is actually deleted. This makes me think it could be a double click error. i.e. the item is delete and the js has another click call queued up but the page changes before it comes through. Is this possible? If so how do I prevent it? - 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
Inject object to Wicket session by Servlet Filter , but : you can only locate or create sessions in the context of a request cycle
Hi all : I'm trying to inject something to the Wicket Session by a Generic Servlet Filter : public class UserFilter implements Filter { private UserDao UserDao; @Override public void init(FilterConfig config) throws ServletException { WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(config.getServletContext()); UserDao = (UserDao) wac.getBean(userDao); } @Override public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException { System.out.println(getClass().getName() + : UserDao = + UserDao); // ... blah... // do something , get user from cookie , authenticate cookie , and set it to Session // ... blah... MySession s = MySession.get(); // error occurs ! chain.doFilter(req, res); } It seems I cannot get Wicket's session outside wicket's request cycle. I searched and found WicketSessionFilter , but it seems it is for Retrieving objects from wicket's session , not for Filter to inject something to wicket's session... How to solve this problem ?
Re: [whishlist] JS libraries
Maybe some form validation library would come handy as it would save roundtrips for explicit things like empty form fields etc. Regards, Marek nino martinez wael wrote: Hi This is a whishlist for js that should be integrated with wicket but arent.. So please go ahead and whish, I just might do an integration if it's something I need aswell :) regards Nino - 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: [whishlist] JS libraries
YUI library, especially DataGrid and SplitPanes... nino martinez wael wrote: Hi This is a whishlist for js that should be integrated with wicket but arent.. So please go ahead and whish, I just might do an integration if it's something I need aswell :) regards Nino - 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
sort palette choices
is it possible to sort the list of choices in a palette when an item is added or removed from the list of selected choices? a code snippet would be great if anyone can help me out. mail2web.com Enhanced email for the mobile individual based on Microsoft® Exchange - http://link.mail2web.com/Personal/EnhancedEmail - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: WARN BorderBodyResolver
if you do this border.html wicket:border div wicket:id=foo wicket:body/ /div /wicket:border notice that the body is inside foo but you add children as border.add(bar) so you are creating a mismatch. you need to reparent the wicket:body tag. the wicket:body is represented by the getbodycontainer, so in your border constructor you need to do: foo.add(getbodycontainer()) -igor On Thu, Jan 7, 2010 at 12:31 AM, Anton Veretennikov anton.veretenni...@gmail.com wrote: Good day, I'm a bit confused, can't understand what i really need to do after getting this warning: Please consider to change your java code to something like: c.add(getBodyContainer()); for the component hierarchy to better reflect the markup hierarchy. For example, say that you have a border class in which you do: 'WebMarkupContainer div = new WebMarkupContainer(roundDiv); add(div);' you should now do 'add(div); div.add(getBodyContainer());'. Please fix this before Wicket 1.4 -- Tony - 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: Google analytics on home page slowing down access
Yea, that code should be at the bottom of the page. Ryan Gravener http://bit.ly/no_word_docs On Fri, Jan 8, 2010 at 9:06 AM, Loritsch, Berin C. berin.lorit...@gd-ais.com wrote: Just an FYI, the call to google-analytics on the Wicket home page is causing the site to crawl as I have to wait for the connection to time out before I see anything (at least 30s). That is because the call is in the header, and it should be placed at the bottom of the body section to avoid this problem. Most browsers will be able to display the page as it is loading resources in the order they are declared. For things like google analytics and populating ads, it's best to incorporate those javascript goodies after the page is rendered. Example: Move the following snippet: html head !-- ... -- SCRIPT type=text/javascript _uacct = UA-2350632-1; urchinTracker(); /SCRIPT !-- ... -- /head /html To the following location: html body !-- ... -- SCRIPT type=text/javascript _uacct = UA-2350632-1; urchinTracker(); /SCRIPT /body /html
Re: [whishlist] JS libraries
I belive there is somethat does this.. https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/client-and-server-validation/pom.xml . So Guys please check wicketstuff, sourceforge and googlecode so we dont duplicate projects.. If it's a imature project, no problem for requesting fresh blood :) regards Nino 2010/1/8 Marek Šabo ms...@buk.cvut.cz: Maybe some form validation library would come handy as it would save roundtrips for explicit things like empty form fields etc. Regards, Marek nino martinez wael wrote: Hi This is a whishlist for js that should be integrated with wicket but arent.. So please go ahead and whish, I just might do an integration if it's something I need aswell :) regards Nino - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Serious problem with swapping two items in a list (GAEJ/ JDO)
Hello, I've tried virtually everything. I'm looking for someone who has experience with GAEJ. Running site is at: http://data-compression.appspot.com/ Source code (need wicket-guice): http://code.google.com/p/data-compression/ Page address: http://data-compression.appspot.com/Administration/HomePagePanel
Re: Serious problem with swapping two items in a list (GAEJ/ JDO)
it usually helps to describe the problem but out of curiousity is this applicable? http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ -igor On Fri, Jan 8, 2010 at 2:42 PM, Piotr Tarsa piotr.ta...@gmail.com wrote: Hello, I've tried virtually everything. I'm looking for someone who has experience with GAEJ. Running site is at: http://data-compression.appspot.com/ Source code (need wicket-guice): http://code.google.com/p/data-compression/ Page address: http://data-compression.appspot.com/Administration/HomePagePanel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serious problem with swapping two items in a list (GAEJ/ JDO)
I want to swap two elements in a ListView. The problem is that I want to persist all changes on every request (with validation etc). List should be ordered by a special field (I called it position). I've taken various different approaches, always used ListView as a basis, not RepeatingView. I had different results but the list never worked properly. I'll look deeper at your article tommorow. 2010/1/8 Igor Vaynberg igor.vaynb...@gmail.com it usually helps to describe the problem but out of curiousity is this applicable? http://wicketinaction.com/2008/10/building-a-listeditor-form-component/ -igor On Fri, Jan 8, 2010 at 2:42 PM, Piotr Tarsa piotr.ta...@gmail.com wrote: Hello, I've tried virtually everything. I'm looking for someone who has experience with GAEJ. Running site is at: http://data-compression.appspot.com/ Source code (need wicket-guice): http://code.google.com/p/data-compression/ Page address: http://data-compression.appspot.com/Administration/HomePagePanel - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Ajax editable image @L
I am using Wicket to implement an image component which behaves similarly to AjaxEditableLabel. When the component is rendered it should look like a regular image img src=../. When the user clicks on the image, it should display a file upload component which will allow the user to replace the image. What is the easiest way to implement this behavior? Is there a component that already does this? If not, which Wicket class should I extend? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: [whishlist] JS libraries
Ernesto, jqGrid is indeed a handy component to be able to pull out of the toolbox and seems to be evolving nicely. In fact we have been integrating/using it with Wicket as part of our work on WiQuery [1], mainly for use on our own products/RD but possibly for client projects later, once we're sure jqGrid is production ready and well maintained, which so far seems to be the case. We're not yet ready to make this public, due to our other priorities, but if you'd like to get involved, drop me a line and we can have a chat. I expect we're not too far now from having something quite robust, and we could potentially make our existing demo pages public at some point, without too much effort, for people to get a feel for what can be done with jqGrid-as-a-Wicket/WiQuery component. Richard has been heavily involved in this integration, but he's also on other projects at the moment. However, I know he wants to expose some of the more compelling 3.6 features to Wicket (again, via WiQuery), like the new column selection and reordering etc, and there's a good chance that API may already be working and pretty well tested by Monday, especially if the weather brings London to a standstill this weekend. Knowing that projects like WiQuery exist and the access from Wicket it facilitates to such useful jQuery components (without writing any or much JavaScript), that can be relatively easily integrated, in a properly thought-out, well-defined and consistent way is also good ammunition for those of you on the thread re Wicket Adoption Rates aiming to convince your managers that Wicket is the right choice. We've found Wicket to be a very good choice on projects we and our clients have been lucky enough to use it on. Regards - Cemal jWeekend OO Java Technologies, Wicket Consulting, Development, Training http://jWeekend.com [1] http://code.google.com/p/wiquery/ 2010/1/8 Ernesto Reinaldo Barreiro reier...@gmail.com: If there is interest I can try to find some time and contribute an integration with http://www.trirand.com/blog/jqgrid/jqgrid.html http://www.trirand.com/blog/jqgrid/jqgrid.htmlErnesto On Fri, Jan 8, 2010 at 7:30 PM, nino martinez wael nino.martinez.w...@gmail.com wrote: Hi This is a whishlist for js that should be integrated with wicket but arent.. So please go ahead and whish, I just might do an integration if it's something I need aswell :) regards Nino - 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: how to clear validation error
I got the code for wicket 1.4.5 and stepped through to see what is causing the problem. Form.anyFormComponentError checks all the components on the form to see if 1) input is required and 2) is an error message exists for the component. It appears to me that once a message is set that it is never reset. I don't see how this could be working for others and not working for me. Any ideas? Is there some setup or configuration I'm missing that causes error messages to be cleared? On Fri, Jan 8, 2010 at 10:51 AM, Chuck Brinkman chasb1...@gmail.com wrote: Thanks for your help but I don't understand. I even got the source code for http://www.wicket-library.com/wicket-examples/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignInand when I run this in my environment I have the same issue I have with my code. Once I get a validation error onSubmit is never called even after the input error is fixed. This works fine when running at www.wicket-library.com. What should I do in the onError method to correct this situation? Sorry to be so lame and thanks for your help.
Re: how to clear validation error
The messages are kept in WebSession and WebSession has cleanupFeedbackMessages() but this is never called. Got it. The session I created had a empty cleanupFeedbackMessages() method. Thanks for reading along. On Fri, Jan 8, 2010 at 9:48 PM, Chuck Brinkman chasb1...@gmail.com wrote: I got the code for wicket 1.4.5 and stepped through to see what is causing the problem. Form.anyFormComponentError checks all the components on the form to see if 1) input is required and 2) is an error message exists for the component. It appears to me that once a message is set that it is never reset. I don't see how this could be working for others and not working for me. Any ideas? Is there some setup or configuration I'm missing that causes error messages to be cleared? On Fri, Jan 8, 2010 at 10:51 AM, Chuck Brinkman chasb1...@gmail.comwrote: Thanks for your help but I don't understand. I even got the source code for http://www.wicket-library.com/wicket-examples/signin/?wicket:bookmarkablePage=:org.apache.wicket.examples.signin.SignInand when I run this in my environment I have the same issue I have with my code. Once I get a validation error onSubmit is never called even after the input error is fixed. This works fine when running at www.wicket-library.com. What should I do in the onError method to correct this situation? Sorry to be so lame and thanks for your help.
Re: Wicket and Spring - mocking a particular bean when Wicket is in development mode?
Liam Clarke-Hutchinson-3 wrote: how can I provide this bean instead of the real bean, based on the value of WebApplication.getConfigurationType()? Take a look at http://wicketpagetest.sourceforge.net. Even though it was designed to support unit testing in mind, there is no reason why it can't be used in system tests. - -- Kent Tong Better way to unit test Wicket pages (http://wicketpagetest.sourceforge.net) Books on CXF, Axis2, Wicket, JSF (http://http://agileskills2.org) -- View this message in context: http://old.nabble.com/Wicket-and-Spring---mocking-a-particular-bean-when-Wicket-is-in--development-mode--tp27067859p27085762.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
Re: Help with Wicket Adoption Numbers
Hi Lester, If you think your boss will not accept the benefits, then why not show him the risk of sticking with a technology (Struts) that is in decline? Then suddenly he shoulders the burden of making the desision of taking ownership of a sinking ship. Regards Bernard On Fri, 08 Jan 2010 08:43:51 +0800, you wrote: Hi, I am facing a hurdle that need crossing in my final attempt to push Wicket for use in an organization. I have: 1) Prototyped a small size module 2) Did 2-3 presentations on the key features and advantages of wicket No one is disputing my claims about productivity and good OO code that was the result. BUT, the technology evaluation committee is NOT recommending Wicket because of. of all things. - Wicket's Low Adoption Rate Can I find any numbers to blow this away? My alternative is to accept the finding and work with Struts 2. Which will mean the stack will need to expand to DWR (for security). I REALLY don't want to go there, and am even considering not taking part in this project due to the high risk involved, only 9 months to introduce huge changes to a system that has lots of legacy problems (took about 3 years to build). I think a lot of those years were spent wrestling with the monster that is EJB 1.1. The only way I thought the project can even be on time is to scrap the entire presentation layer (aka Struts) and redo it in Wicket with 1 dedicated developer while the rest of the team work on killing the beast that is EJB 1.1 by refactoring the biz code. Sigh, my choices are stark. It's either to keep the job and plough ahead and probably fail spectacularly 9 months later or go hungry and explain to my wife why we need to spend less on the kid.. It's easy to blame the tech committee but they did help me find wicket by rejecting my initial proposal to build the new system on a (JQuery+JSON+REST) framework, which can be very productive as well, if not as clean as Wicket. Sorry for rambling so much. Is there any way I can demolish the silly low adoption rate argument (omg I still don't believe it can be so lame)? Lester - 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