On Mon, Jun 27, 2011 at 6:06 AM, Brown, Berlin [GCG-PFS]
<berlin.br...@primerica.com> wrote:
> 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
OK, just add the following lines to the new model-override.js

Wicket.Window.getMarkup = function(...){
   return 'custon markup';
}
it is importante to load modal.js before.

>
> 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>

The modal window markup are turn visible as a body's child, so it is
not true that it will to be inside a form tag.

>
> -----Original Message-----
> From: Pedro Santos [mailto:pedros...@gmail.com]
> Sent: Sunday, June 26, 2011 11:27 PM
> To: users@wicket.apache.org
> 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] 
> <berlin.br...@primerica.com> 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: 'users@wicket.apache.org'
>> 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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Pedro Henrique Oliveira dos Santos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to