Because I want the form to be updatet when something new is selected, should I do this another way?
Regards Nino -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eelco Hillenius Sent: 13. januar 2007 20:45 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] wicket presentation Those dropdowns should be updated without troubles. Why do you need the wantOnSelectionChangedNotifications there? Did you try removing the overrides of these methods? As far as I can see you're not doing anything useful with them. Eelco On 1/12/07, Nino Wael <[EMAIL PROTECTED]> wrote: > > > > > To my presentation im doing both a jsp version and a wicket version of a > very small applikation (might just be a form or two separate pages with > forms), btw would it be an idea to put the presentation with examples up > somewhere perhaps the wiki (when im done with it?)? > > > > > > However upon doing this I've stumbled into something I find odd, in the > below code the label called model are not updatet when it's model are > changed, I got the same problem with the dropdown, I fixed that by calling > the dropdown.modelchanged() method. But is it really necessary to call > modelchanged? I saw the ajax example which is almost identical to this does > not call modelchanged. > > > > > > > > public class IndexPage extends WebPage { > > > > public IndexPage() { > > > > FormModel > formModel = new FormModel(); > > > > final > PropertyModel carModel = new PropertyModel(formModel, "carModel"); > > final > PropertyModel carBrand = new PropertyModel(formModel, "carBrand"); > > > > IModel > carsFromBrand = new AbstractReadOnlyModel() { > > > > > public Object getObject(Component arg0) { > > > String selected = (String) > carBrand.getObject(null); > > > if (selected != null) { > > > > return Offline.getCarsFromBrand(selected); > > > } > > > return Collections.EMPTY_LIST; > > > } > > }; > > > > add(new > Label("brand", carBrand)); > > add(new > Label("model", carModel)); > > Form form = new > Form("theform"); > > add(form); > > final > DropDownChoice ddcCarModel = new DropDownChoice("carmodel", > > > carModel, carsFromBrand) { > > > protected boolean > wantOnSelectionChangedNotifications() { > > > return true; > > > } > > }; > > DropDownChoice > ddcCarbrand = new DropDownChoice("carbrand", carBrand, > > > Offline.getCarBrands()) { > > > protected boolean > wantOnSelectionChangedNotifications() { > > > return true; > > > } > > > > > protected void onSelectionChanged(Object arg0) { > > > // TODO Auto-generated method > stub > > > super.onSelectionChanged(arg0); > > > ddcCarModel.modelChanged(); > > > > > } > > }; > > > form.add(ddcCarbrand); > > > > > form.add(ddcCarModel); > > > > } > > > > } > > > > ________________________________ > > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Nino Wael > Sent: 4. januar 2007 14:16 > To: wicket-user@lists.sourceforge.net > Subject: [Wicket-user] wicket presentation > > > > > Hi im doing a wicket presentation for our consultants team, on this first > teaser I have about ten minutes. > > > > > > I plan to talk something about markup inheritance(the stuff with panels and > borders, which are very nice), and the POJO concept. > > > > Also wickets model concept and that you don't have to think about the > tedious tasks like printing html and setting the correct radio to be > selected. I guess that part will be a big eye opener for some of themJ > > > > Which features should I show? > > > > > > The crowd will maximum have knowledge of struts or simple jsp pages. > > > > > > > > Regards Nino > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user