Re: strange behavior with DropDown
Martijn, This is what I was looking for: myButton.setDefaultFormProcessing(false); Thanks On Wed, Jul 23, 2008 at 3:42 PM, Martijn Dashorst < [EMAIL PROTECTED]> wrote: > override onError and set a breakpoint there. And add a feedbackpanel > to your page. > > Martijn > > On Wed, Jul 23, 2008 at 2:40 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > > One more thing, > > If I put a break point in the onSubmit of the Button, the debugger > doesn't > > even reach it if the configuration DropDown is not chosen. > > > > > > On Wed, Jul 23, 2008 at 3:34 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > > > >> Hello all, > >> I have a class that holds two DropDownChoice object. > >> We have a generic behavior: > >> According to one DropDown value, we set the list to the other. > >> Here's a code snippet of the 1st component: > >> private DropDownChoice createUniverseDropDown() { > >> IModel universesModel = getUniversesmodel(); > >> DropDownChoice uniDropDown = > >> new DropDownChoice("universeSelect", new > >> PropertyModel(this, "universeName"), > >> universesModel) { > >> private static final long serialVersionUID = 1L; > >> > >> @Override > >> protected boolean localizeDisplayValues() { > >> return true; > >> } > >> }; > >> uniDropDown.add(new > AjaxFormComponentUpdatingBehavior("onchange") { > >> private static final long serialVersionUID = 1L; > >> > >> @Override > >> protected void onUpdate(AjaxRequestTarget target) { > >> target.addComponent(configurationsDropDown); > >> } > >> }); > >> uniDropDown.setRequired(true); > >> return uniDropDown; > >> } > >> > >> configurationsDropDown is the other one. > >> > >> The situation: > >> We have a page and in that page there's a form with several components, > >> some buttons and the two DropDown from the special class (they have > getters > >> of course). > >> > >> The problem: > >> If the user chose a universe but did not choose a configuration (there's > >> still the 'choose one'), none of the buttons is submitted. > >> I have put confDropDown.setNullValid(false); but it did not help. > >> One of the buttons is CANCEL so I don't need any input and don't mind > what > >> are the values in the components. > >> > >> Is there any way of a walk through? > >> Please advise, > >> -- > >> Eyal Golan > >> [EMAIL PROTECTED] > >> > >> Visit: http://jvdrums.sourceforge.net/ > >> LinkedIn: http://www.linkedin.com/in/egolan74 > >> > >> P Save a tree. Please don't print this e-mail unless it's really > necessary > >> > > > > > > > > -- > > Eyal Golan > > [EMAIL PROTECTED] > > > > Visit: http://jvdrums.sourceforge.net/ > > LinkedIn: http://www.linkedin.com/in/egolan74 > > > > P Save a tree. Please don't print this e-mail unless it's really > necessary > > > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.3.4 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: strange behavior with DropDown
thanks, It really stopped at the onError. As I understand, and correct me if I'm wrong, I need to implement something in that method. Something like, check if the user pressed cancel, and if so, to continue to whatever I want. BTW, can I force the onSubmit of a button (my CANCEL button) even if there was an error? On Wed, Jul 23, 2008 at 3:42 PM, Martijn Dashorst < [EMAIL PROTECTED]> wrote: > override onError and set a breakpoint there. And add a feedbackpanel > to your page. > > Martijn > > On Wed, Jul 23, 2008 at 2:40 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > > One more thing, > > If I put a break point in the onSubmit of the Button, the debugger > doesn't > > even reach it if the configuration DropDown is not chosen. > > > > > > On Wed, Jul 23, 2008 at 3:34 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > > > >> Hello all, > >> I have a class that holds two DropDownChoice object. > >> We have a generic behavior: > >> According to one DropDown value, we set the list to the other. > >> Here's a code snippet of the 1st component: > >> private DropDownChoice createUniverseDropDown() { > >> IModel universesModel = getUniversesmodel(); > >> DropDownChoice uniDropDown = > >> new DropDownChoice("universeSelect", new > >> PropertyModel(this, "universeName"), > >> universesModel) { > >> private static final long serialVersionUID = 1L; > >> > >> @Override > >> protected boolean localizeDisplayValues() { > >> return true; > >> } > >> }; > >> uniDropDown.add(new > AjaxFormComponentUpdatingBehavior("onchange") { > >> private static final long serialVersionUID = 1L; > >> > >> @Override > >> protected void onUpdate(AjaxRequestTarget target) { > >> target.addComponent(configurationsDropDown); > >> } > >> }); > >> uniDropDown.setRequired(true); > >> return uniDropDown; > >> } > >> > >> configurationsDropDown is the other one. > >> > >> The situation: > >> We have a page and in that page there's a form with several components, > >> some buttons and the two DropDown from the special class (they have > getters > >> of course). > >> > >> The problem: > >> If the user chose a universe but did not choose a configuration (there's > >> still the 'choose one'), none of the buttons is submitted. > >> I have put confDropDown.setNullValid(false); but it did not help. > >> One of the buttons is CANCEL so I don't need any input and don't mind > what > >> are the values in the components. > >> > >> Is there any way of a walk through? > >> Please advise, > >> -- > >> Eyal Golan > >> [EMAIL PROTECTED] > >> > >> Visit: http://jvdrums.sourceforge.net/ > >> LinkedIn: http://www.linkedin.com/in/egolan74 > >> > >> P Save a tree. Please don't print this e-mail unless it's really > necessary > >> > > > > > > > > -- > > Eyal Golan > > [EMAIL PROTECTED] > > > > Visit: http://jvdrums.sourceforge.net/ > > LinkedIn: http://www.linkedin.com/in/egolan74 > > > > P Save a tree. Please don't print this e-mail unless it's really > necessary > > > > > > -- > Become a Wicket expert, learn from the best: http://wicketinaction.com > Apache Wicket 1.3.4 is released > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
Re: strange behavior with DropDown
override onError and set a breakpoint there. And add a feedbackpanel to your page. Martijn On Wed, Jul 23, 2008 at 2:40 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > One more thing, > If I put a break point in the onSubmit of the Button, the debugger doesn't > even reach it if the configuration DropDown is not chosen. > > > On Wed, Jul 23, 2008 at 3:34 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > >> Hello all, >> I have a class that holds two DropDownChoice object. >> We have a generic behavior: >> According to one DropDown value, we set the list to the other. >> Here's a code snippet of the 1st component: >> private DropDownChoice createUniverseDropDown() { >> IModel universesModel = getUniversesmodel(); >> DropDownChoice uniDropDown = >> new DropDownChoice("universeSelect", new >> PropertyModel(this, "universeName"), >> universesModel) { >> private static final long serialVersionUID = 1L; >> >> @Override >> protected boolean localizeDisplayValues() { >> return true; >> } >> }; >> uniDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") { >> private static final long serialVersionUID = 1L; >> >> @Override >> protected void onUpdate(AjaxRequestTarget target) { >> target.addComponent(configurationsDropDown); >> } >> }); >> uniDropDown.setRequired(true); >> return uniDropDown; >> } >> >> configurationsDropDown is the other one. >> >> The situation: >> We have a page and in that page there's a form with several components, >> some buttons and the two DropDown from the special class (they have getters >> of course). >> >> The problem: >> If the user chose a universe but did not choose a configuration (there's >> still the 'choose one'), none of the buttons is submitted. >> I have put confDropDown.setNullValid(false); but it did not help. >> One of the buttons is CANCEL so I don't need any input and don't mind what >> are the values in the components. >> >> Is there any way of a walk through? >> Please advise, >> -- >> Eyal Golan >> [EMAIL PROTECTED] >> >> Visit: http://jvdrums.sourceforge.net/ >> LinkedIn: http://www.linkedin.com/in/egolan74 >> >> P Save a tree. Please don't print this e-mail unless it's really necessary >> > > > > -- > Eyal Golan > [EMAIL PROTECTED] > > Visit: http://jvdrums.sourceforge.net/ > LinkedIn: http://www.linkedin.com/in/egolan74 > > P Save a tree. Please don't print this e-mail unless it's really necessary > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: strange behavior with DropDown
One more thing, If I put a break point in the onSubmit of the Button, the debugger doesn't even reach it if the configuration DropDown is not chosen. On Wed, Jul 23, 2008 at 3:34 PM, Eyal Golan <[EMAIL PROTECTED]> wrote: > Hello all, > I have a class that holds two DropDownChoice object. > We have a generic behavior: > According to one DropDown value, we set the list to the other. > Here's a code snippet of the 1st component: > private DropDownChoice createUniverseDropDown() { > IModel universesModel = getUniversesmodel(); > DropDownChoice uniDropDown = > new DropDownChoice("universeSelect", new > PropertyModel(this, "universeName"), > universesModel) { > private static final long serialVersionUID = 1L; > > @Override > protected boolean localizeDisplayValues() { > return true; > } > }; > uniDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") { > private static final long serialVersionUID = 1L; > > @Override > protected void onUpdate(AjaxRequestTarget target) { > target.addComponent(configurationsDropDown); > } > }); > uniDropDown.setRequired(true); > return uniDropDown; > } > > configurationsDropDown is the other one. > > The situation: > We have a page and in that page there's a form with several components, > some buttons and the two DropDown from the special class (they have getters > of course). > > The problem: > If the user chose a universe but did not choose a configuration (there's > still the 'choose one'), none of the buttons is submitted. > I have put confDropDown.setNullValid(false); but it did not help. > One of the buttons is CANCEL so I don't need any input and don't mind what > are the values in the components. > > Is there any way of a walk through? > Please advise, > -- > Eyal Golan > [EMAIL PROTECTED] > > Visit: http://jvdrums.sourceforge.net/ > LinkedIn: http://www.linkedin.com/in/egolan74 > > P Save a tree. Please don't print this e-mail unless it's really necessary > -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary
strange behavior with DropDown
Hello all, I have a class that holds two DropDownChoice object. We have a generic behavior: According to one DropDown value, we set the list to the other. Here's a code snippet of the 1st component: private DropDownChoice createUniverseDropDown() { IModel universesModel = getUniversesmodel(); DropDownChoice uniDropDown = new DropDownChoice("universeSelect", new PropertyModel(this, "universeName"), universesModel) { private static final long serialVersionUID = 1L; @Override protected boolean localizeDisplayValues() { return true; } }; uniDropDown.add(new AjaxFormComponentUpdatingBehavior("onchange") { private static final long serialVersionUID = 1L; @Override protected void onUpdate(AjaxRequestTarget target) { target.addComponent(configurationsDropDown); } }); uniDropDown.setRequired(true); return uniDropDown; } configurationsDropDown is the other one. The situation: We have a page and in that page there's a form with several components, some buttons and the two DropDown from the special class (they have getters of course). The problem: If the user chose a universe but did not choose a configuration (there's still the 'choose one'), none of the buttons is submitted. I have put confDropDown.setNullValid(false); but it did not help. One of the buttons is CANCEL so I don't need any input and don't mind what are the values in the components. Is there any way of a walk through? Please advise, -- Eyal Golan [EMAIL PROTECTED] Visit: http://jvdrums.sourceforge.net/ LinkedIn: http://www.linkedin.com/in/egolan74 P Save a tree. Please don't print this e-mail unless it's really necessary