true.. But the other issue with swapping components was strange 2010/9/22 Igor Vaynberg <[email protected]>: > no. what if its an integer field and the user entered "abc", how do > you expect to stick that into the model with validation turned off? > > -igor > > On Wed, Sep 22, 2010 at 6:33 AM, nino martinez wael > <[email protected]> wrote: >> But still there are something nagging me, if I >> setDefaultFormProcessing to false should'nt the ddc's model be >> updated? I can see that some of it are updated (the selected option in >> the ddc are correct), but apparently the model are still null. Very >> strange.. >> >> I guess I should provide log info ? >> >> 2010/9/22 nino martinez wael <[email protected]>: >>> Martin I owe you a beer or similar! >>> >>> 2010/9/22 Martin Grigorov <[email protected]>: >>>> Override onError() methods and add some debug. Maybe the validation didn't >>>> pass. >>>> >>>> On Wed, Sep 22, 2010 at 3:17 PM, nino martinez wael < >>>> [email protected]> wrote: >>>> >>>>> Hi >>>>> >>>>> Should'nt this work? My onsubmits are never triggered..? I've tried >>>>> various options, submitlink, onchangenotification on ddc. >>>>> >>>>> HTML: >>>>> <form wicket:id="configurationForm"> >>>>> <fieldset class="blueBorder"> >>>>> <legend>Wallboard Configuration</legend> >>>>> <fieldset class="blueBorder"> >>>>> <label>Name</label><input type="text" >>>>> wicket:id="newConfigurationName"></input><br /> >>>>> <label>Current Wallboard >>>>> configuration</label><select >>>>> wicket:id="selectedConfiguration"></select><br /> >>>>> </fieldset> >>>>> <input type="submit" value="add" class="submit" >>>>> wicket:id="add"/> >>>>> <input type="submit" value="select configuration" >>>>> class="submit" >>>>> wicket:id="select"/> >>>>> </fieldset> >>>>> </form> >>>>> >>>>> Java: >>>>> Form<DisplayContainer> displayContainerForm = new >>>>> Form<DisplayContainer>( >>>>> "configurationForm"); >>>>> displayContainerForm.add(new SubmitLink("add") { >>>>> �...@override >>>>> public void onSubmit() { >>>>> super.onSubmit(); >>>>> DisplayContainer displayContainer = new >>>>> DisplayContainer(); >>>>> >>>>> displayContainer.setId(newConfigurationName.getObject()); >>>>> // Make a validator which checks for >>>>> available names! >>>>> >>>>> coreService.persistDisplayContainer(displayContainer); >>>>> newConfigurationName.setObject(null); >>>>> >>>>> } >>>>> }); >>>>> displayContainerForm.add(new Button("select") { >>>>> >>>>> �...@override >>>>> public void onSubmit() { >>>>> super.onSubmit(); >>>>> } >>>>> }); >>>>> displayContainerForm.add(new >>>>> TextField<String>("newConfigurationName", >>>>> newConfigurationName).setRequired(true)); >>>>> add(displayContainerForm); >>>>> >>>>> IModel<ArrayList<DisplayContainer>> >>>>> availableDisplayContainers = new >>>>> AbstractReadOnlyModel<ArrayList<DisplayContainer>>() { >>>>> >>>>> �...@override >>>>> public ArrayList<DisplayContainer> getObject() { >>>>> return new ArrayList<DisplayContainer>( >>>>> >>>>> coreService.getDisplayContainers()); >>>>> } >>>>> }; >>>>> >>>>> IChoiceRenderer<DisplayContainer> displayContainerRenderer >>>>> = >>>>> new >>>>> IChoiceRenderer<DisplayContainer>() { >>>>> >>>>> �...@override >>>>> public Object getDisplayValue(DisplayContainer >>>>> displayContainer) { >>>>> >>>>> return displayContainer.getId(); >>>>> } >>>>> >>>>> �...@override >>>>> public String getIdValue(DisplayContainer >>>>> displayContainer, >>>>> int paramInt) { >>>>> return "" + paramInt; >>>>> } >>>>> }; >>>>> >>>>> DropDownChoice<DisplayContainer> >>>>> selectedDisplayContainerChoice = >>>>> new DropDownChoice<DisplayContainer>( >>>>> "selectedConfiguration", >>>>> selectedDisplayContainer, >>>>> availableDisplayContainers, >>>>> displayContainerRenderer); >>>>> >>>>> displayContainerForm.add(selectedDisplayContainerChoice); >>>>> } >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>>> >>>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
