Re: CompoundPropertyModel
Also I've noticed, that if i submit the form, then redeploy the WAR, and then refresh the submitted page, it throws the exception described above. And hitting Ctrl + F5 doesn't fix the issue - you are unable to submit the form anymore... The reason is that it (at least, Firefox 3) accumulates JSESSIONID cookies - I've seen even three of them simultaneously. After I delete these stale JSESSIONID cookies, I'm able to submit the form again. I'm not sure, what a decision could be. Maybe it is a well known bug. Just reporting it to you. 2009/11/28 Николай Кучумов kuchum...@gmail.com Today I've finally worked out the cause of the error - that was the NginX caching server which was somehow caching data. It was set up incorrectly. Today I've corrected my NginX configuration files, and everything works now, even with the bookmarks. 2009/11/20 Николай Кучумов kuchum...@gmail.com Hello, Alex, Jeremy and others. That's weird. Really weird. You know what? Seems that my browser was causing the error... If i open my site via a bookmark, it outputs the error. However if i open a new tab and type in the URL manually, the error doesn't appear. So, an advice to all of the Firefox users: don't bookmark the link to your web application! 2009/11/14 Alex Rass a...@itbsllc.com Kolya, 2 things: 1) If you still have the old setup: Try stopping server, deploying your stuff to it, starting server. I've had issues with redeploying at runtime (hot deploy) with Tomcat (which is what Glassfish is based on). This is where Jeremy's advice to run Jetty is a good idea. 2) Make sure that you refresh the form in your web browser before you try to enter data and submit. Wicket needs to do stuff to that form before you can submit it and if you keep same browser open between deployments, you are sending data back to wicket that it knows nothing about, so it blows up with pageexpired. The fact that you don't get serialization errors in the log (if it wasn't serialized) is b/c it didn't get that far yet, so problems are elsewhere. Hope this helps, - Alex. -Original Message- From: Николай Кучумов [mailto:kuchum...@gmail.com] Sent: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CompoundPropertyModel
To come up with a decision, I can propose you to catch this special exception, then count all JSESSIONID cookies, and, if there are several of them, delete the stale JSESSIONID cookies, and then try to run the form submission cycle again programmaticaly. 2009/11/29 Николай Кучумов kuchum...@gmail.com Also I've noticed, that if i submit the form, then redeploy the WAR, and then refresh the submitted page, it throws the exception described above. And hitting Ctrl + F5 doesn't fix the issue - you are unable to submit the form anymore... The reason is that it (at least, Firefox 3) accumulates JSESSIONID cookies - I've seen even three of them simultaneously. After I delete these stale JSESSIONID cookies, I'm able to submit the form again. I'm not sure, what a decision could be. Maybe it is a well known bug. Just reporting it to you. 2009/11/28 Николай Кучумов kuchum...@gmail.com Today I've finally worked out the cause of the error - that was the NginX caching server which was somehow caching data. It was set up incorrectly. Today I've corrected my NginX configuration files, and everything works now, even with the bookmarks. 2009/11/20 Николай Кучумов kuchum...@gmail.com Hello, Alex, Jeremy and others. That's weird. Really weird. You know what? Seems that my browser was causing the error... If i open my site via a bookmark, it outputs the error. However if i open a new tab and type in the URL manually, the error doesn't appear. So, an advice to all of the Firefox users: don't bookmark the link to your web application! 2009/11/14 Alex Rass a...@itbsllc.com Kolya, 2 things: 1) If you still have the old setup: Try stopping server, deploying your stuff to it, starting server. I've had issues with redeploying at runtime (hot deploy) with Tomcat (which is what Glassfish is based on). This is where Jeremy's advice to run Jetty is a good idea. 2) Make sure that you refresh the form in your web browser before you try to enter data and submit. Wicket needs to do stuff to that form before you can submit it and if you keep same browser open between deployments, you are sending data back to wicket that it knows nothing about, so it blows up with pageexpired. The fact that you don't get serialization errors in the log (if it wasn't serialized) is b/c it didn't get that far yet, so problems are elsewhere. Hope this helps, - Alex. -Original Message- From: Николай Кучумов [mailto:kuchum...@gmail.com] Sent: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Hide feedback when there are no messages
Hello. I'm currently developing a sign up form using Wicket. I've stylized the error feedback panel to make it look red, and now i see this red panel even when there are no messages at all. Can you advice me something to make the feedback panel div invisible when there are no messages? *You can get the idea by going to http://vostrets.ru/register/ - the error panel is empty but is still visible...
Re: CompoundPropertyModel
Today I've finally worked out the cause of the error - that was the NginX caching server which was somehow caching data. It was set up incorrectly. Today I've corrected my NginX configuration files, and everything works now, even with the bookmarks. 2009/11/20 Николай Кучумов kuchum...@gmail.com Hello, Alex, Jeremy and others. That's weird. Really weird. You know what? Seems that my browser was causing the error... If i open my site via a bookmark, it outputs the error. However if i open a new tab and type in the URL manually, the error doesn't appear. So, an advice to all of the Firefox users: don't bookmark the link to your web application! 2009/11/14 Alex Rass a...@itbsllc.com Kolya, 2 things: 1) If you still have the old setup: Try stopping server, deploying your stuff to it, starting server. I've had issues with redeploying at runtime (hot deploy) with Tomcat (which is what Glassfish is based on). This is where Jeremy's advice to run Jetty is a good idea. 2) Make sure that you refresh the form in your web browser before you try to enter data and submit. Wicket needs to do stuff to that form before you can submit it and if you keep same browser open between deployments, you are sending data back to wicket that it knows nothing about, so it blows up with pageexpired. The fact that you don't get serialization errors in the log (if it wasn't serialized) is b/c it didn't get that far yet, so problems are elsewhere. Hope this helps, - Alex. -Original Message- From: Николай Кучумов [mailto:kuchum...@gmail.com] Sent: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hide feedback when there are no messages
Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above (vostrets.ru/register/) - just open the page in Firefox, right click and View page source.
Re: Hide feedback when there are no messages
Oh, really. Thank you, Major Obvious : ) The class is feedbackPanel: ul wicket:id=feedbackul class=feedbackPanel I think i'll try to somehow subclass it tomorrow to get it output something like errorFeedbackPanel. 2009/11/28 Major Péter majorpe...@sch.bme.hu well, if you put in the class=error by deafult, of course it will show the div. ;) Delete from your markup the class=error, then see when your validation fails, what css class will be generated via wicket, and override that from your css file. Peter 2009-11-28 20:46 keltezéssel, Николай Кучумов írta: Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above ( vostrets.ru/register/) - just open the page in Firefox, right click and View page source. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Hide feedback when there are no messages
Thanks Peter, it works. 2009/11/28 Major Péter majorpe...@sch.bme.hu You're welcome. :) Why do you want to subclass it? Check out our solution: In your page add: add(new FeedbackPanel(pagemessages)); in html: span wicket:id=pagemessages id=pagemessages/span in css: #pagemessages ul li { list-style: none; background: #D9EBF9 url('../images/bckgNotice.gif') top left repeat-x; } #pagemessages ul li .feedbackPanelERROR, #pagemessages ul li .feedbackPanelINFO { display: block; padding: 6px 0 6px 36px; } #pagemessages ul li .feedbackPanelERROR { background: url('../images/iconError.gif') top left no-repeat; } #pagemessages ul li .feedbackPanelINFO { background: url('../images/iconInfo.gif') top left no-repeat; } #pagemessages ul { border: 1px solid #CBE5F7; width: 480px; margin-top: 15px; position: relative; right: -200px; } for example. Like this you can use FBP both for validations and simple messaging with user (via info(), error() and warning() functions of page). Peter 2009-11-28 21:33 keltezéssel, Николай Кучумов írta: Oh, really. Thank you, Major Obvious : ) The class is feedbackPanel: ul wicket:id=feedbackul class=feedbackPanel I think i'll try to somehow subclass it tomorrow to get it output something like errorFeedbackPanel. 2009/11/28 Major Péter majorpe...@sch.bme.hu well, if you put in the class=error by deafult, of course it will show the div. ;) Delete from your markup the class=error, then see when your validation fails, what css class will be generated via wicket, and override that from your css file. Peter 2009-11-28 20:46 keltezéssel, Николай Кучумов írta: Hello, Major. It looks like this: body wicket:extend div wicket:id=feedback class=error /div br/br/br/ form wicket:id=form /form /wicket:extend /body and the CSS is: .error { width: auto; margin-left: 25%; margin-right: 25%; border: 1px solid #fc908c; background-image: url('../pictures/icons/error_64x64.png'); background-color: #ffeceb; } You can view the bookmark on the link provided above ( vostrets.ru/register/) - just open the page in Firefox, right click and View page source. - 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: CompoundPropertyModel
Hello, Alex, Jeremy and others. That's weird. Really weird. You know what? Seems that my browser was causing the error... If i open my site via a bookmark, it outputs the error. However if i open a new tab and type in the URL manually, the error doesn't appear. So, an advice to all of the Firefox users: don't bookmark the link to your web application! 2009/11/14 Alex Rass a...@itbsllc.com Kolya, 2 things: 1) If you still have the old setup: Try stopping server, deploying your stuff to it, starting server. I've had issues with redeploying at runtime (hot deploy) with Tomcat (which is what Glassfish is based on). This is where Jeremy's advice to run Jetty is a good idea. 2) Make sure that you refresh the form in your web browser before you try to enter data and submit. Wicket needs to do stuff to that form before you can submit it and if you keep same browser open between deployments, you are sending data back to wicket that it knows nothing about, so it blows up with pageexpired. The fact that you don't get serialization errors in the log (if it wasn't serialized) is b/c it didn't get that far yet, so problems are elsewhere. Hope this helps, - Alex. -Original Message- From: Николай Кучумов [mailto:kuchum...@gmail.com] Sent: Saturday, November 14, 2009 9:33 AM To: users@wicket.apache.org Subject: Re: CompoundPropertyModel Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
CompoundPropertyModel
Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above?
Re: CompoundPropertyModel
Hi, Jeremy. No, the log contained only this error... But to be honest, although it didn't fix the error, your advice is still valuable, because not all of the classes were Serializable. And you know what? I think I'll reinstall my application server. I used Glassfish 2 before, and this time I tried Glassfish 3, but it appeared to be a bitch... It hangs oftenly and operates strangely... So maybe it somehow messes with the sessions... I'll install Glassfish 2 back then, when I have more time for this (maybe tomorrow), and then I'll post the results here. Thanks for your reply. On Sat, Nov 14, 2009 at 5:11 PM, Jeremy Thomerson jer...@wickettraining.com wrote: Do both Person and Credentials (and everything else Person holds on to) implement Serializable? Watch the logs to see if there are serialization errors. It's a problem of the page not being in the session - which means it either didn't make it there or the session is somehow gone. -- Jeremy Thomerson http://www.wickettraining.com On Sat, Nov 14, 2009 at 7:26 AM, Николай Кучумов kuchum...@gmail.com wrote: Hello. I have a Person class, describing a person, which has a member credentials of type Credentials (username/password). I tried to make a registration page in this way: Page { super(); Person person = [create a person with empty credentials]; Form form = new Form(form, new CompoundPropertyModel(person)); add(form); form.add(new TextField(familyName)); form.add(new TextField(givenName)); form.add(new TextField(credentials.userName)); form.add(new TextField(credentials.passWord)); // also add a submit button } And now when I push the Submit button, it outputs this error: org.apache.wicket.protocol.http.PageExpiredException: Cannot find the rendered page in session [pagemap=null,componentPath=0,versionNumber=0] I like the idea of compound object model, and I wouldn't like to deprive myself from using it just because of this strange error... Can you give me a hint on what have I done wrong in the code above?