Strange, because it worked with updating the value of a radio that's tied to a model in that same bean.
I tried the AjaxFormSubmitBehavior but am getting the following AJAX error: Channel busy - postponing 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: [email protected] 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: [email protected] > 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: [email protected] > > 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]
