Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Ajax Update failing because of model

$
0
0
I have a text-field component that has an
AjaxFormComponentUpdatingBehavior("onchange") behaviour attached. I've hived
it off into a separate component as I'm reusing it in various places across
my app.

Everything works fine most of the time, but I've discovered that on a
particular page it doesn't perform an Ajax update, it falls back to using a
regular update and I can't work out why.

As far as I can tell it appears to be linked to the model being supplied to
the component. In other places, I'm using a fairly standard model, it just
gets and sets a field on the model object. But in this implementation, it
takes the supplied value and uses it to update another part of the system -
so the getter always returns a null. If I comment this out and replace it
with a "standard" way of using a getter and setter then everything works
fine after that.

There are no errors being reported anywhere, nothing is changed except the
backing model. Is there some reason why this might cause an Ajax update to
fail and fall back on a regular update? I'm not even sure where to look now
to try and work out what might be going wrong.

Matt Pennington

Viewing all articles
Browse latest Browse all 5648

Trending Articles