Either way, if I wanted to override that functionality. What is a way to do so?
I am going to try adding the modal-override.js javascript
And then getting rid of the inner form:
Wicket.Window.getMarkup = ...
CustomModal extends ModalWindow
this.add(JavascriptPackageResource.getHeaderContribution(JAVASCRIPT));
With certain browsers, the way we are using browsers does not allow the submit.
Works with IE but not in Chrome or Firefox.
<form>
<modalWindow>
<submitButton />
</form>
-----Original Message-----
From: Pedro Santos [mailto:[email protected]]
Sent: Sunday, June 26, 2011 11:27 PM
To: [email protected]
Subject: Re: Override modal.js functionality because of issue with form inside
form
Hi Brown, submit a form inside a modal window should be fine, just make sure
you have an outer form higher in hierarchy. Nested forms inside a modal window
works nice even in old versions. It is important because it prevents invalid
markup like form tag inside form tag.
About improvements in modal window, it is already planned to Wicket 1.6.
On Sun, Jun 26, 2011 at 9:24 PM, Brown, Berlin [GCG-PFS]
<[email protected]> wrote:
> Related bug:
> https://issues.apache.org/jira/browse/WICKET-3146
>
> ________________________________
>
> From: Brown, Berlin [GCG-PFS]
> Sent: Sunday, June 26, 2011 8:23 PM
> To: '[email protected]'
> Subject: Override modal.js functionality because of issue with form
> inside form
>
>
> I am using a dated version of wicket. I don't know if this is fixed
> but I wanted to override the functionality in the modal.js from
> wicket-extensions.
>
> Basically, I need to remove the inner "form" that is created by the
> javascript. Some of the browsers we are using, the user cannot submit
> the form from a modal window (maybe our page layout is at fault).
>
> What is a non-invasive way of doing this (least amount of code changes)?
>
> It looks like a lot of the methods in the ModalWindow class are
> private or static, I was thinking of just overriding that class or
> reimplementing that class and passing my own javascript with modified
> functionality.
>
> Here is the javascript I needed to change:
>
> ...
> res/modal.js
> "<div class=\"wicket-modal\" id=\""+idWindow+"\" style=\"top: 10px;
> left: 10px; width: 100px;\"><form
> style='background-color:transparent;padding:0px;margin:0px;border-width:
> 0px;position:static'>"+
>
--
Pedro Henrique Oliveira dos Santos
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]