I've got a question along these lines. I have an AjaxSubmitButton on a
ModalWindow, and I'd like and to trigger the expected behaviors.
Any suggestions on wiring this up? My first instinct is to add a behavior
to the form, or perhaps the encapsulating Page...
On 2/20/07, Igor Vaynberg <[EMAIL
i wouldnt disable default form processing. just leave form.onsubmit() empty
and put all that logic into buttons
-igor
On 2/20/07, Charlie Dobbie <[EMAIL PROTECTED]> wrote:
Hi Igor,
Yes, I saw your post on wicket-dev*. It would certainly make more
sense that way around in the code I'm curren
Hi Igor,
Yes, I saw your post on wicket-dev*. It would certainly make more
sense that way around in the code I'm currently playing with!
Ah, yes - I can disable default form processing on the button and call
the form's onSubmit logic directly - I'll give that a try. (Although
that would mean I
Hi Nathan,
Yes, I've seen you using that structure in various places in
Databinder! Using methods of that form, I've now managed to
completely dispose of the boolean "ajax" flag I was passing around,
and the code is much cleaner now than it was before.
Many thanks!
Charlie
On 2/15/07, Nathan
yes, that is also something i do not like. i think form.submit() should be
called before the button.onsubmit()
what i tend to do is to leave form.submit() unused and put all the logic
into button.onsubmit()
what do you mean no onerror method? ajaxsubmitbutton should have one afaik.
-igor
On 2
Hi Igor,
Thanks, that's very reassuring! I'm having a bit of fun with
Button.onSubmit being called before Form.onSubmit and I'm still not
entirely sure what to do about the lack of an onError method, but I'm
on the right track now.
Charlie.
On 2/15/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
You don't need to use the same object to factor out that code. Instead
of passing the same form object between pages, you could have a base
form class that adds the components you want, with a subclass for the
modal window. Sometimes it's handy to have methods like
protected Component newSubmit
yes there is a better way. you should handle it inside the button's onsubmit
not inside the form's onsubmit.
that way:
add(new Button() { onsubmit() { setresponsepage(..) isvisible(){...}});
add(new AjaxSubmitButton(onsubmit(target) { window.close(target); }
onerror(){...} isvisible() {..} }
-i
Hi Igor,
The processing of the submitted data is handled in the same way, but
the following page navigation must be different. If in a standard
request, I'll need to setResponsePage() to the next page, but an AJAX
request will just want to ModalWindow.close(). Error handling is also
going to dif
i thought you wanted to handle it the same way so why do you need to know if
the processing is ajax or regular request?
-igor
On 2/14/07, Charlie Dobbie <[EMAIL PROTECTED]> wrote:
Hi all,
In my Databinder-using application I have the requirement to
create/edit entities both within a standard
Hi all,
In my Databinder-using application I have the requirement to
create/edit entities both within a standard request cycle, and via
AJAX inside a Modal Window. In the interests of not duplicating code,
I would like to drive both these processes from the same Form object,
passing a boolean fro
11 matches
Mail list logo