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 <
[email protected]> 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="label">this will print the value of foo</span>
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Wed, Apr 29, 2009 at 1:14 AM, Geeta Madhavi <[email protected]>
> 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 <
> > [email protected]> 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 <
> [email protected]>
> >> 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: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >>
> >
> >
> > --
> > Regards.
> > Geeta Madhavi. K
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Regards.
Geeta Madhavi. K