Hi Martin

But the DDC doesn't have a constructor with PropertyModel[String](this,
"custName")
only a property model with the Object/Pojo as I was using.

Sorry, I'm new in the world of wicket and scala, and is difficult to find
good examples around
so I'm using this list a lot because I'm getting suport and feedback and I
don't want to give up
of my project.

thanks

Bera


2013/5/15 Martin Grigorov <[email protected]>

> Hi,
>
>
> On Wed, May 15, 2013 at 6:32 AM, Bruno Moura <[email protected]>
> wrote:
>
> > Hi
> >
> > For some weeks I'm trying to implement a simple combobox, DDC, and I'm
> > struggling with this. I asked  for some help several times but
> > unfortunately I didn't archive my goal because I'm failing sometimes to
> > understand  scala with wicket, I have a little background with them at
> the
> > moment.
> >
> > Anyway,  my code is showed bellow:
> >
> > *// ComboBox in a listView
> > item.add(new DropDownChoice("customerSelection", new
> > PropertyModel[Customer](customer, "name"), listCustomer, new
> > ChoiceRenderer[Customer]("name"))*
> >
> >
> DropDownChoice[Customer]
>
>
> >
> > If I create a variable, for example,* val custName*,  to receive the name
> > of the selected customer which functions I need to implement on the
> > creation of DDC object and how can I retrieve this value for the
> variable?
> >
>
> The way you already did it will set the selected value in customer's name.
> Check PropertyModel's javadoc to understand how it works.
>
> If you want to read/write the value in 'custName' then you have to use: new
> PropertyModel[String](this, "custName")
>
>
> > Thanks very much for help me.
> >
>
>
>
> --
> Martin Grigorov
> Wicket Training & Consulting
> http://jWeekend.com <http://jweekend.com/>
>

Reply via email to