Re: ModalWindow to ModalDialog // closedCallback
Hi Korbinian, you can overwrite ModalDialog#close and do something like this. public class MyModalDialog extends ModalDialog { private SerializableConsumer closeWindowCallback; ... public void setCloseWindowCallback(SerializableConsumer closeWindowCallback) { this.closeWindowCallback = closeWindowCallback; } @Override public ModalDialog close(AjaxRequestTarget target) { super.close(target); if (closeWindowCallback != null) { closeWindowCallback.accept(target); } return this; } ... } I also could not find many of the features the old ModalWindow had in ModalDialog. (for example resize, move, header, closebutton). Hope that helps, Johannes Renoth On 20/10/2023 10:31, Korbinian Bachl wrote: Hi, when I try to migrate a ModalWindow to ModalDialog i came accross this: add(new AjaxLink("edit") { @Override public void onClick(AjaxRequestTarget target) { getModalWindow().setModel(ReferenceEditorPanel.this.getModel()); getModalWindow().setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { target.add(ReferenceEditorPanel.this); ReferenceEditorPanel.this.onUpdate(target); } }); getModalWindow().show(target); } }); -> What would a correct way be for the setWindowClosedCallback? Have only see some onOk(AjaxRequestTarget) and onCancel(AjaxRequestTarget)? Best, KB - To unsubscribe, e-mail:users-unsubscr...@wicket.apache.org For additional commands, e-mail:users-h...@wicket.apache.org
ModalWindow to ModalDialog // closedCallback
Hi, when I try to migrate a ModalWindow to ModalDialog i came accross this: add(new AjaxLink("edit") { @Override public void onClick(AjaxRequestTarget target) { getModalWindow().setModel(ReferenceEditorPanel.this.getModel()); getModalWindow().setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { public void onClose(AjaxRequestTarget target) { target.add(ReferenceEditorPanel.this); ReferenceEditorPanel.this.onUpdate(target); } }); getModalWindow().show(target); } }); -> What would a correct way be for the setWindowClosedCallback? Have only see some onOk(AjaxRequestTarget) and onCancel(AjaxRequestTarget)? Best, KB - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where is ModalWindow in wicket-10 ?
On Sun, May 28, 2023 at 12:27 PM smallufo wrote: > I found that all my ModalWindow cannot compile because ModalWindow is > removed. > Is there any reason for this? > And it seems there is a modelDialog ( to replace ModalWindow ?) , > https://github.com/apache/wicket/blob/wicket-9.x/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L126 ModalWindow has been deprecated in 9.x and removed in 10.x The migration guide also mentions it - https://cwiki.apache.org/confluence/display/WICKET/Migration+to+Wicket+9.0#MigrationtoWicket9.0-DeprecateModalWindowfromwicket-extensionASFJIRAkey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution5aa69414-a9e9-3523-82ec-879b028fb15bWICKET- But there is no really a guide how to replace ModalWindow with ModalDialog. The best is to check the demo pages: https://github.com/apache/wicket/tree/wicket-9.x/wicket-examples/src/main/java/org/apache/wicket/examples/ajax/builtin/modal > but it doesn't accept model object. > Any migration guide ? thanks. > [image: 截圖 2023-05-28 17.22.43.png] >
Where is ModalWindow in wicket-10 ?
I found that all my ModalWindow cannot compile because ModalWindow is removed. Is there any reason for this? And it seems there is a modelDialog ( to replace ModalWindow ?) , but it doesn't accept model object. Any migration guide ? thanks. [image: 截圖 2023-05-28 17.22.43.png]
Re: Preventing the ModalWindow from being rendered as iframe
Oh, so it's only decided by the content being either a page or a panel? Imo that should be appended to the documentation; the section that Martin Terra cited seemed to me like it was only concerning the title. Title is specified using setTitle(String). If the content is a page (iframe), the title can remain unset, in that case title from the page inside window will be shown. I'll try using a panel, thanks for your help. On 07.07.2020 13:08, Martin Grigorov wrote: Hi, On Tue, Jul 7, 2020 at 1:26 PM Lukas Fülling wrote: Hi, I'm currently trying to get Javascript callbacks from/to a Wicket ModalWindow to work. Currently, the WebPage the ModalWindow consis of is being redered as an iframe. The Wicket documentation states the following: > Modal window is a draggable window (with either div or iframe content) > that prevent user from interacting the rest of page (using a mask) > until the window is closed. ( https://ci.apache.org/projects/wicket/apidocs/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html ) Unfortunately I can't find any info on how to make the ModalWindow being rendered as a div instead of an iframe and I wondered if someone on this list knows how to do it. You should use ModelWindow#setContent(new SomePanel()) instead of passing it a Page with ModalWindow#setPageCreator(). Thanks for you help Lukas - 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
Re: Preventing the ModalWindow from being rendered as iframe
Hi, On Tue, Jul 7, 2020 at 1:26 PM Lukas Fülling wrote: > Hi, > > I'm currently trying to get Javascript callbacks from/to a Wicket > ModalWindow to work. > Currently, the WebPage the ModalWindow consis of is being redered as an > iframe. > > The Wicket documentation states the following: > > > Modal window is a draggable window (with either div or iframe content) > > that prevent user from interacting the rest of page (using a mask) > > until the window is closed. > ( > https://ci.apache.org/projects/wicket/apidocs/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html > ) > > Unfortunately I can't find any info on how to make the ModalWindow being > rendered as a div instead of an iframe and I wondered if someone on this > list knows how to do it. > You should use ModelWindow#setContent(new SomePanel()) instead of passing it a Page with ModalWindow#setPageCreator(). > > Thanks for you help > > Lukas > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Preventing the ModalWindow from being rendered as iframe
Hi! Javadoc says ... *If the content is a page (iframe)* .. Can you show your code, if you are using a panel or a page as its content? ** Martin ti 7. heinäk. 2020 klo 13.26 Lukas Fülling (lerk@gammel.cloud.invalid) kirjoitti: > Hi, > > I'm currently trying to get Javascript callbacks from/to a Wicket > ModalWindow to work. > Currently, the WebPage the ModalWindow consis of is being redered as an > iframe. > > The Wicket documentation states the following: > > > Modal window is a draggable window (with either div or iframe content) > > that prevent user from interacting the rest of page (using a mask) > > until the window is closed. > ( > https://ci.apache.org/projects/wicket/apidocs/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html > ) > > Unfortunately I can't find any info on how to make the ModalWindow being > rendered as a div instead of an iframe and I wondered if someone on this > list knows how to do it. > > Thanks for you help > > Lukas > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Preventing the ModalWindow from being rendered as iframe
Hi, I'm currently trying to get Javascript callbacks from/to a Wicket ModalWindow to work. Currently, the WebPage the ModalWindow consis of is being redered as an iframe. The Wicket documentation states the following: Modal window is a draggable window (with either div or iframe content) that prevent user from interacting the rest of page (using a mask) until the window is closed. (https://ci.apache.org/projects/wicket/apidocs/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.html) Unfortunately I can't find any info on how to make the ModalWindow being rendered as a div instead of an iframe and I wondered if someone on this list knows how to do it. Thanks for you help Lukas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow alert popup that submits form
Issue Resolved. Another part of the code was found to be setting it back to false in a way that evaded my previous searches. Once that was corrected, the AjaxButton behaves as expected. Sorry to waste your time. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow alert popup that submits form
Sorry, we seem to speak about different buttons. Could you create a quickstart? I've used validation in modal dialogs plenty of times and it works as expected. Have fun Sven On 14.05.20 19:14, Entropy wrote: The panel that launches the modal is not inside the form (it's part of a standard header), so when i remove it from the constructor I get an illegal state exception saying "form was not specified in the constructor and cannot be found in the hierarchy of the component this behavior is attached to" -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - 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
Re: ModalWindow alert popup that submits form
The panel that launches the modal is not inside the form (it's part of a standard header), so when i remove it from the constructor I get an illegal state exception saying "form was not specified in the constructor and cannot be found in the hierarchy of the component this behavior is attached to" -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow alert popup that submits form
Hi, form processing should work as usual in the modal window, including validation of course. Does it make a difference when you let the AjaxButton find its form by itself? Have fun Sven Am 13. Mai 2020 22:29:59 MESZ schrieb Entropy : >We have a custom popup alert box launched from wicket. It's build >around >org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow. It >works >great in most situations where it's just messaging and doing other >not-validating things. But one of the buttons in one scenario needs to >cause a save (and validate) of the form. The buttons are based on >AjaxButton, and the defaultformprocessing flag was set to true on that >button during initialization. the button has reference back to the >form on >the main page (the form is not INSIDE the modal). > >But everytime I submit, the onSubmit() runs instead of the onError() >despite >the fact that I deliberately put a validation error in the text that >DOES >get trapped on the normal submit process. > >Does anyone have an idea of where I should look? or if this is just >something you can't do from inside a modalwindow? > >-- >Sent from: >http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > >- >To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow alert popup that submits form
We have a custom popup alert box launched from wicket. It's build around org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow. It works great in most situations where it's just messaging and doing other not-validating things. But one of the buttons in one scenario needs to cause a save (and validate) of the form. The buttons are based on AjaxButton, and the defaultformprocessing flag was set to true on that button during initialization. the button has reference back to the form on the main page (the form is not INSIDE the modal). But everytime I submit, the onSubmit() runs instead of the onError() despite the fact that I deliberately put a validation error in the text that DOES get trapped on the normal submit process. Does anyone have an idea of where I should look? or if this is just something you can't do from inside a modalwindow? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
You'll have to show us some code (quickstart?), without it it is difficult to understand your problem. Have fun Sven Am 26. September 2019 16:41:47 MESZ schrieb dylanbozeman : >Thank you Ernesto. I will look into this. > >I didn't mean to be rude, I was thankful for the answer. I was just >hopeful >for a followup as the first response didn't address my specific >situation, >so I was trying to be direct. > >-- >Sent from: >http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > >- >To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
Thank you Ernesto. I will look into this. I didn't mean to be rude, I was thankful for the answer. I was just hopeful for a followup as the first response didn't address my specific situation, so I was trying to be direct. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
Hi, It is difficult to understand what you are describing. What I guess is you have a panel containing a listview and a label and open some modal to do some operation on listview and after that operation you want the label to show correct number of elements? If so, make the label receive a dynamic model not caching the number of elements (e.g. AbstractReadOnlyModel or LDM). Then I would update the whole panel via AJAX. Side note: no one in this list is getting paid for answering and helping people. Maybe starting you messages with "Thanks for your answer... But unfortunately what you have answered does not help me because ..." might increase the chances you get answered in the future. On Wed, Sep 25, 2019 at 9:00 PM dylanbozeman wrote: > I have a Label within a ListView that is refreshed using Ajax upon the > closing of a ModalWindow that is also part of that ListView. > > Th problem is, the Label isn't refreshing. > > I don't believe I can use a PropertyModel within a ListView and I believe I > need that for the Label to by dynamic. (if I can use a PropertyModel, how > so? because I can't specify - new PropertyModel(this, > "localVariableInsideListView") - because it looks at the class level for > that variable) > > Is there a way around this or something I am not seeing? > > When I do this with a regular Model I am getting: > > [qtp976782276-127] WARN org.apache.wicket.page.PartialPageUpdate - > Component > '[Component id = numberLabel]' not rendered because it was already removed > from page > > > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
This actually didn't answer my question because what I want to display in the label is not contained within the ModelObject of my ListView items. It's a local list defined within the ListView itself. I want the Label to show a string the represents theList.size() but that list size can change as the user opens a ModalWindow that's available for each item in the ListView. Just using a regular model doesn't work because then it's not dynamic. When I try to use a PropertyModel, that doesn't work because it doesn't let me specify theList.size() as a string. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DynamicModel within ListView That Refreshes on ModalWindow Close
Hi, of course you can use a PropertyModel within a Listview, e.g.: https://github.com/apache/wicket/blob/0a1c33574d08ad9afd2e36a24085d48cdf9efc3f/wicket-examples/src/main/java/org/apache/wicket/examples/forminput/FormInput.java#L213 Or use a CompoundPropertyModel: https://github.com/apache/wicket/blob/0a1c33574d08ad9afd2e36a24085d48cdf9efc3f/wicket-examples/src/main/java/org/apache/wicket/examples/guestbook/GuestBook.java#L58 Or just use a plain model: item.add(new Label("label", () -> item.getModelObject().getVariable())); // Wicket 8 Have fun Sven On 25.09.19 20:00, dylanbozeman wrote: I have a Label within a ListView that is refreshed using Ajax upon the closing of a ModalWindow that is also part of that ListView. Th problem is, the Label isn't refreshing. I don't believe I can use a PropertyModel within a ListView and I believe I need that for the Label to by dynamic. (if I can use a PropertyModel, how so? because I can't specify - new PropertyModel(this, "localVariableInsideListView") - because it looks at the class level for that variable) Is there a way around this or something I am not seeing? When I do this with a regular Model I am getting: [qtp976782276-127] WARN org.apache.wicket.page.PartialPageUpdate - Component '[Component id = numberLabel]' not rendered because it was already removed from page -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - 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
DynamicModel within ListView That Refreshes on ModalWindow Close
I have a Label within a ListView that is refreshed using Ajax upon the closing of a ModalWindow that is also part of that ListView. Th problem is, the Label isn't refreshing. I don't believe I can use a PropertyModel within a ListView and I believe I need that for the Label to by dynamic. (if I can use a PropertyModel, how so? because I can't specify - new PropertyModel(this, "localVariableInsideListView") - because it looks at the class level for that variable) Is there a way around this or something I am not seeing? When I do this with a regular Model I am getting: [qtp976782276-127] WARN org.apache.wicket.page.PartialPageUpdate - Component '[Component id = numberLabel]' not rendered because it was already removed from page -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Why AjaxButton works inside the modal window ModalEditPanel but Button not works for the Form submit? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
modalEditLog.setContent(new ModalEditPanel(modalEditLog.getContentId(), modalEditLog, result)); modalEditLog.setWindowClosedCallback(new WindowClosedCallback() { private static final long serialVersionUID = 7961678233294274184L; public void onClose(AjaxRequestTarget target) { doRefresh(target); } }); Panel ModalEditPanel is the replacement for the original WebPage ModalEditPage and it has the close button to close the window addOrReplace(new AjaxLink("btnClose") { private static final long serialVersionUID = -8174543450190822811L; @Override public void onClick(AjaxRequestTarget target) { window.close(target); } }); -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Please share how you solved it. Someone else may hit the same issue some day and your explicit description will help him/her. Just confirming "ModalWindow#setContent() solved it" is also fine. On Thu, Mar 7, 2019 at 11:52 AM kyc wrote: > Solved. Thank you. > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Solved. Thank you. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Hi, It seems you use ModalWindow backed by a Page, i.e. you use ModalWindow's PageCreator. Try with ModalWindow backed by a Panel (ModalWindow#setContent()). On Thu, Mar 7, 2019 at 9:57 AM kyc wrote: > Hi Bas, > > Thanks for your reply. > > Since we are saving data in the page of Modal Page itself, it is no > problem. > However, we have problem to close that modalwindow with a separate close > button. > Even I change the form to StatelessForm, the close button still have the > PageExpiredException > > addOrReplace(new AjaxLink("btnClose") { > private static final long serialVersionUID > = -8174543450190822811L; > > @Override > public void onClick(AjaxRequestTarget target) { > window.close(target); > } > }); > > KYC > > > > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Hi Bas, Thanks for your reply. Since we are saving data in the page of Modal Page itself, it is no problem. However, we have problem to close that modalwindow with a separate close button. Even I change the form to StatelessForm, the close button still have the PageExpiredException addOrReplace(new AjaxLink("btnClose") { private static final long serialVersionUID = -8174543450190822811L; @Override public void onClick(AjaxRequestTarget target) { window.close(target); } }); KYC -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Hi, Since you are not storing pages, how does the form in your modal window work? I assume you are using a stateless form? Since your on close callback is stateful, it will not work; you will either need to use a stateless Ajax behavior or stateless form where in onsubmit you redirect to a new page with up-to-date information. // Bas Verstuurd vanaf mijn iPhone > Op 7 mrt. 2019 om 07:56 heeft kyc het volgende geschreven: > > Our page open a WindowModal for editing a form, there is an exception throw > when closed the modal window. > This problem only happens when our site is using NoPageStore but we have to > use NoPageStore. > > The following exception happen and the setWindowClosedCallback cannot be > called. > Page with id '16' has expired. > org.apache.wicket.protocol.http.PageExpiredException: Page with id '16' has > expired. > > > The modal window close call back function works on without NoPageStore > setting: > >abcModalWindow.setWindowClosedCallback(new WindowClosedCallback() { >private static final long serialVersionUID = > 7961678233294274184L; > >public void onClose(AjaxRequestTarget target) { >doRefresh(target); >} >}); > > Please help if anyone knows the solution. Thanks a lot. > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > 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
ModalWindow cannot trigger setWindowClosedCallback or setCloseButtonCallback problem
Our page open a WindowModal for editing a form, there is an exception throw when closed the modal window. This problem only happens when our site is using NoPageStore but we have to use NoPageStore. The following exception happen and the setWindowClosedCallback cannot be called. Page with id '16' has expired. org.apache.wicket.protocol.http.PageExpiredException: Page with id '16' has expired. The modal window close call back function works on without NoPageStore setting: abcModalWindow.setWindowClosedCallback(new WindowClosedCallback() { private static final long serialVersionUID = 7961678233294274184L; public void onClose(AjaxRequestTarget target) { doRefresh(target); } }); Please help if anyone knows the solution. Thanks a lot. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FileUploadField in a form in a modalWindow
The problem must be somewhere else! "localhost" most probably is not the problem! On Wed, Jan 9, 2019 at 3:20 PM JavaTraveler wrote: > Hi > > So, apparently, the solution is that the fileUploadField in a form in a > modalWindow doesn't work when used on a local server (maybe localhost ... > is > causing the trouble). > > Thank you a lot for your time. > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: FileUploadField in a form in a modalWindow
Hi So, apparently, the solution is that the fileUploadField in a form in a modalWindow doesn't work when used on a local server (maybe localhost ... is causing the trouble). Thank you a lot for your time. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FileUploadField in a form in a modalWindow
https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletResponse.html in an interface that is implemented by Glassfish, Tomcat, Jetty, and such. If it is not Wicket that calls its #sendError() method then it is something else. By putting a breakpoint at Glassfish HttpServletResponseImpl#sendError() methods you can see from the stacktrace who and why calls it. This will help you resolve your issue. On Mon, Jan 7, 2019 at 12:28 PM JavaTraveler wrote: > I tried the first part and no when I click the button, none of those is > called. > > But I don't undestand what you mean by debugging glassfish's > ServletHttpResponse implementation. > Could you be more specific ? > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: FileUploadField in a form in a modalWindow
I tried the first part and no when I click the button, none of those is called. But I don't undestand what you mean by debugging glassfish's ServletHttpResponse implementation. Could you be more specific ? -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FileUploadField in a form in a modalWindow
The response : 400 Bad Request Connection close Content-Length 1082 Content-Typetext/html;charset=ISO-8859-1 DateFri, 04 Jan 2019 07:54:37 GMT Server GlassFish Server Open Source Edition 4.1 X-Powered-By Servlet/3.1 JSP/2.3 (GlassFish… Java/Oracle Corporation/1.8) What's weird is that the response 's parameters contains the file and its data that i'm uploading ... -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FileUploadField in a form in a modalWindow
Check in your browser dev tools what is the HTTP response code and body. On Fri, Jan 4, 2019, 09:30 JavaTraveler Hi. > > I see, thanks for the anser. > But my modal window is already inside a form. > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: FileUploadField in a form in a modalWindow
Hi, Wicket automatically uses IFrame (and since some time uses HTML5 FormData) when the request is Ajax. I guess your problem is related to this requirement: https://github.com/apache/wicket/blob/69b2e4c84eb097f55f7b02dfb17c6be057de2f6f/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L118-L120 You need to wrap the modal window is inside a form. On Thu, Jan 3, 2019 at 4:10 PM JavaTraveler wrote: > Hello everyone, > > Happy new Year !!! > > I'd like to ask you something for this new year ^^ > > I wish to upload a .csv file through a FileUploadField, wich is in a Form, > and in a modal Window. But every try, I get an ajax error : ERROR: > Wicket.Ajax.Call.failure: Error while parsing response: Could not find root > element. > And then I realised that my FileUpload was always null. > > Browsing the forum and other sites, I got that Ajax and FileUploadField > don't go along that well, and that I should use an IFrame. > > But I don't really get what that means. Could anyone help me a bit ? > > Thanks a lot in advance. > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
FileUploadField in a form in a modalWindow
Hello everyone, Happy new Year !!! I'd like to ask you something for this new year ^^ I wish to upload a .csv file through a FileUploadField, wich is in a Form, and in a modal Window. But every try, I get an ajax error : ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find root element. And then I realised that my FileUpload was always null. Browsing the forum and other sites, I got that Ajax and FileUploadField don't go along that well, and that I should use an IFrame. But I don't really get what that means. Could anyone help me a bit ? Thanks a lot in advance. -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 8 ModalWindow autosizing problem
Thanks for the tip. https://issues.apache.org/jira/browse/WICKET-6613 -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 8 ModalWindow autosizing problem
Thanks for the tip. https://issues.apache.org/jira/browse/WICKET-6613 -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 8 ModalWindow autosizing problem
http://examples8x.wicket.apache.org/ajax/modal-window also loads fine but I think there is no auto-sizing there. Try to reproduce it in a quickstart application and attach it to a ticket in JIRA. On Wed, Nov 7, 2018 at 1:21 PM daniel wrote: > I updated the version and modal.css seems to load fine > (modal-ver-154158884.css). > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Wicket 8 ModalWindow autosizing problem
I updated the version and modal.css seems to load fine (modal-ver-154158884.css). -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket 8 ModalWindow autosizing problem
Hi, Please update Wicket to 8.1.0. Then check whether there is any problem with the loading of modal.css in your browser Dev Tools > Network tab. On Wed, Nov 7, 2018 at 11:01 AM daniel wrote: > Hi, > > I've recently upgraded my project from Wicket version 6 to 8.0.0-M9 and > autosizing of ModalWindows suddenly stopped working. All ModalWindows are > either too big or too small, in that case the scrollbar appears. I need my > ModalWindows to be autosized so the content fits perfectly without any > scrollbar or excessive window size. I've been trying to play around with > various combinations of set/useInitial/Minimal/Height() and setAutoSize() > without any luck so far. > > Any help is appreciated, thank you. > > Daniel > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Wicket 8 ModalWindow autosizing problem
Hi, I've recently upgraded my project from Wicket version 6 to 8.0.0-M9 and autosizing of ModalWindows suddenly stopped working. All ModalWindows are either too big or too small, in that case the scrollbar appears. I need my ModalWindows to be autosized so the content fits perfectly without any scrollbar or excessive window size. I've been trying to play around with various combinations of set/useInitial/Minimal/Height() and setAutoSize() without any luck so far. Any help is appreciated, thank you. Daniel -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Setting focus on a ModalWindow title
My point was: 1) you need to try to implement what you need using browser console 2) understand what steps need to be done 3) later on move it to the wicket I'm not using ModalWindow in my project We are using wicket-jquery-ui dialog instead http://www.7thweb.net/wicket-jquery-ui/dialog/FormDialogPage On Fri, Feb 23, 2018 at 1:52 AM, SeldonCrisis <nmbara...@gmail.com> wrote: > Hmm ok, how would I add to the Title in java? I know how > to add that through the console, but that doesn't help :( > > I would have to create a label with setEscapeModelStrings(false) and add it > to the markup, but the markup is being dynamically created so I can't > actually place it in the correct location. > > Also, is there a way to add the tabindex attribute to everything under the > first holding wicket-modal? > > Thanks again for your help > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- WBR Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Setting focus on a ModalWindow title
Hmm ok, how would I add to the Title in java? I know how to add that through the console, but that doesn't help :( I would have to create a label with setEscapeModelStrings(false) and add it to the markup, but the markup is being dynamically created so I can't actually place it in the correct location. Also, is there a way to add the tabindex attribute to everything under the first holding wicket-modal? Thanks again for your help -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Setting focus on a ModalWindow title
Hello, What you you expecting from "set the HTML Focus to the title of the *ModalWindow*"? It is regular div element What I did: 1) open http://examples7x.wicket.apache.org/ajax/modal-window?0 2) click "Show modal dialog" 3) in console type: $('.w_caption h3').focus() in console type: document.activeElement ->Show modal dialog with panel 4) manually add to Title 5) in console type: $('.w_caption h3 input').focus() in console type: document.activeElement -> I believe you need to check your expectation first :) On Thu, Feb 22, 2018 at 4:15 AM, SeldonCrisis <nmbara...@gmail.com> wrote: > Hey Everyone, > > I'm having some difficulties with *ModalWindow*. I need a way to set the > HTML Focus to the title of the *ModalWindow *when it pops up, but so far > nothing has worked for me. > > 1. I have tried adding an *AjaxEventBehavior ("onload")* to my modal window, > but that did not work. Neither did *("onchange")* or *("onblur")*. > > 2. I have also tried appending javascript to the target when invoking the > ModalWindow's *show()* method: > > > ...but unfortunately this.getMarkupId() is referring to the div holding the > wicket component: > > > ...and not the actual Modal Window itself, which is dynamically creating > id's like so: > > > > 3. I have also tried using *AjaxRequestTarget.focusComponent()*: > > > ...where *child()* is simply returning the first component in the hierarchy > that is not a WebMarkupContainer: > > > Using the Wicket Ajax Debug window, we can see that my 3rd attempt did > successfully fire some javascript to set focus: > > > > BUT when I use the Internet Explorer developer tools and run > *document.activeElement*, I am returned the entire body of the web page, > meaning there is no focus set. > > If anyone can think of a way to set focus on the modal window title, or a > way to hardcode id's for different parts of the modal window, please help me > out. Thanks! > > > -- > Sent from: > http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > -- WBR Maxim aka solomax - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Setting focus on a ModalWindow title
Hey Everyone, I'm having some difficulties with *ModalWindow*. I need a way to set the HTML Focus to the title of the *ModalWindow *when it pops up, but so far nothing has worked for me. 1. I have tried adding an *AjaxEventBehavior ("onload")* to my modal window, but that did not work. Neither did *("onchange")* or *("onblur")*. 2. I have also tried appending javascript to the target when invoking the ModalWindow's *show()* method: ...but unfortunately this.getMarkupId() is referring to the div holding the wicket component: ...and not the actual Modal Window itself, which is dynamically creating id's like so: 3. I have also tried using *AjaxRequestTarget.focusComponent()*: ...where *child()* is simply returning the first component in the hierarchy that is not a WebMarkupContainer: Using the Wicket Ajax Debug window, we can see that my 3rd attempt did successfully fire some javascript to set focus: BUT when I use the Internet Explorer developer tools and run *document.activeElement*, I am returned the entire body of the web page, meaning there is no focus set. If anyone can think of a way to set focus on the modal window title, or a way to hardcode id's for different parts of the modal window, please help me out. Thanks! -- Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to send a Java object to the ModalWindow
Hello, I know this is a long overdue thread, but could you please explain how you did it? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-send-a-Java-object-to-the-ModalWindow-tp2312589p4675862.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and OnDomReady
The panel is created and added with setContent just before the modal window is shown. On Oct 20, 2016 10:40 AM, "Ernesto Reinaldo Barreiro" <reier...@gmail.com> wrote: > is this panel initially added to the mcdal? When page is created? > > On Thu, Oct 20, 2016 at 10:13 AM, Rob Audenaerde <rob.audenae...@gmail.com > > > wrote: > > > It is the Panel that I put on the ModalWindow. > > > > On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov <mgrigo...@apache.org> > > wrote: > > > > > Hi, > > > > > > It depends on what you add the OnDomReady header item. > > > Is it the ModalWindow ? Or its content (Panel or Page) ? > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > https://twitter.com/mtgrigorov > > > > > > On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde < > > rob.audenae...@gmail.com> > > > wrote: > > > > > > > Hi all, > > > > > > > > I have a panel that needs some JavaScript for sizing etc. to run > after > > a > > > > ModalWindow is shown, but as I now see it the Javascript is run > > *before* > > > > the modal window is shown. > > > > > > > > What is the proper way to run javascript after a ModalWindow is > shown? > > It > > > > seems OnDomReady is not sufficient here? > > > > > > > > Thanks, > > > > > > > > Rob > > > > > > > > > > > > > -- > Regards - Ernesto Reinaldo Barreiro >
Re: ModalWindow and OnDomReady
is this panel initially added to the mcdal? When page is created? On Thu, Oct 20, 2016 at 10:13 AM, Rob Audenaerde <rob.audenae...@gmail.com> wrote: > It is the Panel that I put on the ModalWindow. > > On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov <mgrigo...@apache.org> > wrote: > > > Hi, > > > > It depends on what you add the OnDomReady header item. > > Is it the ModalWindow ? Or its content (Panel or Page) ? > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde < > rob.audenae...@gmail.com> > > wrote: > > > > > Hi all, > > > > > > I have a panel that needs some JavaScript for sizing etc. to run after > a > > > ModalWindow is shown, but as I now see it the Javascript is run > *before* > > > the modal window is shown. > > > > > > What is the proper way to run javascript after a ModalWindow is shown? > It > > > seems OnDomReady is not sufficient here? > > > > > > Thanks, > > > > > > Rob > > > > > > -- Regards - Ernesto Reinaldo Barreiro
Re: ModalWindow and OnDomReady
It is the Panel that I put on the ModalWindow. On Wed, Oct 19, 2016 at 7:56 PM, Martin Grigorov <mgrigo...@apache.org> wrote: > Hi, > > It depends on what you add the OnDomReady header item. > Is it the ModalWindow ? Or its content (Panel or Page) ? > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <rob.audenae...@gmail.com> > wrote: > > > Hi all, > > > > I have a panel that needs some JavaScript for sizing etc. to run after a > > ModalWindow is shown, but as I now see it the Javascript is run *before* > > the modal window is shown. > > > > What is the proper way to run javascript after a ModalWindow is shown? It > > seems OnDomReady is not sufficient here? > > > > Thanks, > > > > Rob > > >
Re: ModalWindow and OnDomReady
Hi, It depends on what you add the OnDomReady header item. Is it the ModalWindow ? Or its content (Panel or Page) ? Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <rob.audenae...@gmail.com> wrote: > Hi all, > > I have a panel that needs some JavaScript for sizing etc. to run after a > ModalWindow is shown, but as I now see it the Javascript is run *before* > the modal window is shown. > > What is the proper way to run javascript after a ModalWindow is shown? It > seems OnDomReady is not sufficient here? > > Thanks, > > Rob >
Re: ModalWindow and OnDomReady
Repainting the panel after the modal is shown? On the same ART That way JavaScript will be executed again. On Wed, Oct 19, 2016 at 5:06 PM, Rob Audenaerde <rob.audenae...@gmail.com> wrote: > Hi all, > > I have a panel that needs some JavaScript for sizing etc. to run after a > ModalWindow is shown, but as I now see it the Javascript is run *before* > the modal window is shown. > > What is the proper way to run javascript after a ModalWindow is shown? It > seems OnDomReady is not sufficient here? > > Thanks, > > Rob > -- Regards - Ernesto Reinaldo Barreiro
ModalWindow and OnDomReady
Hi all, I have a panel that needs some JavaScript for sizing etc. to run after a ModalWindow is shown, but as I now see it the Javascript is run *before* the modal window is shown. What is the proper way to run javascript after a ModalWindow is shown? It seems OnDomReady is not sufficient here? Thanks, Rob
Re: CryptoMapper, Mounted pages recreation and ModalWindow cookie
Created an issue for it - https://issues.apache.org/jira/browse/WICKET-6248 Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513p4675621.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CryptoMapper, Mounted pages recreation and ModalWindow cookie
Hi, Added to my previous reproduction steps, there one more configuration which causes the mentioned behavior; When the mounted page has some url path parameter. It might also be reproducible if mounted path more than one URL segments. Please find the quick start attached. Try accessing the page using '://modal-ex/my-page/01' modal-ex.7z <http://apache-wicket.1842946.n4.nabble.com/file/n4675540/modal-ex.7z> Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513p4675540.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: CryptoMapper, Mounted pages recreation and ModalWindow cookie
Hi, The cookie is set at https://github.com/apache/wicket/blob/d4f0bba426cb4106576f35cc430392f81bd9e759/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js#L1667 but I don't see 'path' being set for it. I am not sure but I'd guess in this case its default value should be '/'. Please create a quickstart and we will investigate what happens! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Wed, Sep 14, 2016 at 11:00 AM, Rakesh A <iamrakes...@rediffmail.com> wrote: > Hi, > > When we've a mounted page for URL '/my-page' and modal window (with > 'cookieName' set) is opened from that page modal window size/position > information is set into a cookie and path set for it contains the mount > path > as well. > > When we enable CryptoMapper in WicketApplication, encrypted URLs for Ajax > links/behaviors will look like '//my-page?wicket-crypt=...', and > modal window size/position cookie is also sent along with any Ajax call > made > (including modal window close ajax call). > > On top this if we set > 'org.apache.wicket.settings.def.PageSettings. > recreateMountedPagesAfterExpiry' > to 'false' by calling > > getPageSettings().setRecreateMountedPagesAfterExpiry(false); > > in WicketApplication#init() function, encrypted URLs for Ajax > links/behaviors will look like '//', and modal window > size/position cookie is NOT sent along with Ajax calls. > > This is because the 'path' for the cookie contains page mount path, but the > encrypted ajax URLs doesn't contain the page mount path. > > Different seems to be in > "org.apache.wicket.Component.createRequestHandler( > RequestListenerInterface, > PageParameters, Integer)"; where for the first scenario > 'BookmarkableListenerInterfaceRequestHandler' instance is being created, > and > for the second scenario 'ListenerInterfaceRequestHandler' instance is > being > created. > > Is it a bug ? > How do I solve it in the second scenario mentioned above ? > > Regards, > Rakesh.A > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and- > ModalWindow-cookie-tp4675513.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
CryptoMapper, Mounted pages recreation and ModalWindow cookie
Hi, When we've a mounted page for URL '/my-page' and modal window (with 'cookieName' set) is opened from that page modal window size/position information is set into a cookie and path set for it contains the mount path as well. When we enable CryptoMapper in WicketApplication, encrypted URLs for Ajax links/behaviors will look like '//my-page?wicket-crypt=...', and modal window size/position cookie is also sent along with any Ajax call made (including modal window close ajax call). On top this if we set 'org.apache.wicket.settings.def.PageSettings.recreateMountedPagesAfterExpiry' to 'false' by calling getPageSettings().setRecreateMountedPagesAfterExpiry(false); in WicketApplication#init() function, encrypted URLs for Ajax links/behaviors will look like '//', and modal window size/position cookie is NOT sent along with Ajax calls. This is because the 'path' for the cookie contains page mount path, but the encrypted ajax URLs doesn't contain the page mount path. Different seems to be in "org.apache.wicket.Component.createRequestHandler(RequestListenerInterface, PageParameters, Integer)"; where for the first scenario 'BookmarkableListenerInterfaceRequestHandler' instance is being created, and for the second scenario 'ListenerInterfaceRequestHandler' instance is being created. Is it a bug ? How do I solve it in the second scenario mentioned above ? Regards, Rakesh.A -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/CryptoMapper-Mounted-pages-recreation-and-ModalWindow-cookie-tp4675513.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceModel usage within ModalWindow content Panel
Nevermind, using a PackageStringResourceLoader works fine! CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ResourceModel-usage-within-ModalWindow-content-Panel-tp4674067p4674077.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceModel usage within ModalWindow content Panel
No that won't work anyway because the ModalWindow instance is added at the page level and reused throughout. So basically I need to pass the panel where the content panel is instantiated to this content panel so that it can resolve the resources. Bit ugly.. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ResourceModel-usage-within-ModalWindow-content-Panel-tp4674067p4674071.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceModel usage within ModalWindow content Panel
Hey there, Indeed I'm using a Panel rather than a separate page. I could just use StringResourceModel("key", modalwindow.getParent(), null) but I was hoping for something less verbose that would cover all resourcemodel use in the modal content panel... Thanks, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ResourceModel-usage-within-ModalWindow-content-Panel-tp4674067p4674069.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceModel usage within ModalWindow content Panel
Hi, if you're using a panel as the ModalWindow's content (not a separate page), you can use Wicket's usual resource resolving: https://ci.apache.org/projects/wicket/guide/7.x/guide/single.html#i18n_3 Regards Sven On 19.03.2016 13:17, ChambreNoire wrote: Hi, I'd like to be able to use localised string resources declared within the ModalWindow's parent panel from within the ModalWindow content Panel. Any ideas? Many Thanks, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ResourceModel-usage-within-ModalWindow-content-Panel-tp4674067.html Sent from the Users forum mailing list archive at Nabble.com. - 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
ResourceModel usage within ModalWindow content Panel
Hi, I'd like to be able to use localised string resources declared within the ModalWindow's parent panel from within the ModalWindow content Panel. Any ideas? Many Thanks, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ResourceModel-usage-within-ModalWindow-content-Panel-tp4674067.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to close a ModalWindow without AjaxRequestTarget
I have already asked this question http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-td4670394.html but maybe it was off topic there. The Modal Window provides the method #close(AjaxRequestTarget). But I want to provide a Button to validate entered data and display a message in case of error otherwise close. If I use AjaxSubmitButton() to handle the button the message is not part of the target and not updated. I I use Link() the message becomes updated but I have no means to close the window. HTML: Java: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to close a ModalWindow without AjaxRequestTarget
AjaxButton should be fine... by overriding protected void onSubmit(AjaxRequestTarget target, Form? form) { } /** * Listener method invoked on form submit with errors * * @param target * @param form */ protected void onError(AjaxRequestTarget target, Form? form) { } On Tue, Apr 21, 2015 at 8:09 AM, Ulrich for...@gombers.de wrote: I have already asked this question http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-td4670394.html but maybe it was off topic there. The Modal Window provides the method #close(AjaxRequestTarget). But I want to provide a Button to validate entered data and display a message in case of error otherwise close. If I use AjaxSubmitButton() to handle the button the message is not part of the target and not updated. I I use Link() the message becomes updated but I have no means to close the window. HTML: Java: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards - Ernesto Reinaldo Barreiro
Re: How to close a ModalWindow without AjaxRequestTarget
Hi, It is not clear why you have two submit buttons in HTML. I think you need just one - AjaxButton. It will submit the form via Ajax and if errors occur then its #onError(AjaxRequestTarget) will be called. If everything is OK then #onSubmit() will be called. In both cases you have AjaxRequestTarget around to close the ModalWindow. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Apr 21, 2015 at 9:09 AM, Ulrich for...@gombers.de wrote: I have already asked this question http://apache-wicket.1842946.n4.nabble.com/Modal-panel-reloaded-when-selecting-from-DropDownChoice-td4670394.html but maybe it was off topic there. The Modal Window provides the method #close(AjaxRequestTarget). But I want to provide a Button to validate entered data and display a message in case of error otherwise close. If I use AjaxSubmitButton() to handle the button the message is not part of the target and not updated. I I use Link() the message becomes updated but I have no means to close the window. HTML: Java: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to close a ModalWindow without AjaxRequestTarget
For the sample I have two buttons to show the coding and to see the results of either of them. I have no problem closing the window with using AjaxSubmitLink - I don't know how to display the message. Maybe it's easier to see with the complete program: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429p4670435.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to close a ModalWindow without AjaxRequestTarget
Thanks a lot; that solved it. JAVA now (to supply the resuolution for others): -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429p4670439.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to close a ModalWindow without AjaxRequestTarget
Hi, Please read http://wicket.apache.org/guide/guide/ajax.html#ajax_3 Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Apr 21, 2015 at 10:33 AM, Ulrich for...@gombers.de wrote: For the sample I have two buttons to show the coding and to see the results of either of them. I have no problem closing the window with using AjaxSubmitLink - I don't know how to display the message. Maybe it's easier to see with the complete program: -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-close-a-ModalWindow-without-AjaxRequestTarget-tp4670429p4670435.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow position
Hi, I need to modify the position of the modal window before it gets displayed in the middle. I have a ajaxbutton which will open the modal window. In the onClick method I tried something like... target.appendJavaScript($(\.wicket-modal\).css('width', 888+'px');); or target.appendJavaScript($(\[id^=_wicket_window]\).css('top', 100+'px');); and some more variations of it... It seems I can't manipulate the position of the ModalWindow before it gets displayed. But I can manipulate the position and size of an element INSIDE this modal window. For example: target.appendJavaScript($(\.formdiv\).css('width', 888+'px');); works. formdiv is a div in the modal window. It changes it's width, color and what I want. But I need the position of the ModalWindow somewhere else at the first appearance. How can I do it? Related stackoverflow question: http://stackoverflow.com/questions/28811547/wicket-modalwindow-position Hope anyone can help. Regards - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Select overlaping inside autosized ModalWindow
Hi, I have just noticed that if one places a select within the content panel assigned to a ModalWindow, if the select is wider than any other component in the content, it overlaps. ex: modal = new ModalWindow(modal) .setInitialHeight(0) .setInitialWidth(0) .setMinimalHeight(0) .setMinimalWidth(0) .setContent(new TestPanel(ModalWindow.CONTENT_ID)) .setAutoSize(true); wicket:panel test select optionOne/option optionTwo/option optionPretty long string just for example/option optionThree/option /select /wicket:panel Any ideas? CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Select-overlaping-inside-autosized-ModalWindow-tp4668822.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow - full screen
Hi, We've tried your proposal, but it doesn't work, because the setCssClassName doesn't apply to the div that needs to be resized. In code underneath you can see the structure. The class should be place on the div that now has wicket-modal, but this is not possible, or is it? - cannot depend on element higher in the html, because the only element would be the body, and this modalwindow is used onto multiple pages - cannot use wicket-modal class, because it the full screen may not reflect on all modal windows div class=wicket-modal id=_wicket_window_0 role=dialog style=top: 54px; left: 76px; width: 1000px; position: absolute; visibility: visible; form style=background-color:transparent;padding:0px;margin:0px;border-width:0px;position:staticdiv id=_wicket_window_1 class=OWN_CLASS_NAME Thanks ! Kind Regards, Marieke Met vriendelijke groeten, *MARIEKE VANDAMMECORPORATE SERVICES* • *Domain Coordinator* T +32 56 43 42 45 • F +32 56 43 44 46 • marieke.vanda...@tvh.com *TVH GROUP NV* Brabantstraat 15 • BE-8790 WAREGEM T +32 56 43 42 11 • F +32 56 43 44 88 • www.tvh.com Watch our company movies on www.tvh.tv 2014-10-14 11:10 GMT+02:00 Martin Grigorov mgrigo...@apache.org: Hi, With #setCssClassName() ( https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L513 ) you can set your custom CSS class that should be applied on the main modal window div element. In your own .css file you can define CSS rules to show any element having this custom CSS class as fullscreen. I am not CSS master but I guess you have to play with position, top, left. width and height properties. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Oct 14, 2014 at 11:32 AM, Marieke Vandamme marieke.vanda...@tvh.com wrote: Hi, I know you can set initial width and height for a modalwindow, but we now get the requirement to open it full screen. Is this something built in already, or has somebody done this before? Thanks ! Kind Regards, Marieke Vandamme -- DISCLAIMER http://www.tvh.com/glob/en/email-disclaimer This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message. -- DISCLAIMER http://www.tvh.com/glob/en/email-disclaimer This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message.
Re: ModalWindow - full screen
Hi, I see two ways to do it then: 1) ModalWindow#setMarkupId(myFullscreenId); $(#myFullscreenId) 2) $(.OWN_CLASS_NAME).closest(div) both gives you a reference to the div.modal-window. From there on you can manipulate it to make it fullscreen. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Oct 21, 2014 at 12:18 PM, Marieke Vandamme marieke.vanda...@tvh.com wrote: Hi, We've tried your proposal, but it doesn't work, because the setCssClassName doesn't apply to the div that needs to be resized. In code underneath you can see the structure. The class should be place on the div that now has wicket-modal, but this is not possible, or is it? - cannot depend on element higher in the html, because the only element would be the body, and this modalwindow is used onto multiple pages - cannot use wicket-modal class, because it the full screen may not reflect on all modal windows div class=wicket-modal id=_wicket_window_0 role=dialog style=top: 54px; left: 76px; width: 1000px; position: absolute; visibility: visible; form style=background-color:transparent;padding:0px;margin:0px;border-width:0px;position:staticdiv id=_wicket_window_1 class=OWN_CLASS_NAME Thanks ! Kind Regards, Marieke Met vriendelijke groeten, *MARIEKE VANDAMMECORPORATE SERVICES* • *Domain Coordinator* T +32 56 43 42 45 • F +32 56 43 44 46 • marieke.vanda...@tvh.com *TVH GROUP NV* Brabantstraat 15 • BE-8790 WAREGEM T +32 56 43 42 11 • F +32 56 43 44 88 • www.tvh.com Watch our company movies on www.tvh.tv 2014-10-14 11:10 GMT+02:00 Martin Grigorov mgrigo...@apache.org: Hi, With #setCssClassName() ( https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L513 ) you can set your custom CSS class that should be applied on the main modal window div element. In your own .css file you can define CSS rules to show any element having this custom CSS class as fullscreen. I am not CSS master but I guess you have to play with position, top, left. width and height properties. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Oct 14, 2014 at 11:32 AM, Marieke Vandamme marieke.vanda...@tvh.com wrote: Hi, I know you can set initial width and height for a modalwindow, but we now get the requirement to open it full screen. Is this something built in already, or has somebody done this before? Thanks ! Kind Regards, Marieke Vandamme -- DISCLAIMER http://www.tvh.com/glob/en/email-disclaimer This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message. -- DISCLAIMER http://www.tvh.com/glob/en/email-disclaimer This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message.
ModalWindow - full screen
Hi, I know you can set initial width and height for a modalwindow, but we now get the requirement to open it full screen. Is this something built in already, or has somebody done this before? Thanks ! Kind Regards, Marieke Vandamme -- DISCLAIMER http://www.tvh.com/glob/en/email-disclaimer This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message.
Re: ModalWindow - full screen
Hi, With #setCssClassName() ( https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/ModalWindow.java#L513) you can set your custom CSS class that should be applied on the main modal window div element. In your own .css file you can define CSS rules to show any element having this custom CSS class as fullscreen. I am not CSS master but I guess you have to play with position, top, left. width and height properties. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Oct 14, 2014 at 11:32 AM, Marieke Vandamme marieke.vanda...@tvh.com wrote: Hi, I know you can set initial width and height for a modalwindow, but we now get the requirement to open it full screen. Is this something built in already, or has somebody done this before? Thanks ! Kind Regards, Marieke Vandamme -- DISCLAIMER http://www.tvh.com/glob/en/email-disclaimer This message is delivered to all addressees subject to the conditions set forth in the attached disclaimer, which is an integral part of this message.
Change the style of an already rendered wicket ModalWindow
I want to make modal window transprent (opacity:0.5) after a click event in one of its buttons. So, i try by using : window.add(AttributeAppender.append(style,color:red; font-weight:bold)); or window.setCssClassName(custom-modal); But none of these solutions allows to apply the desired style. Any help will be grateful! Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Change-the-style-of-an-already-rendered-wicket-ModalWindow-tp4667236.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Change the style of an already rendered wicket ModalWindow
Hi, You will need to repaint the ModalWindow to apply any UI changes. Use target.add(window); for that. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Aug 29, 2014 at 11:00 AM, Rim lanouar@gmail.com wrote: I want to make modal window transprent (opacity:0.5) after a click event in one of its buttons. So, i try by using : window.add(AttributeAppender.append(style,color:red; font-weight:bold)); or window.setCssClassName(custom-modal); But none of these solutions allows to apply the desired style. Any help will be grateful! Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Change-the-style-of-an-already-rendered-wicket-ModalWindow-tp4667236.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
Hi, What exactly you tried and it didn't work ? Martin Grigorov Wicket Training and Consulting On Tue, Jun 24, 2014 at 10:32 PM, Lucio Crusca lu...@sulweb.org wrote: Hi *, In a long page I need a ModalWindow to position itself at the center of the browser window even when the page is scrolled way down, so that the ModalWindow always pops up in front of the user. I've found this [1], but it dates back to 2009, and it refers to an old versions of Wicket (1.3.x). I've tried nevertheless (I'm using 1.6.15), but the JS code seems to be just ignored and nothing happens, e.g. the ModalWindow still shows in the usual position near the top of the page, so the user has to scroll back up to understand why the page stopped processing his input. Can you please provide up to date hints? [1] http://apache-wicket.1842946.n4.nabble.com/Modal-window-position-always-centred-even-on-long-page-td1889257.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
In data mercoledì 25 giugno 2014 09:49:51, Martin Grigorov ha scritto: Hi, What exactly you tried and it didn't work ? I added the code below, but please note that I'm no JS wizard, so it's likely my code wouldn't work anyway, but the point is I don't even get JS errors and the ModalWindow behaves just like my code wasn't there, so either my code is being actually skipped or it is the exact equivalent of what the default wicket code does (unlikely): Wicket.Window.prototype.center = function() { var myWindow = Wicket.Window.get(); if (myWindow) { myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; I add this code in by including a js file in renderHead of my page and I confirm the code is there when I look at page source in the browser. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 10:53 AM, Lucio Crusca lu...@sulweb.org wrote: In data mercoledì 25 giugno 2014 09:49:51, Martin Grigorov ha scritto: Hi, What exactly you tried and it didn't work ? I added the code below, but please note that I'm no JS wizard, so it's likely my code wouldn't work anyway, but the point is I don't even get JS errors and the ModalWindow behaves just like my code wasn't there, so either my code is being actually skipped or it is the exact equivalent of what the default wicket code does (unlikely): Wicket.Window.prototype.center = function() { var myWindow = Wicket.Window.get(); if (myWindow) { myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; I add this code in by including a js file in renderHead of my page and I confirm the code is there when I look at page source in the browser. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
In data mercoledì 25 giugno 2014 11:09:42, Martin Grigorov ha scritto: Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. I couldn't manage to set a breakpoint with Firebug, so I added two window.alert(). The first, before the if, gets hit, not the second, so now I wonder what's the code that is centering the window, since my code is executed but it does absolutely nothing... And, I obviously don't know what to write instead of Wicket.Window.get() in order to make the if condition true. Wicket.Window.prototype.center = function() { window.alert(!!); var myWindow = Wicket.Window.get(); if (myWindow) { window.alert(); myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
try with Wicket.Window.current Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 2:51 PM, Lucio Crusca lu...@sulweb.org wrote: In data mercoledì 25 giugno 2014 11:09:42, Martin Grigorov ha scritto: Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. I couldn't manage to set a breakpoint with Firebug, so I added two window.alert(). The first, before the if, gets hit, not the second, so now I wonder what's the code that is centering the window, since my code is executed but it does absolutely nothing... And, I obviously don't know what to write instead of Wicket.Window.get() in order to make the if condition true. Wicket.Window.prototype.center = function() { window.alert(!!); var myWindow = Wicket.Window.get(); if (myWindow) { window.alert(); myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
also try: this.window Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 2:53 PM, Martin Grigorov mgrigo...@apache.org wrote: try with Wicket.Window.current Martin Grigorov Wicket Training and Consulting On Wed, Jun 25, 2014 at 2:51 PM, Lucio Crusca lu...@sulweb.org wrote: In data mercoledì 25 giugno 2014 11:09:42, Martin Grigorov ha scritto: Make sure that your code appears *after* the script src=.../modal.js. With the browser Dev Tools you can put a breakpoint inside your function and see whether it is called/used. I couldn't manage to set a breakpoint with Firebug, so I added two window.alert(). The first, before the if, gets hit, not the second, so now I wonder what's the code that is centering the window, since my code is executed but it does absolutely nothing... And, I obviously don't know what to write instead of Wicket.Window.get() in order to make the if condition true. Wicket.Window.prototype.center = function() { window.alert(!!); var myWindow = Wicket.Window.get(); if (myWindow) { window.alert(); myWindow.css(position, fixed); myWindow.css(top, Math.max(0, (($(window).height() - $(myWindow).outerHeight()) / 2)) + px); myWindow.css(left, Math.max(0, (($(window).width() - $(myWindow).outerWidth()) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning [SOLVED]
In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto: also try: this.window Ok thanks, this.window seems to be the correct one in my case, but I suspect other variants are needed to be as much cross browser as possible. Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow = Wicket.Window.get(); if (myWindow) { $(myWindow).css(position, fixed); $(myWindow).css(top, Math.max(0, ((window.innerHeight - $(myWindow).outerHeight) / 2)) + px); $(myWindow).css(left, Math.max(0, ((window.innerWidth - $(myWindow).outerWidth) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
I always forget I should not change the subject, sorry... I send the message again with the unchanged subject so that it remains attached to the rest of this thread. In data mercoledì 25 giugno 2014 14:54:23, Martin Grigorov ha scritto: also try: this.window Ok thanks, this.window seems to be the correct one in my case, but I suspect other variants are needed to be as much cross browser as possible. Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow = Wicket.Window.get(); if (myWindow) { $(myWindow).css(position, fixed); $(myWindow).css(top, Math.max(0, ((window.innerHeight - $(myWindow).outerHeight) / 2)) + px); $(myWindow).css(left, Math.max(0, ((window.innerWidth - $(myWindow).outerWidth) / 2)) + px); } }; - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow positioning
In data mercoledì 25 giugno 2014 18:05:54, Lucio Crusca ha scritto: Just in case others need it, my current working code is: Wicket.Window.prototype.center = function() { var myWindow = this.window; if (!myWindow) myWindow = Wicket.Window.current; if (!myWindow) myWindow = Wicket.Window.get(); if (myWindow) { $(myWindow).css(position, fixed); $(myWindow).css(top, Math.max(0, ((window.innerHeight - $(myWindow).outerHeight) / 2)) + px); $(myWindow).css(left, Math.max(0, ((window.innerWidth - $(myWindow).outerWidth) / 2)) + px); } }; No, this code works only in my development environment (localhost:8084). Once deployed to the real domain, the screen dims but the ModalWindow does not show up, even using the same browser I use in development tests (I guess it actually shows up but it falls outside the browser window, but I'm not sure). There's no noticeable difference between development and production environments, except the Tomcat and Apache versions, but I fail to see how those could interfere with javascript. The only strange thing is that the JS console is showing an error in both cases, but in development it seems harmless: Error: Permission denied to access property 'toString' and this error has no reference to any particular line of code in any particular js file, so I don't even know if it is my mistake and where. Any clues about why my code could behave differently in the same browser between development and deployment environments? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow positioning
Hi *, In a long page I need a ModalWindow to position itself at the center of the browser window even when the page is scrolled way down, so that the ModalWindow always pops up in front of the user. I've found this [1], but it dates back to 2009, and it refers to an old versions of Wicket (1.3.x). I've tried nevertheless (I'm using 1.6.15), but the JS code seems to be just ignored and nothing happens, e.g. the ModalWindow still shows in the usual position near the top of the page, so the user has to scroll back up to understand why the page stopped processing his input. Can you please provide up to date hints? [1] http://apache-wicket.1842946.n4.nabble.com/Modal-window-position-always-centred-even-on-long-page-td1889257.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow minHeight minWidth ignored
Hi List! I'm struggeling with ModalWindow's in combination with the iPad. I've created a quickstart to show the problem: http://www.woifal.at/modalwindowipad.tar.gz I'm setting the minWidth, minHeight, initialWidth and initialHeight of the ModalWindow but when you're zoomed in on the page and click the link to show the ModalWindow it ignores the settings and just shows the modalwindow very small - hiding most of the content. And you don't have a chance to resize it. You can even try it with firefox when resizing the browser window very very small (so you just see the link text in my example) - then the ModalWindow will also be very small. I would expect the window to be the size I've setted no matter how small the browser window is. Can anybody suggests a solution to it? Thanks -Wolfgang - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Variables Assigned to ModalWindow are not the same as in the Callback
The problem is, that this classes are hibernate entities. so they have to be serializable -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Variables-Assigned-to-ModalWindow-are-not-the-same-as-in-the-Callback-tp4665161p4665290.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Variables Assigned to ModalWindow are not the same as in the Callback
http://stackoverflow.com/questions/18741445/hibernate-entity-serializable On Tue, Apr 8, 2014 at 3:35 PM, arnzel arne_zela...@gmx.de wrote: The problem is, that this classes are hibernate entities. so they have to be serializable -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Variables-Assigned-to-ModalWindow-are-not-the-same-as-in-the-Callback-tp4665161p4665290.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Regards - Ernesto Reinaldo Barreiro
Re: ModalWindow and jQuery mousedown binding
Hi, Thanks for sharing your findings ! On Wed, Apr 2, 2014 at 11:20 PM, neilbennett nbenn...@awaremanager.comwrote: Hello again. Thanks for your help, I've found what occurs. When removing onmousedown=Wicket.Event.stop(event); from the w_content_1 div, the event then propagates. However, the mouseDownHandler function is called in the Drag class in wicket-ajax-jquery.js this returns false which then stops further event propagation. Commenting out the return false then allows my component popup window to close. I am not sure why only commenting out the return statement helps. At https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L2410there is another Wicket.Event.stop(event) call that I think also should mess the things up in your case ... So that's the cause, I'm not sure of the best way to work around this. I can crudely remove the bindings/return value, but I'm sure that will break things. Thought I'd report back anyway - if anyone has any suggestions to work around this or what would break/not break from changing this. I am also not aware why this code needs to stop the propagation of the event. Please file a bug in our Jira with a quickstart and I'll try to find out. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665236.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and jQuery mousedown binding
Hi Martin, You are exactly right. The other Wicket.Event.stop(event) does need to be commented out. I've found that while this does allow pop-up's to be closed, it also stops fields taking focus. I will submit a JIRA issue with a quickstart though. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665250.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and jQuery mousedown binding
Hello again. Thanks for your help, I've found what occurs. When removing onmousedown=Wicket.Event.stop(event); from the w_content_1 div, the event then propagates. However, the mouseDownHandler function is called in the Drag class in wicket-ajax-jquery.js this returns false which then stops further event propagation. Commenting out the return false then allows my component popup window to close. So that's the cause, I'm not sure of the best way to work around this. I can crudely remove the bindings/return value, but I'm sure that will break things. Thought I'd report back anyway - if anyone has any suggestions to work around this or what would break/not break from changing this. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4665236.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Variables Assigned to ModalWindow are not the same as in the Callback
Hi, Yes. I believe the problem comes because the entity is deserialized. The easier way to check is to remove java.io.Serializable from its interfaces. Wicket will tell you when it tries to serialize it with a detailed exception message. Martin Grigorov Wicket Training and Consulting On Thu, Mar 27, 2014 at 5:58 PM, arnzel arne_zela...@gmx.de wrote: Hi In a Component i create a ModalWindow. To this ModalWindow i add a Component/Page. In the Constructor i put an reference to an entity. when i use this reference in the callback of the Modal Window i got two diferent references. Can this be, bcause the reference in the modal window was serialized ? How can i find out why the serialization did not work ? AjaxLinkVoid ajaxButton = new AjaxLinkVoid(){ onClick(AjaxRequestTarget target){ MyEntity myEntity = ...; showModal(target,entity); } } public void showModal(AjaxRequestTarget target,MyEntity myEntity){ WindowClosedCallback windowClosedCallback = new WindowClosedCallback() { private static final long serialVersionUID = 1L; public void onClose(AjaxRequestTarget target) { // this reference myEntity.save(); MyEnclosingPanel.this.refresh(target); setResponsePage(MyEnclosingPanel.this.getPage()); } }; Panel panel = new MyPanel(myEntity) ModalWindow modalWindow = new ModalWindow(); modalWindow.setWindowClosedCallback(windowClosedCallback); modalWindow.show(panel, target); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Variables-Assigned-to-ModalWindow-are-not-the-same-as-in-the-Callback-tp4665161.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and jQuery mousedown binding
Hi, You can use Google Chrome's Event Listener Breakpoints and see where mousedown is trapped. Dev Tools - Sources - right pane - Event Listener Breakpoints - Mouse -mousedown Martin Grigorov Wicket Training and Consulting On Tue, Mar 11, 2014 at 11:32 PM, neilbennett nbenn...@awaremanager.comwrote: Thanks for the reply. I actually removed that binding from the html output but I don't see any noticeable changes in behavior. Clicks on the modalwindow still do not trigger the mousedown binding on the datetime component unless it is outside of the modal window. I have limited javascript knowledge, hence why using Wicket, but I'm stumped on where to look on why these events aren't being sent to the datetime component. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4664902.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and jQuery mousedown binding
Thanks for the reply. I actually removed that binding from the html output but I don't see any noticeable changes in behavior. Clicks on the modalwindow still do not trigger the mousedown binding on the datetime component unless it is outside of the modal window. I have limited javascript knowledge, hence why using Wicket, but I'm stumped on where to look on why these events aren't being sent to the datetime component. Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859p4664902.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and jQuery mousedown binding
Hi, I don't know what is the reason to stop the event at https://github.com/apache/wicket/blob/master/wicket-extensions/src/main/java/org/apache/wicket/extensions/ajax/markup/html/modal/res/modal.js?source=c#L1186 You can remove that binding with: jQuery('.wicket-modal .w_content_1')[0].onmousedown = null; // or = function() {}; Martin Grigorov Wicket Training and Consulting On Fri, Mar 7, 2014 at 6:22 PM, neilbennett nbenn...@awaremanager.comwrote: Hi, I am experiencing an issue very similar to Andrew Geery here, http://apache-wicket.1842946.n4.nabble.com/weird-interaction-between-ModalWindow-and-jQuery-mousedown-binding-td4473055.html I have a ModalWindow open with a datetimepicker (http://www.malot.fr/bootstrap-datetimepicker/) component. On non-ModalWindow pages this component closes if open when clicked outside of it's area, but the ModalWindow consumes the mousedown event and so datetimepicker is not closed when clicking outside of it or even when the modal window is closed itself. Are there any ideas on how to have these ModalWindow mousedown events not be consumed? Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow and jQuery mousedown binding
Hi, I am experiencing an issue very similar to Andrew Geery here, http://apache-wicket.1842946.n4.nabble.com/weird-interaction-between-ModalWindow-and-jQuery-mousedown-binding-td4473055.html I have a ModalWindow open with a datetimepicker (http://www.malot.fr/bootstrap-datetimepicker/) component. On non-ModalWindow pages this component closes if open when clicked outside of it's area, but the ModalWindow consumes the mousedown event and so datetimepicker is not closed when clicking outside of it or even when the modal window is closed itself. Are there any ideas on how to have these ModalWindow mousedown events not be consumed? Thanks, Neil -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-and-jQuery-mousedown-binding-tp4664859.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ModalWindow and Page expired
Hi, Check your logs when the ModalWindow is opened. Most probably there are serialization errors. I.e. the page cannot be stored due to serialization error and later the Ajax call cannot find it to close the modal window. On Sat, Sep 21, 2013 at 11:05 PM, Piratenvisier hansheinrichbr...@yahoo.dewrote: When I try to close the ModalWindow with window.close(target) I get the error Page expired How can I solve this ? --**--**- To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
ModalWindow and Page expired
When I try to close the ModalWindow with window.close(target) I get the error Page expired How can I solve this ? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: issue using select2 in a ModalWindow
The problem turned out to be a couple of z-index css properties associated with the select2 component not being big enough to work with the Wicket ModalWindow. Here are the changes I made to made to the select2 css to make it work with the Wicket ModalWindow. .select2-drop { z-index: 30001; } .select2-drop-mask { z-index: 3; } The first one is obvious -- if you don't have it the drop-downs open behind the ModalWindow. The second one fixes the problem of the drop-down not closing correctly (e.g., when you click outside of them) in a ModalWindow. Thanks Andrew On Tue, Aug 27, 2013 at 9:20 AM, Andrew Geery andrew.ge...@gmail.comwrote: I'm using the fantastic select2 component in my Wicket 6.7 application via the Wicket-select2 integration package [ https://github.com/ivaynberg/wicket-select2/], version 2.2.2. It works great on a regular page. On a page, clicking outside of the select2 component causes the component to close. However, when used in a Wicket ModalWindow, clicking outside of the select2 component (i.e., clicking somewhere else in the ModalWindow) does not cause the component to close. Some issues have been reported around this (https://github.com/ivaynberg/wicket-select2/issues/13, https://github.com/ivaynberg/wicket-select2/issues/35) and the tickets say the issue should be fixed in select 3.3.0. Version 2.2.2 of the wicket-select2 package includes version 3.3.2 of select2. However, I'm still seeing the problem. Is anyone else seeing this behavior? Should the issue be fixed? Thanks Andrew
issue using select2 in a ModalWindow
I'm using the fantastic select2 component in my Wicket 6.7 application via the Wicket-select2 integration package [ https://github.com/ivaynberg/wicket-select2/], version 2.2.2. It works great on a regular page. On a page, clicking outside of the select2 component causes the component to close. However, when used in a Wicket ModalWindow, clicking outside of the select2 component (i.e., clicking somewhere else in the ModalWindow) does not cause the component to close. Some issues have been reported around this ( https://github.com/ivaynberg/wicket-select2/issues/13, https://github.com/ivaynberg/wicket-select2/issues/35) and the tickets say the issue should be fixed in select 3.3.0. Version 2.2.2 of the wicket-select2 package includes version 3.3.2 of select2. However, I'm still seeing the problem. Is anyone else seeing this behavior? Should the issue be fixed? Thanks Andrew