You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ulrich <Fo...@gombers.de> on 2015/04/19 16:40:49 UTC

Modal panel reloaded when selecting from DropDownChoice

When trying to build a quickstart for another problem I'm stumbling about
this:
When selecting from a DropDownChoice within a modal panel the underlying
page becomes reloaded and I'm asked whether I want to leave the page.
The message is "Reloading this page will cause the modal window to
disappear".



I'm also wondering why the "onSelectionChanged()" -method from the
DropDownChoice is not called when I supply the List from within the class:

At least I don't see the LOGGER-message "New value selected" then.

ModalContentPanel.java
<http://apache-wicket.1842946.n4.nabble.com/file/n4670394/ModalContentPanel.java>   
ModalContentPanel.html
<http://apache-wicket.1842946.n4.nabble.com/file/n4670394/ModalContentPanel.html>   
MyName.java
<http://apache-wicket.1842946.n4.nabble.com/file/n4670394/MyName.java>  
HomePage.java
<http://apache-wicket.1842946.n4.nabble.com/file/n4670394/HomePage.java>  
HomePage.html
<http://apache-wicket.1842946.n4.nabble.com/file/n4670394/HomePage.html>  

The used wicket-version is "6.19.0" with Java 1.7

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-tp4670394.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Modal panel reloaded when selecting from DropDownChoice

Posted by Ulrich <Fo...@gombers.de>.
back to ModalWindow extended from WebPage all works fine (I see my message
when ). But now I don't see how to close the Window programmatically.
It's all about Ajax: When using "Link#OnClick" the message is fine - but
there is no way to close the window; with "AjaxSubmitLink#onSubmit" I can
close the window with "window.close(AjaxRequestTarget target)" but my
message is not rendered.

HTML:


JAVA:


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-tp4670394p4670398.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Modal panel reloaded when selecting from DropDownChoice

Posted by Ulrich <Fo...@gombers.de>.
Ok, thank you - makes sense.

The idea was to have several choices on the modal window and provide a
button (AjaxSubmitButton) to store the results. Before storing I need to
validate the entered values and maybe issuing a message - still within the
modal window.
Therefore I provided a Label (*new Label("message", new PropertyValuey(this,
"message")*) and wanted to set a error-message from button if necessary,
otherwise closing the window.

I got this message when I extended *WebPage* for the modal window - but it
doesn't work when extendig *Panel*

Maybe I will change back to WebPage but would like to understand whats going
on here.  


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-tp4670394p4670396.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: Modal panel reloaded when selecting from DropDownChoice

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

ModalWindow could be used only in Ajax.
DropDownChoice#wantOnSelectionChanged() doesn't use Ajax but reloads the
page.
On Apr 19, 2015 5:56 PM, "Ulrich" <Fo...@gombers.de> wrote:

> When trying to build a quickstart for another problem I'm stumbling about
> this:
> When selecting from a DropDownChoice within a modal panel the underlying
> page becomes reloaded and I'm asked whether I want to leave the page.
> The message is "Reloading this page will cause the modal window to
> disappear".
>
>
>
> I'm also wondering why the "onSelectionChanged()" -method from the
> DropDownChoice is not called when I supply the List from within the class:
>
> At least I don't see the LOGGER-message "New value selected" then.
>
> ModalContentPanel.java
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4670394/ModalContentPanel.java
> >
> ModalContentPanel.html
> <
> http://apache-wicket.1842946.n4.nabble.com/file/n4670394/ModalContentPanel.html
> >
> MyName.java
> <http://apache-wicket.1842946.n4.nabble.com/file/n4670394/MyName.java>
> HomePage.java
> <http://apache-wicket.1842946.n4.nabble.com/file/n4670394/HomePage.java>
> HomePage.html
> <http://apache-wicket.1842946.n4.nabble.com/file/n4670394/HomePage.html>
>
> The used wicket-version is "6.19.0" with Java 1.7
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-tp4670394.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>