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]

Reply via email to