Re: Maintenance of session in SpringWebApplication of Wicket
Typically with Wicket you don't store these kind of values in the session - most of the time when people ask how to do that on this list, it is because that's how they were forced to do it before. Store your data in your component and pass it to the next page (regular OO programming). That being said, you do it just like you store data anywhere else in Wicket... class MySession { private boolean foo; // setFoo and isFoo } // use this model for your drop down choice, etc... new PropertyModel(this.getSession(), foo) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 12:53 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Maintenance of session in SpringWebApplication of Wicket
Hi, I usesd this is in the other page where i use the property model new PropertyModel(this.getSession(), foo) but using this how can we print this value in the html page.or console. On Wed, Apr 29, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically with Wicket you don't store these kind of values in the session - most of the time when people ask how to do that on this list, it is because that's how they were forced to do it before. Store your data in your component and pass it to the next page (regular OO programming). That being said, you do it just like you store data anywhere else in Wicket... class MySession { private boolean foo; // setFoo and isFoo } // use this model for your drop down choice, etc... new PropertyModel(this.getSession(), foo) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 12:53 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards. Geeta Madhavi. K
Re: Maintenance of session in SpringWebApplication of Wicket
in your java: System.out.println(Foo: + this.getSession().isFoo()); new Label(label, new PropertyModel(this.getSession(), foo)); in your html: span wicket:id=labelthis will print the value of foo/span -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 1:14 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi, I usesd this is in the other page where i use the property model new PropertyModel(this.getSession(), foo) but using this how can we print this value in the html page.or console. On Wed, Apr 29, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically with Wicket you don't store these kind of values in the session - most of the time when people ask how to do that on this list, it is because that's how they were forced to do it before. Store your data in your component and pass it to the next page (regular OO programming). That being said, you do it just like you store data anywhere else in Wicket... class MySession { private boolean foo; // setFoo and isFoo } // use this model for your drop down choice, etc... new PropertyModel(this.getSession(), foo) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 12:53 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Maintenance of session in SpringWebApplication of Wicket
Hi.. I have too drop downs when i slect first value in the drop down the second drop down values changes m drop down code is as folows final DropDownChoice category = new DropDownChoice(category, new PropertyModel(this, selectedMake),categoryNames ); final DropDownChoice simulation = new DropDownChoice(simulation,new Model(),modelChoices); now when i used the session as you said System.out.println(session value in the drop down + this.getCategorysession().getCategoryNames()); it is giving null value in that my session class code follows as this way. public class CategorySession extends WebSession { private boolean Flag; private CategoryHome selectedMake; @SuppressWarnings(deprecation) public CategorySession(Application application, Request request) { super(application, request); } protected CategorySession(Request application) { super(application); } private static final long serialVersionUID = 1L; private CategoryHome categoryNames; private CategoryHome modelChoices; /** * @param categoryNames the categoryNames to set */ public void setCategoryNames(CategoryHome categoryNames) { this.categoryNames = categoryNames; } /** * @return the categoryNames */ public CategoryHome getCategoryNames() { return categoryNames; } /** * @param modelChoices the modelChoices to set */ public void setModelChoices(CategoryHome modelChoices) { this.modelChoices = modelChoices; } /** * @return the modelChoices */ public CategoryHome getModelChoices() { return modelChoices; } /** * @param selectedMake the selectedMake to set */ public void setSelectedMake(CategoryHome selectedMake) { this.selectedMake = selectedMake; } /** * @return the selectedMake */ public CategoryHome getSelectedMake() { return selectedMake; } /** * @param flag the flag to set */ public void setFlag(boolean flag) { Flag = flag; } /** * @return the flag */ public boolean isFlag() { return Flag; } } So know please help me how to get the both drop down values in the session. On Wed, Apr 29, 2009 at 11:46 AM, Jeremy Thomerson jer...@wickettraining.com wrote: in your java: System.out.println(Foo: + this.getSession().isFoo()); new Label(label, new PropertyModel(this.getSession(), foo)); in your html: span wicket:id=labelthis will print the value of foo/span -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 1:14 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi, I usesd this is in the other page where i use the property model new PropertyModel(this.getSession(), foo) but using this how can we print this value in the html page.or console. On Wed, Apr 29, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically with Wicket you don't store these kind of values in the session - most of the time when people ask how to do that on this list, it is because that's how they were forced to do it before. Store your data in your component and pass it to the next page (regular OO programming). That being said, you do it just like you store data anywhere else in Wicket... class MySession { private boolean foo; // setFoo and isFoo } // use this model for your drop down choice, etc... new PropertyModel(this.getSession(), foo) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 12:53 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards. Geeta Madhavi. K
RE: Maintenance of session in SpringWebApplication of Wicket
It's because you only used half the code I gave you. How is the dropdown storing it's data in the session? You give it an empty model to store it's data in. You need to give it the property model instead. You would be greatly benefited by reading all about models in Wicket in Action (or a training class). Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: Geeta Madhavi madhavi.ge...@gmail.com Sent: Wednesday, April 29, 2009 1:51 AM To: users@wicket.apache.org Subject: Re: Maintenance of session in SpringWebApplication of Wicket Hi.. I have too drop downs when i slect first value in the drop down the second drop down values changes m drop down code is as folows final DropDownChoice category = new DropDownChoice(category, new PropertyModel(this, selectedMake),categoryNames ); final DropDownChoice simulation = new DropDownChoice(simulation,new Model(),modelChoices); now when i used the session as you said System.out.println(session value in the drop down + this.getCategorysession().getCategoryNames()); it is giving null value in that my session class code follows as this way. public class CategorySession extends WebSession { private boolean Flag; private CategoryHome selectedMake; @SuppressWarnings(deprecation) public CategorySession(Application application, Request request) { super(application, request); } protected CategorySession(Request application) { super(application); } private static final long serialVersionUID = 1L; private CategoryHome categoryNames; private CategoryHome modelChoices; /** * @param categoryNames the categoryNames to set */ public void setCategoryNames(CategoryHome categoryNames) { this.categoryNames = categoryNames; } /** * @return the categoryNames */ public CategoryHome getCategoryNames() { return categoryNames; } /** * @param modelChoices the modelChoices to set */ public void setModelChoices(CategoryHome modelChoices) { this.modelChoices = modelChoices; } /** * @return the modelChoices */ public CategoryHome getModelChoices() { return modelChoices; } /** * @param selectedMake the selectedMake to set */ public void setSelectedMake(CategoryHome selectedMake) { this.selectedMake = selectedMake; } /** * @return the selectedMake */ public CategoryHome getSelectedMake() { return selectedMake; } /** * @param flag the flag to set */ public void setFlag(boolean flag) { Flag = flag; } /** * @return the flag */ public boolean isFlag() { return Flag; } } So know please help me how to get the both drop down values in the session. On Wed, Apr 29, 2009 at 11:46 AM, Jeremy Thomerson jer...@wickettraining.com wrote: in your java: System.out.println(Foo: + this.getSession().isFoo()); new Label(label, new PropertyModel(this.getSession(), foo)); in your html: span wicket:id=labelthis will print the value of foo/span -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 1:14 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi, I usesd this is in the other page where i use the property model new PropertyModel(this.getSession(), foo) but using this how can we print this value in the html page.or console. On Wed, Apr 29, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically with Wicket you don't store these kind of values in the session - most of the time when people ask how to do that on this list, it is because that's how they were forced to do it before. Store your data in your component and pass it to the next page (regular OO programming). That being said, you do it just like you store data anywhere else in Wicket... class MySession { private boolean foo; // setFoo and isFoo } // use this model for your drop down choice, etc... new PropertyModel(this.getSession(), foo) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 12:53 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards. Geeta Madhavi. K
Re: Maintenance of session in SpringWebApplication of Wicket
the wiki also has a great models page. -igor On Wed, Apr 29, 2009 at 12:04 AM, Jeremy Thomerson jer...@wickettraining.com wrote: It's because you only used half the code I gave you. How is the dropdown storing it's data in the session? You give it an empty model to store it's data in. You need to give it the property model instead. You would be greatly benefited by reading all about models in Wicket in Action (or a training class). Jeremy Thomerson http://www.wickettraining.com -- sent from a wireless device -Original Message- From: Geeta Madhavi madhavi.ge...@gmail.com Sent: Wednesday, April 29, 2009 1:51 AM To: users@wicket.apache.org Subject: Re: Maintenance of session in SpringWebApplication of Wicket Hi.. I have too drop downs when i slect first value in the drop down the second drop down values changes m drop down code is as folows final DropDownChoice category = new DropDownChoice(category, new PropertyModel(this, selectedMake),categoryNames ); final DropDownChoice simulation = new DropDownChoice(simulation,new Model(),modelChoices); now when i used the session as you said System.out.println(session value in the drop down + this.getCategorysession().getCategoryNames()); it is giving null value in that my session class code follows as this way. public class CategorySession extends WebSession { private boolean Flag; private CategoryHome selectedMake; �...@suppresswarnings(deprecation) public CategorySession(Application application, Request request) { super(application, request); } protected CategorySession(Request application) { super(application); } private static final long serialVersionUID = 1L; private CategoryHome categoryNames; private CategoryHome modelChoices; /** * @param categoryNames the categoryNames to set */ public void setCategoryNames(CategoryHome categoryNames) { this.categoryNames = categoryNames; } /** * @return the categoryNames */ public CategoryHome getCategoryNames() { return categoryNames; } /** * @param modelChoices the modelChoices to set */ public void setModelChoices(CategoryHome modelChoices) { this.modelChoices = modelChoices; } /** * @return the modelChoices */ public CategoryHome getModelChoices() { return modelChoices; } /** * @param selectedMake the selectedMake to set */ public void setSelectedMake(CategoryHome selectedMake) { this.selectedMake = selectedMake; } /** * @return the selectedMake */ public CategoryHome getSelectedMake() { return selectedMake; } /** * @param flag the flag to set */ public void setFlag(boolean flag) { Flag = flag; } /** * @return the flag */ public boolean isFlag() { return Flag; } } So know please help me how to get the both drop down values in the session. On Wed, Apr 29, 2009 at 11:46 AM, Jeremy Thomerson jer...@wickettraining.com wrote: in your java: System.out.println(Foo: + this.getSession().isFoo()); new Label(label, new PropertyModel(this.getSession(), foo)); in your html: span wicket:id=labelthis will print the value of foo/span -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 1:14 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi, I usesd this is in the other page where i use the property model new PropertyModel(this.getSession(), foo) but using this how can we print this value in the html page.or console. On Wed, Apr 29, 2009 at 11:36 AM, Jeremy Thomerson jer...@wickettraining.com wrote: Typically with Wicket you don't store these kind of values in the session - most of the time when people ask how to do that on this list, it is because that's how they were forced to do it before. Store your data in your component and pass it to the next page (regular OO programming). That being said, you do it just like you store data anywhere else in Wicket... class MySession { private boolean foo; // setFoo and isFoo } // use this model for your drop down choice, etc... new PropertyModel(this.getSession(), foo) -- Jeremy Thomerson http://www.wickettraining.com On Wed, Apr 29, 2009 at 12:53 AM, Geeta Madhavi madhavi.ge...@gmail.com wrote: Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K - To unsubscribe, e-mail:
Maintenance of session in SpringWebApplication of Wicket
Hi.. Can any one tell me how to maintain the session in wicket while using the springwebapplication. my requirement is i select values in drop down those values should be in session. and those values i should be able to print in the next page. So,Kindly some one help me in this i am newbie to this Wicket. -- Regards. Geeta Madhavi. K