Maurice Marrink wrote:
@Nino, i seem to remember some issues a while back
with modalwindows and forms and i needed a page to solve them. It's
possible this was caused by something special i needed to do, so
perhaps it also works without in other situations. I haven't used
modal window often enough to know for sure.
Ahh, thats why then...
@Korbinian, If you wrap the panel in a page you could delegate the
close behavior to the page by using a WindowClosedCallback. the panel
never needs to know it will be used in a modalwindow.
As for the multitude of markupfiles i think you could have a parent
panel with markup which contains a form and a normal button to submit
the form. the ajaxified panel then only needs to replace the button
with an ajaxbutton. it does not need a new markup.
I guess he could also solve this by having one constructor for ajax and
another for non ajax in his panel.. That would mean only one panel.. It
depends on what he wants..
Wicket in a nutshell letting OO concerns up to you:)
Maurice
On Tue, Apr 8, 2008 at 4:01 PM, Korbinian Bachl - whiskyworld
<[EMAIL PROTECTED]> wrote:
Hi Maurice,
the problem is that the panel needs to know about the modal window so it
can close/ react on it. And as I wrote to Nino, this additional extending
means a lot of code bleed - however, im not sure if its not just me who
didnt understand the usage of them right...
Im using the mw mainly for the ability to add additional lines in a
DropDownChoice etc.;
Best,
Korbinian
Maurice Marrink schrieb:
I think it would be even better to wrap the panel nino is talking
about in a new page for your modal window.
Maurice
On Tue, Apr 8, 2008 at 2:59 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
Korbinian Bachl - privat wrote:
Hello,
I've noticed that a Form inside a ModalWindow can't be submitted using
the
onSubmit function (and dislikes a standard submit button) but instead
requires an AjaxButton to call the action - why is this so? It makes my
life
currently somehow hard as I need 2 nearly identical forms - one with
AjaxButton (in case I want to use it in ModalWindow), one without
AjaxButton for non JS pages.
Because of the server round trip I think.. Why not have one panel,
which
contains your form and then two childs, which adds the submit part eg a
submit link etc...
Also I noticed a strage behaviour:
when using ModalWindow with a Page we have the pageConstructor() that
creates a whole new page (all models are fresh) when opening it, while
in
case you use it with a Panel/ Component the component is created just
once
and Models arent cleaned up in case you close the window and reopen it
(e.g.: a form you put in and submit and close window and reopen it using
initial link displays the submited values) - opposite behaviour compared
to
ModalWindow with Page where on each creation all is cleaned.
Best,
Korbinian
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
--
____________________________________
whiskyworld e.K.
http://www.whiskyworld.de
Ziegelfeld 6
94481 Grafenau/ Haus im Wald
Tel. 08555/ 406 320
Fax. 08555/ 406 319
Amtsgericht Passau: HRA 11760
Geschäftsführer: Ulrike Bachl
UstID: DE193152422
________________________________
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684