wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sven Meier <s...@meiers.net>
Subject Re: how to use the palette component for multiple updates ?
Date Fri, 21 Sep 2012 06:11:16 GMT
Hi,

I'm not sure what you're up to with the drop down selects at the top, 
but I'd suggest:

form = new Form("form");
form.add(new ListChoice("instructor", instructor, instructors));
form.add(new ListChoice("course", course, courses));
form.add(new Button("assign") {
   onSubmit() {
     assignments.getObject().add(new Assignment(instructor.getObject(), 
course.getObject()));
   }
});
form.add(new ListView("assigments", assignments) {
   populateItem(ListItem item) {
     item.add(new Label("instructor", new PropertyModel(item.getModel(), 
"instructor.name")));
     item.add(new Label("course", new PropertyModel(item.getModel(), 
"course.name")));
   }
});
form.add(new Button("save") {
   onSubmit() {
     save(assignments.getObject());
   }
});

Hope this helps
Sven

On 09/20/2012 11:38 PM, grazia wrote:
> What wicket components would you recommend I use ?
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-use-the-palette-component-for-multiple-updates-tp4652201p4652203.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Mime
View raw message