Re: I need some help with this Ajax Dom stuff
Re: I need some help with this Ajax Dom stuff
- Subject: Re: I need some help with this Ajax Dom stuff
- From: Gustavo Adolfo Pizano <email@hidden>
- Date: Wed, 10 Jun 2009 15:41:13 +0200
Hello Mike it works like charms, thanks
I was trying to validate de data in the front end but somehow the
AjaxSubmitButton its going into the server anyway.
What im doing is setting a binding of onClick = "validateEntries";
and in that JS function im taking all the textFields and validating
that they are not null or length = 0;
but somehow it goes first to the server and perform the action
specified, and because I hadn't put any data well, the server crashes
before even validation on the front end.
I know im missing something, because if the function bind to the
onClick returns false the action of the AjaxSubmitButton should be
performed... no?
I was looking into the documentation, but I see it has no onSubmit
binding.. or does it?
Thanks
Gustavo
On Jun 9, 2009, at 7:13 PM, Mike Schrag wrote:
i'm not sure what the problem is? just surround the thing you want
to add items to in an AjaxUpdateContainer and when they click an
AjaxSubmitButton "add," you add another entry to the array, which
causes an extra set of fields to appear in the repetition when it
refreshes. The problem is if you want to be very compact with the
wire protocol and ONLY send the extra fields across -- that's a use
case we don't support.
On Jun 9, 2009, at 12:51 PM, Gustavo Adolfo Pizano wrote:
:S:S:S:S:S I wanna cry! .
so if I understood good. the WORepetition its gonna be on the top
of that bunch of code, then the AJaxUpdatecontainer, and inside all
those divs... and .... damn ... what about having all that inside
another woform, and sending the .... nono that wouldn't work
also.. .. mmmm..
let me digest this more..
thx
G
On Jun 9, 2009, at 6:21 PM, Mike Schrag wrote:
now I want to add another div pUnitsPart, in case there is one
or more info of the same kind, I was thinking int using DOM, to
create more span elements and use appenChild method of the
element allUnits. but I don't know how to handle with those
WOTextFields I have, they have a binding with their pair in
the.java, so I got lost here because I dunno how to create them
and make the binding...... :'( sniff sniff....
Im not expert in this stuff, but novice, so any help I can get
will be really appreciate it.
easiest way is to just wrap the whole thing in an update container
and put it in a repetition. this is a particular hard scenario for
wo+ajax to do, which is the dynamically growing repetition without
resending the whole table. i did some work on this a while back,
and it's possible to do, but it requires a lot more coordination
between the client and the server (because you have to inject the
html from the server into the dom vs just letting it replace), and
things can get weird because of element ids.
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden