I have a piece of Ajax code, attached to some field (let's call it
sourceField), which looks like this:
sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior()
{
protected void onUpdate(AjaxRequestTarget target)
{
target.addComponent(Field2);
}
}
As you can
im going to guess that the field is repainted with the values the
serverside thinks should be selected. if the values from the
clientside are not processed by the serverside before the ajax update
they will be different, and so the serverside state overrides the
clientside state.
-igor
On Tue,
On Tue, Dec 21, 2010 at 1:50 PM, eugenebalt eugeneb...@yahoo.com wrote:
I have a piece of Ajax code, attached to some field (let's call it
sourceField), which looks like this:
sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior()
{
protected void onUpdate(AjaxRequestTarget
Did the field2 have an initial value or did you set the value in your
browser and then let the ajax run?
Hielke
On 21 Dec 2010 20:51, eugenebalt eugeneb...@yahoo.com wrote:
I have a piece of Ajax code, attached to some field (let's call it
sourceField), which looks like this:
Awesome! I love the Wicket community. 11 minutes after the initial post,
there are three very helpful answers. Great work everyone!
On Tue, Dec 21, 2010 at 2:01 PM, Hielke Hoeve hielke.ho...@gmail.comwrote:
Did the field2 have an initial value or did you set the value in your
browser and
On Tue, Dec 21, 2010 at 5:50 PM, eugenebalt eugeneb...@yahoo.com wrote:
I have a piece of Ajax code, attached to some field (let's call it
sourceField), which looks like this:
sourceField.add(new AjaxFormChoiceComponentUpdatingBehavior()
{
protected void onUpdate(AjaxRequestTarget
Thanks for the fast replies, much appreciated, but what should I change in my
code? I'm still not clear.
Yes, the Field2 had some initial values with which it was constructed.
--
View this message in context:
s/AjaxFormChoiceComponentUpdatingBehavior/AjaxFormSubmittingBehavior/
so all values are propagated
-igor
On Tue, Dec 21, 2010 at 10:24 PM, eugenebalt eugeneb...@yahoo.com wrote:
Thanks for the fast replies, much appreciated, but what should I change in my
code? I'm still not clear.
Yes, the
But I can't use AjaxFormSubmittingBehavior (correct me if I'm wrong).
I need to make some changes to Field2 prior to any form submission, they
have to be made as soon as the sourceField has changed in any way.
I just don't want the Field2's values to get erased without me even doing
anything. I
It looks like I fixed it by adding new Ajax code to Field2.
The Field2's Ajax code does nothing, it just calls target.addComponent() on
itself: target.addComponent(Field2). This got rid of the values getting
erased.
So whenever you update something via Ajax, it has to be 2-way? You need to
10 matches
Mail list logo