Use ajax behavior, e.g., OnChangeAjaxBehavior

**
Martin

2013/4/9 Bruno Moura <[email protected]>:
> I need to update a model or object immediately after select
> a DropDownChoice item.
>
>
> Bellow is the code that I'm working:
>
> //
> ---------------------------------------------------------------------------------
>
>  add(new ListView[Company]("listCompanies", listData) {
>
>     override protected def onBeforeRender() {
>       //
>       // ...
>       super.onBeforeRender()
>     }
>
>     def populateItem(item: ListItem[Company]) = {
>       var company = item.getModelObject()
>
>       //...
>
>       val listClients: java.util.List[Client] = clientControler.listClients
>
>
>       item.add(new DropDownChoice("clientSelection", listClients,new
> ChoiceRenderer[Client]("name")))
>
> //
> ---------------------------------------------------------------------------------
>
> In the Listview with properties of Company Object,
> after choose a name property of the DropDownChoice, the model
> Company would be updated with the Client Name selected.
>
> How can I achieve this?
>
> Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to