Thanks for all the input. - Yes, I did override wantOnSelectionChangedNotifications() and it's set to false - No other Ajax is being fired - if I cancel the modal it closes. Once I press the submit button I can't even cancel the modal anymore as it just completely locks up.
Strange stuff happening, can't figure this one out. Michael -----Original Message----- From: Edvin Syse [mailto:[EMAIL PROTECTED] Sent: Monday, April 21, 2008 2:30 PM To: users@wicket.apache.org Subject: Re: PropertyModel of textfield not being updated > Strange, because it worked with updating the value of a radio that's > tied to a model in that same bean. Are you sure you didn't override wantOnSelectionChangedNotifications() and that the new value you saw came from the onSelectionChanged() method or something? Or maybe you got the value from the component's getInput() method? > I tried the AjaxFormSubmitBehavior but am getting the following AJAX > error: > > Channel busy - postponing If you look in the AJAX debug window, I think you should be able to see what other ajax-event fired and didn't return yet. Maybe that can give you a hint. Also, I see that you do: fooTextField.setOutputMarkupId(true); target.addComponent(fooTextField); in your onClose() method. The setOutputMarkupId(true) is redundant - as it has to have been set already some other place in your code, or there will be no way for Wicket to know what component to rerender in the markup, and you would have gotten an error. I mention it, because I think you might have misunderstood some parts of the process. -- Edvin > > This was the same error I was getting when using the AjaxButton's > default onSubmit() method. This is why I am using AjaxEventBehavior, > which seems to be the only one that actually triggers the event. Is > there another way to submit my form? > > So, I'm a bit in a bind here - btw, this happens both in Safari and > Firefox. > > Michael > > -----Original Message----- > From: Maurice Marrink [mailto:[EMAIL PROTECTED] > Sent: Monday, April 21, 2008 1:10 PM > To: users@wicket.apache.org > Subject: Re: PropertyModel of textfield not being updated > > But if you don't send the new values using this button then how is > wicket supposed to know there is a new value? > > Try using an AjaxFormSubmitBehavior instead of AjaxEventBehavior, it > will submit the form for you. > > Maurice > > On Mon, Apr 21, 2008 at 9:58 PM, Michael Mehrle <[EMAIL PROTECTED]> > wrote: >> Edvin - this is the save button's behavior. I'm using that instead of >> 'onSubmit()' because I needed to throttle the AJAX calls down a bit. >> Does that make sense? The entire form is way too long and complex to >> post it here. >> >> >> Michael >> >> >> -----Original Message----- >> From: Edvin Syse [mailto:[EMAIL PROTECTED] >> >> >> Sent: Monday, April 21, 2008 12:43 PM >> To: users@wicket.apache.org >> Subject: Re: PropertyModel of textfield not being updated >> >> I don't see you post anything here that would indicate that you're >> updating the model with data from the view.. >> >> What about saveButton and the form, can you supply that code as well? >> >> -- Edvin >> >> Michael Mehrle skrev: >> > Sure: >> > >> > saveButton.add(ajaxSaveBehavior = new >> > AjaxEventBehavior(JavaScriptUtil.CLICK) { >> > @Override >> > protected void onEvent(AjaxRequestTarget target) { >> > >> > modalWindow.setWindowClosedCallback(new >> > ModalWindow.WindowClosedCallback() { >> > public void >> > onClose(AjaxRequestTarget target) { >> > ... >> > >> > fooTextField.setOutputMarkupId(true); >> > >> > target.addComponent(fooTextField); >> > >> > modalWindow.close(target); >> > } >> > }); >> > >> > When I step in there with my debugger it seems that the frequency >> field >> > in eventSchedule (which is the texfield's bean), still is set to > the >> > default value. Meaning, the textfield doesn't receive the input. >> > >> > When I just add 'eventSchedule.setFrequency(10)' for instance - the > 10 >> > does show up when I pop up the modal again. So, the link between > the >> > model and the textfield is clearly working, but the model is not > being >> > updated when typing into the textfield. >> > >> > Michael >> > >> > -----Original Message----- >> > From: Edvin Syse [mailto:[EMAIL PROTECTED] >> > Sent: Monday, April 21, 2008 12:14 PM >> > To: users@wicket.apache.org >> > Subject: Re: PropertyModel of textfield not being updated >> > >> > What exactly are you doing via Ajax? Can you show some code? :) >> > >> > -- Edvin >> > >> > Michael Mehrle skrev: >> >> I got a textfield: >> >> >> >> >> >> >> >> add(fooTextField = new TextField("foo", new >> > PropertyModel(eventSchedule, >> >> "foo"), Integer.class)); >> >> >> >> >> >> >> >> eventSchedule is a bean that has a foo field which is an integer. >> >> >> >> >> >> >> >> For some reason it's never being updated, although the field picks > it >> > up >> >> when I programmatically call eventSchedule.setFoo(). >> >> >> >> >> >> >> >> I'm using this with AJAX and have all my component ids set and the >> >> textfield added to the target. >> >> >> >> >> >> >> >> Any ideas? >> >> >> >> >> >> >> >> >> > >> > > --------------------------------------------------------------------- >> > 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] >> >> > > --------------------------------------------------------------------- > 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]