Re: Wicket Modal with a different javascript modal
I would roll my own implementation for that and hook into the ajax parts On Tue, 18 Dec 2018, 21:29 Entropy Our front-end developer doesn't like some of the behavior of the wicket > modal > with respect to 508 compliance. He has an alternative modal implementation > he'd prefer us to use. Is there any way i can use the existing Wicket > modal > code on the server side with this other javascript modal? > > It's this one if that helps: > https://allyjs.io/tutorials/accessible-dialog.html > > I'm hoping there's some way to slip our calls to this dialog into the > events > that currently launch the wicket modal on the javascript side. > > -- > 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 Modal with a different javascript modal
Our front-end developer doesn't like some of the behavior of the wicket modal with respect to 508 compliance. He has an alternative modal implementation he'd prefer us to use. Is there any way i can use the existing Wicket modal code on the server side with this other javascript modal? It's this one if that helps: https://allyjs.io/tutorials/accessible-dialog.html I'm hoping there's some way to slip our calls to this dialog into the events that currently launch the wicket modal on the javascript side. -- 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 Modal throws exception
Please start new threads for new issues! Double check that this particular component indeed renders its HTML element. No matter what Java methods you call on the component it won't render if the used HTML element is . Depending on your MarkupSettings this elements are usually not rendered. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, May 1, 2017 at 9:06 PM, Entropy wrote: > Upgrading seems to fix this specific issue. However, I am no getting > another > odd behavior. I am trying to update some text and button captions on the > page. It's working, but gives an error in javascript despite the working. > > Wicket.Ajax: Wicket.Ajax.Call.processComponent: Component with id > [[message]] was not found while trying to perform markup update. Make sure > you called component.setOutputMarkupId(true) on the component whose markup > you are trying to update. > > It says that, but in fact, I DID call setOutputMarkupId(true) on not just > that component, but EVERY component in the modal, overkill though it may > be. > I also called setOutputPlaceholderTag and setMarkupId just in case. > Neither > changed anything. > > The confusing part is that the label change AND the button caption changes > ARE working. > > The relevant part of the ajax event: > > message.setDefaultModelObject(modalWindow.getMessage()); > button.setVisible(true); > button.setDefaultModel(new Model(modalWindow. > getButtonCaption())); > > > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p460.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: Wicket Modal throws exception
Upgrading seems to fix this specific issue. However, I am no getting another odd behavior. I am trying to update some text and button captions on the page. It's working, but gives an error in javascript despite the working. Wicket.Ajax: Wicket.Ajax.Call.processComponent: Component with id [[message]] was not found while trying to perform markup update. Make sure you called component.setOutputMarkupId(true) on the component whose markup you are trying to update. It says that, but in fact, I DID call setOutputMarkupId(true) on not just that component, but EVERY component in the modal, overkill though it may be. I also called setOutputPlaceholderTag and setMarkupId just in case. Neither changed anything. The confusing part is that the label change AND the button caption changes ARE working. The relevant part of the ajax event: message.setDefaultModelObject(modalWindow.getMessage()); button.setVisible(true); button.setDefaultModel(new Model(modalWindow.getButtonCaption())); -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p460.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: Wicket Modal throws exception
First "workaround" that everyone should try whenever something behaves wrong is to upgrade to the latest stable version! In your case this is 6.26.0. If this doesn't help then try to reproduce the problem in a small demo app. Share it somehow with us (JIRA ticket, GitHub project, ...) and someone will either fix the app for you or fix Wicket! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, May 1, 2017 at 1:36 PM, Entropy wrote: > 6.24. Is there a workaround? We're using modals elsewhere. I am trying > to > make one that will be more general purpose, but it otherwise seems the same > as our others and I am not sure what is so different about it. > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p4677768.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: Wicket Modal throws exception
6.24. Is there a workaround? We're using modals elsewhere. I am trying to make one that will be more general purpose, but it otherwise seems the same as our others and I am not sure what is so different about it. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764p4677768.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: Wicket Modal throws exception
Wicket version ? I think there was a bug related to that that has been fixed an year (?!) ago. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Sun, Apr 30, 2017 at 8:39 PM, Entropy wrote: > I am addding a Wicket Modal. I go to render it on button click and amd > getting the below trace. But I don't have _header_ in my page, in the > modal, or anywhere in my app actually (I searched the whole workspace), so > I'm not sure where it comes from, and therefore am not sure how to fix it. > > org.apache.wicket.WicketRuntimeException: Cannot replace a component which > has not been added: id='_header_', component=[HtmlHeaderContainer > [Component > id = _header_]]: > [Page class = com.mycompany.mypage, id = 0, render count = 1] > at org.apache.wicket.MarkupContainer.replace( > MarkupContainer.java:734) > at > org.apache.wicket.ajax.AbstractAjaxResponse.writeTo( > AbstractAjaxResponse.java:170) > at > org.apache.wicket.ajax.AjaxRequestHandler.respond( > AjaxRequestHandler.java:359) > at > org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond( > RequestCycle.java:890) > at > org.apache.wicket.request.RequestHandlerStack.execute( > RequestHandlerStack.java:64) > at > org.apache.wicket.request.RequestHandlerStack.execute( > RequestHandlerStack.java:97) > at > org.apache.wicket.request.cycle.RequestCycle.execute( > RequestCycle.java:261) > at > org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle. > java:218) > at > org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach( > RequestCycle.java:289) > at > org.apache.wicket.protocol.http.WicketFilter.processRequestCycle( > WicketFilter.java:259) > at > org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter. > java:201) > at > org.apache.wicket.protocol.http.WicketServlet.doPost( > WicketServlet.java:159) > > -- > View this message in context: http://apache-wicket.1842946. > n4.nabble.com/Wicket-Modal-throws-exception-tp4677764.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 > >
Wicket Modal throws exception
I am addding a Wicket Modal. I go to render it on button click and amd getting the below trace. But I don't have _header_ in my page, in the modal, or anywhere in my app actually (I searched the whole workspace), so I'm not sure where it comes from, and therefore am not sure how to fix it. org.apache.wicket.WicketRuntimeException: Cannot replace a component which has not been added: id='_header_', component=[HtmlHeaderContainer [Component id = _header_]]: [Page class = com.mycompany.mypage, id = 0, render count = 1] at org.apache.wicket.MarkupContainer.replace(MarkupContainer.java:734) at org.apache.wicket.ajax.AbstractAjaxResponse.writeTo(AbstractAjaxResponse.java:170) at org.apache.wicket.ajax.AjaxRequestHandler.respond(AjaxRequestHandler.java:359) at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:890) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:97) at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261) at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218) at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289) at org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259) at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201) at org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:159) -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-Modal-throws-exception-tp4677764.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: Wicket modal, change the parent page
That is correct, my modal shows a page. I wasn't aware a modal could show just a panel. I will look into this. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163p4671168.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: Wicket modal, change the parent page
Yes, the method is called, and yes the modal closes. However, in the same event as the closing modal, I need to let the parent page update itself based on what the user did. And that's the part that doesn't work. A quickstart would be hard because this is in the middle of a large workflow with lots of stuff that probably isn't relevant to the issue because it was already there. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163p4671167.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: Wicket modal, change the parent page
Hi, Most probably you use ModalWindow with a Page. This page has its own JavaScript 'document' that is completely different than the 'document' of the parent page. I.e. document.getElementById('someId') will not find the element. Using ModalWindow with a Panel as content would work for your use case. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Mon, Jun 15, 2015 at 4:15 AM, Entropy wrote: > I have a wicket modal that is used to let the user select from a couple > options on a popup button. On close, depending on what button they hit on > the popup, I need to run a javascript event on the calling page as I close > the window, AND I need to alter a label and ExternalLink on the parent > page. > > But wicket is largely ignoring me. I used target.appendJavascript() to > invoke the javascript method, yet it never gets invoked. I also > setOutputMarkupId on the controls I need to update (and their parent > container in fact), and I added all to the target. I changed their models > to affect their content. So label.setDefaultModel(new Model("newValue")) > for example, and for the ExternalLink, I used the same to affect the url, > and used setBody("newValue") to change the body of the link. > > Am I doing to wrong? This is all in response to a button in the modal, so > I > thought maybe the target is the wrong target. I saw an example where > someone used ModalWindow.WindowClosedCallback, and so i moved the logic > into > that event, using that target, and still, nothing seems to update on the > front end. > > So I must be doing it wrong. Advice? > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163.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: Wicket modal, change the parent page
Hi, did you debug the problem? Is your button's hook method #onSubmit() called actually? Does the modal window close? A quickstart would help to identify the problem. Sven On 15.06.2015 03:15, Entropy wrote: I have a wicket modal that is used to let the user select from a couple options on a popup button. On close, depending on what button they hit on the popup, I need to run a javascript event on the calling page as I close the window, AND I need to alter a label and ExternalLink on the parent page. But wicket is largely ignoring me. I used target.appendJavascript() to invoke the javascript method, yet it never gets invoked. I also setOutputMarkupId on the controls I need to update (and their parent container in fact), and I added all to the target. I changed their models to affect their content. So label.setDefaultModel(new Model("newValue")) for example, and for the ExternalLink, I used the same to affect the url, and used setBody("newValue") to change the body of the link. Am I doing to wrong? This is all in response to a button in the modal, so I thought maybe the target is the wrong target. I saw an example where someone used ModalWindow.WindowClosedCallback, and so i moved the logic into that event, using that target, and still, nothing seems to update on the front end. So I must be doing it wrong. Advice? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163.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
Wicket modal, change the parent page
I have a wicket modal that is used to let the user select from a couple options on a popup button. On close, depending on what button they hit on the popup, I need to run a javascript event on the calling page as I close the window, AND I need to alter a label and ExternalLink on the parent page. But wicket is largely ignoring me. I used target.appendJavascript() to invoke the javascript method, yet it never gets invoked. I also setOutputMarkupId on the controls I need to update (and their parent container in fact), and I added all to the target. I changed their models to affect their content. So label.setDefaultModel(new Model("newValue")) for example, and for the ExternalLink, I used the same to affect the url, and used setBody("newValue") to change the body of the link. Am I doing to wrong? This is all in response to a button in the modal, so I thought maybe the target is the wrong target. I saw an example where someone used ModalWindow.WindowClosedCallback, and so i moved the logic into that event, using that target, and still, nothing seems to update on the front end. So I must be doing it wrong. Advice? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-modal-change-the-parent-page-tp4671163.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: jquery dialog and wicket modal window
what i mean to say is the modal window is still in focus & i can't work with my jquery dialog window. the jquery dialog window must be opened first i tried adding a document.getElementByID("id").focus() at the end of the getWindowOpenJavascript in renderHead but that didn't work. It appears that the getWindowOpenJavascript() calls Window.show which strictly demands & keeps the focus any help, thoughts, or ideas you have would be appreciated. I could try & do another jquery dialog window but that would stink for a lot of reasons. I do <3 my wicket. This is the far superior solution. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jquery-dialog-and-wicket-modal-window-tp4656897p4663794.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
Wicket modal
Hi wickers ! I'm using a ModalWindow to show a simple phrase where a form is sent to the server. I used ModalWindow wModal = new ModalWindow("ventanaModal"); wModal.setAutoSize(true); wModal.setResizable(false); But when I show the wModal (with wModal.show(target); ), the inner panel gets a 200px heigth, hardcoded into style. Width is ok. Is this ok ? How can I get a autoheigth ? I tried with fixed size, in order to get a it , I must do: wModal.setInitialHeight(30); wModal.setHeightUnit("px"); wModal.setInitialWidth(200); wModal.setWidthUnit("px"); wModal.setUseInitialHeight(true); wModal.setAutoSize(false); wModal.setAutoSize(false); Isn't this a little complicated ? But I really don't like fixed sizes into HTML... Thanks > > > Oscar Besga Arcauz < < < - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
jquery dialog and wicket modal window
jquery ui dialog does shows up behind wicket modal window. I am using wicket 1.4.21 when a modal window is open , next If I click a link which opens jquery dialog it always open behind modalwindow,I can see the dialog only If I close the modal window. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jquery-dialog-and-wicket-modal-window-tp4656897.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: custom (non wicket) modal dialog. Problem with urls.
Problem is solved now: i extract the application-relative-path with: String path = Strings.stripJSessionId(request.getRequestURI()); the trick is to overwrite method "onComponentTag(ComponentTag tag)" of class ResourceLink and prepend the application -relative path so i end up with e.g.: /mybaseurl/mypath/?wicket:interface=:85:border:_body:dialogContainer:contentPanels:infoTextContentPanel:externalLinks:0:externalLink::IResourceListener:: complete code: public class CustomResourceLink extends ResourceLink { private static final long serialVersionUID = -4848428865939435963L; private boolean applicationRelative = false; private PopupSettings popupSettings = null; public CustomResourceLink (String id, Resource resource) { super(id, resource); } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); if (isLinkEnabled() == false) { disableLink(tag); } else { if (getURL() != null) { String url = getURL().toString(); if (applicationRelative) { if (url.length() > 0 && url.charAt(0) == '/') { url = url.substring(1); } url = RequestUtils.getBaseUrl(this) + url; } // if the tag is an anchor proper if (tag.getName().equalsIgnoreCase("a") || tag.getName().equalsIgnoreCase("link") || tag.getName().equalsIgnoreCase("area")) { // generate the href attribute tag.put("href", Strings.replaceAll(url, "&", "&")); // Add any popup script if (popupSettings != null) { // NOTE: don't encode to HTML as that is not valid // JavaScript tag.put("onclick", popupSettings.getPopupJavaScript()); } } else { // generate a popup script by asking popup settings for one if (popupSettings != null) { popupSettings.setTarget("'" + url + "'"); String popupScript = popupSettings.getPopupJavaScript(); tag.put("onclick", popupScript); } else { // or generate an onclick JS handler directly tag.put("onclick", "window.location.href='" + url + "';return false;"); } } } if (popupSettings != null) { IPageMap popupPageMap = popupSettings.getPageMap(this); if (popupPageMap != null && popupPageMap.getName() != null) { tag.put("target", popupPageMap.getName()); } } } } public void setApplicationRelative(boolean contextRelative) { this.applicationRelative = contextRelative; } } public class RequestUtils { public static String getBaseUrl(Component comp) { ServletWebRequest servletWebRequest = (ServletWebRequest) comp .getRequest(); HttpServletRequest request = servletWebRequest.getHttpServletRequest(); String path = Strings.stripJSessionId(request.getRequestURI()); return pa
Re: custom (non wicket) modal dialog. Problem with urls.
One step further. My original assumption was wrong. It is a problem with iframes and the configuration of our firewall. But the situation hasn't improved. The url of the link is: ?wicket:interface=:85:border:_body:dialogContainer:contentPanels:infoTextContentPanel:externalLinks:0:externalLink::IResourceListener:: Now i have to prepend my servlet path e.g. /mybaseurl/mypath to the relative url of the link, e.g.: /mybaseurl/mypath/?wicket:interface=:85:border:_body:dialogContainer:contentPanels:infoTextContentPanel:externalLinks:0:externalLink::IResourceListener:: FurtherMore i need an Ajax-ResourceLink (which i think doesn't exist by now). Any suggestions would be greatly appreciated! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-non-wicket-modal-dialog-Problem-with-urls-tp3726196p3733218.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: custom (non wicket) modal dialog. Problem with urls.
Could also be that it is a problem with iframes, because the Wicket page (in the modal dialog, which is a div) gets opened in the top iframe with top.showForm(...). -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-non-wicket-modal-dialog-Problem-with-urls-tp3726196p3732156.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: custom (non wicket) modal dialog. Problem with urls.
} catch (MalformedURLException e) { log.error(e); } catch (Exception e) { log.error(e); } return null; } } public boolean isResourceAvailable() { URLTester urlTester = URLTester.newInstance(); try { return urlTester.isReachable(urlTester.webProxyUrl(getUrl())); } catch (MalformedURLException e) { log.error(e); return false; } catch (Exception e) { log.error(e); return false; } } public abstract String getUrl(); public abstract String getContentType(); } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-non-wicket-modal-dialog-Problem-with-urls-tp3726196p3729050.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: custom (non wicket) modal dialog. Problem with urls.
Hi, I'm not sure I have fully understood your situation. You should have: 1- a page which opens a modal dialog via Javascript 2- another page which is rendered inside modal dialog 3- in this last page (the one inside modal window) you want a link to the page in background (the starting page) Is this right? Couldn't you get the url of target page using the same code used for modal dialog page? i.e.: comp.urlFor(TargetPageClass.class, params); Hello everyone, in our project i have to use our own modal dialog (application is included in a portal). I have to open the dialog with the help of a javascript function which is wrapped in a Behaviour. What i am doing now: - in the constructor of my response page i call the javascript function via a behaviour, so that immediately after the responsepage is rendered, the javascript function gets called and the modal dialog opens. - the javascript funtion accepts a url of the page that will be included in the dialog. In order to get the url i'm doing the this: URL for Page in Modal Dialog: ServletWebRequest servletWebRequest = (ServletWebRequest) comp .getRequest(); HttpServletRequest request = servletWebRequest.getHttpServletRequest(); String path = Strings.stripJSessionId(request.getRequestURI()); CharSequence urlFor = comp.urlFor(targetPageClass, params); String contextRelativePath = path + urlFor; Behaviour for opening the Modal Dialog: public class OpenModalDialogBehaviour extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = -127624955452459934L; private String url; public OpenModalDialogBehaviour(String url) { this.url = url; } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); ASPSession session = (ASPSession) ASPSession.get(); String js = "{if(" + session.isShowModalDialog() + "){top.showForm('" + url + " + ');}}"; tag.append("onload", js , " "); session.setShowModalDialog(false); } @Override protected void respond(AjaxRequestTarget target) { System.out.println("respond"); } } Now, my problem is, that the response page is the page in the background (deactivated by the modal-dialog-javascript- function), not the page of the modal dialog. Therefore the links in the page of my modal dialog are dead (the onclick functions never get called). What i need is some trick to calculate and set the urls for my modal dialog page manually, but i have no clue how to do this. Or maybe there is a much simpler solution? Thanks for any suggestions! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-non-wicket-modal-dialog-Problem-with-urls-tp3726196p3726196.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
custom (non wicket) modal dialog. Problem with urls.
Hello everyone, in our project i have to use our own modal dialog (application is included in a portal). I have to open the dialog with the help of a javascript function which is wrapped in a Behaviour. What i am doing now: - in the constructor of my response page i call the javascript function via a behaviour, so that immediately after the responsepage is rendered, the javascript function gets called and the modal dialog opens. - the javascript funtion accepts a url of the page that will be included in the dialog. In order to get the url i'm doing the this: URL for Page in Modal Dialog: ServletWebRequest servletWebRequest = (ServletWebRequest) comp .getRequest(); HttpServletRequest request = servletWebRequest.getHttpServletRequest(); String path = Strings.stripJSessionId(request.getRequestURI()); CharSequence urlFor = comp.urlFor(targetPageClass, params); String contextRelativePath = path + urlFor; Behaviour for opening the Modal Dialog: public class OpenModalDialogBehaviour extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = -127624955452459934L; private String url; public OpenModalDialogBehaviour(String url) { this.url = url; } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); ASPSession session = (ASPSession) ASPSession.get(); String js = "{if(" + session.isShowModalDialog() + "){top.showForm('" + url + " + ');}}"; tag.append("onload", js , " "); session.setShowModalDialog(false); } @Override protected void respond(AjaxRequestTarget target) { System.out.println("respond"); } } Now, my problem is, that the response page is the page in the background (deactivated by the modal-dialog-javascript- function), not the page of the modal dialog. Therefore the links in the page of my modal dialog are dead (the onclick functions never get called). What i need is some trick to calculate and set the urls for my modal dialog page manually, but i have no clue how to do this. Or maybe there is a much simpler solution? Thanks for any suggestions! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/custom-non-wicket-modal-dialog-Problem-with-urls-tp3726196p3726196.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: Wicket modal window example not working in IE8 on wicket-library.com
My IE version is: 8.0.6001.18702IS I'll take a look at the plugins. Chris >I just tested 8.0.7601.17514 and it worked. Maybe you have a local IE >plugin >that's interfering? > >On Sat, Jul 30, 2011 at 6:31 PM, Chris Colman >wrote: > >> Does anyone else have a problem in IE8 with this page. The links do not >> open up a modal window for me but under FF both links work fine. >> >> http://www.wicket-library.com/wicket-examples/ajax/modal-window >> >> I do have Javascript enabled :) on IE8 ! >> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket modal window example not working in IE8 on wicket-library.com
I just tested 8.0.7601.17514 and it worked. Maybe you have a local IE plugin that's interfering? On Sat, Jul 30, 2011 at 6:31 PM, Chris Colman wrote: > Does anyone else have a problem in IE8 with this page. The links do not > open up a modal window for me but under FF both links work fine. > > http://www.wicket-library.com/wicket-examples/ajax/modal-window > > I do have Javascript enabled :) on IE8 ! >
Wicket modal window example not working in IE8 on wicket-library.com
Does anyone else have a problem in IE8 with this page. The links do not open up a modal window for me but under FF both links work fine. http://www.wicket-library.com/wicket-examples/ajax/modal-window I do have Javascript enabled :) on IE8 !
Re: Calling wicket modal popup from non-wicket
That sounds like a good solution. Thanks! -nelson On Wed, Jan 19, 2011 at 3:53 PM, Igor Vaynberg wrote: > your best bet is to use a non-wicket modal and iframe a wicket page into > it. > > -igor > > On Wed, Jan 19, 2011 at 3:12 PM, Nelson Segura wrote: > > We are slowly migrating a JSP app to wicket. Parts of our app are written > in > > Wicket, but most of it is still JSP. > > We need to integrate some of the new wicket functionality into old JSP > > pages, as fragments or modal popups. There is a lot of functionality in > that > > page using JSP, so rewriting everything in wicket is not feasible. > > I would like to know if it is possible to call a wicket modal popup > window > > from the JSP (using the windows that map to a page), and how to do it. I > did > > look at the "herebebeasties" site already, and did not get much from > there > > regarding integrating wicket into JSP. > > -Nelson > > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Calling wicket modal popup from non-wicket
your best bet is to use a non-wicket modal and iframe a wicket page into it. -igor On Wed, Jan 19, 2011 at 3:12 PM, Nelson Segura wrote: > We are slowly migrating a JSP app to wicket. Parts of our app are written in > Wicket, but most of it is still JSP. > We need to integrate some of the new wicket functionality into old JSP > pages, as fragments or modal popups. There is a lot of functionality in that > page using JSP, so rewriting everything in wicket is not feasible. > I would like to know if it is possible to call a wicket modal popup window > from the JSP (using the windows that map to a page), and how to do it. I did > look at the "herebebeasties" site already, and did not get much from there > regarding integrating wicket into JSP. > -Nelson > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Calling wicket modal popup from non-wicket
We are slowly migrating a JSP app to wicket. Parts of our app are written in Wicket, but most of it is still JSP. We need to integrate some of the new wicket functionality into old JSP pages, as fragments or modal popups. There is a lot of functionality in that page using JSP, so rewriting everything in wicket is not feasible. I would like to know if it is possible to call a wicket modal popup window from the JSP (using the windows that map to a page), and how to do it. I did look at the "herebebeasties" site already, and did not get much from there regarding integrating wicket into JSP. -Nelson
Re: How to access div on wicket modal dialog
thats what i do...save lives :) -igor On Mon, Aug 2, 2010 at 12:50 PM, zoran wrote: > > Igor, > > You save my life :) > >>if you are using a panel and the markup is rendered in the same window >>it means your script is probably running too early. > > That is exactly what was the problem. > > I added > response.renderOnDomReadyJavascript(js); > > In AbstractBehavior RenderHead method, and everything works like it should > work. > > Thanks, > Zoran > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-access-div-on-wicket-modal-dialog-tp2310678p2310845.html > Sent from the Wicket - User 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
Re: How to access div on wicket modal dialog
Igor, You save my life :) >if you are using a panel and the markup is rendered in the same window >it means your script is probably running too early. That is exactly what was the problem. I added response.renderOnDomReadyJavascript(js); In AbstractBehavior RenderHead method, and everything works like it should work. Thanks, Zoran -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-access-div-on-wicket-modal-dialog-tp2310678p2310845.html Sent from the Wicket - User 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 access div on wicket modal dialog
if you open a page inside modal then the markup is in a different window so you have to make sure your jquery script executes in the right window. if you are using a panel and the markup is rendered in the same window it means your script is probably running too early. -igor On Mon, Aug 2, 2010 at 11:00 AM, zoran wrote: > > Hi, > > I'm using a wicket modal dialog with the panel that contains a div container > like > > > I want to access it from jQuery to create a jQuery UI slider like > $("#slider").slider(); > > For some reason, this doesn't work. Is there some reason related to wicket > that prevents this to find div container using its id, because the same > thing works fine when I use jQuery modal dialog instead of wicket modal > dialog? > > Zoran > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-to-access-div-on-wicket-modal-dialog-tp2310678p2310678.html > Sent from the Wicket - User 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
How to access div on wicket modal dialog
Hi, I'm using a wicket modal dialog with the panel that contains a div container like I want to access it from jQuery to create a jQuery UI slider like $("#slider").slider(); For some reason, this doesn't work. Is there some reason related to wicket that prevents this to find div container using its id, because the same thing works fine when I use jQuery modal dialog instead of wicket modal dialog? Zoran -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-access-div-on-wicket-modal-dialog-tp2310678p2310678.html Sent from the Wicket - User 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
obtain the wicket-modal id in java code
Hi all. I want to implement a fade effect for the wicket modal window. What I miss is the id of the div of the modal that has class="wicket-modal". The id of that div is generated dynamically. When this happens for a wicket Component I can get it in the code via the getId method but I do not have a reference in java code to the wicket-modal as a component. I have tryed to understand where the id is generated looking in the javascript code in ModalWindow class but I am not able to figure out where the id is generated. Can anyone help? Without the id I have to traverse the DOM and this can be difficoult to do in an easy way for all browser. At least, I think so, I am a little confused about xpath and javascript that is cross browser, I accept any kind of advice. Thanks. -- Daniele Dellafiore http://blog.ildella.net/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Modal Window - IFrame
Matej, Just to be clear - it's not that a modal window in Wicket App A is sourcing content from Wicket App B. It's that in this scenario Wicket App A has an generic iframe - not wicket produced - who's src is Wicket App B. The code here when run from B on modal creation pulls the Wicket.Window from A which I don't want. I want all modal content to be created in the iframe document that Wicket App B is sourced in. Wicket.Window.create = function(settings) { var win; if (typeof(settings.src) != "undefined" && Wicket.Browser.isKHTML() == false) { try { win = window.parent.Wicket.Window; } catch (ignore) { } } Matej Knopp-2 wrote: > > On Wed, Sep 3, 2008 at 10:13 PM, Shaun Thompson <[EMAIL PROTECTED]> wrote: >> I'm currently running into an issue with the wicket modal window. >> >> My situation is this. >> >> Wicket App A contains an IFrame sourcing Wicket App B. >> >> B has an Wicket IFrame modal window on one of it's pages. >> >> When Wicket.Window.create in modal.js is called from B, the >> Wicket.Window is pulled from window.parent.Wicket.Window which has >> been created in A. >> >> Now the remaining functions called on Wicket.Window are referencing >> functions from A modal.js >> >> This becomes a problem when the createDOM in modal.js is called. The >> div tag containing the modal html from B is created in A's document. >> The iframes src is relative so the content for the modal is not found. >> >> One solution is to have Wicket App B use WebRequestCodingStrategy and >> encode all it's url's from relative to absolute. This is not an >> optimal solution as I have no control over the multiple wicket apps >> that will be sourced in Wicket App A's iframe. >> >> Is there anyway to essentially namespace the Wicket.Window so B does >> not pick up A's objects? >> > I don't think so. And the modal window wasn't really meant to be able > to contain different/multiple applications. > > -Matej > >> Thanks >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Wicket-Modal-Window---IFrame-tp19297181p19301522.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Modal Window - IFrame
On Wed, Sep 3, 2008 at 10:13 PM, Shaun Thompson <[EMAIL PROTECTED]> wrote: > I'm currently running into an issue with the wicket modal window. > > My situation is this. > > Wicket App A contains an IFrame sourcing Wicket App B. > > B has an Wicket IFrame modal window on one of it's pages. > > When Wicket.Window.create in modal.js is called from B, the > Wicket.Window is pulled from window.parent.Wicket.Window which has > been created in A. > > Now the remaining functions called on Wicket.Window are referencing > functions from A modal.js > > This becomes a problem when the createDOM in modal.js is called. The > div tag containing the modal html from B is created in A's document. > The iframes src is relative so the content for the modal is not found. > > One solution is to have Wicket App B use WebRequestCodingStrategy and > encode all it's url's from relative to absolute. This is not an > optimal solution as I have no control over the multiple wicket apps > that will be sourced in Wicket App A's iframe. > > Is there anyway to essentially namespace the Wicket.Window so B does > not pick up A's objects? > I don't think so. And the modal window wasn't really meant to be able to contain different/multiple applications. -Matej > Thanks > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Modal Window - IFrame
I'm currently running into an issue with the wicket modal window. My situation is this. Wicket App A contains an IFrame sourcing Wicket App B. B has an Wicket IFrame modal window on one of it's pages. When Wicket.Window.create in modal.js is called from B, the Wicket.Window is pulled from window.parent.Wicket.Window which has been created in A. Now the remaining functions called on Wicket.Window are referencing functions from A modal.js This becomes a problem when the createDOM in modal.js is called. The div tag containing the modal html from B is created in A's document. The iframes src is relative so the content for the modal is not found. One solution is to have Wicket App B use WebRequestCodingStrategy and encode all it's url's from relative to absolute. This is not an optimal solution as I have no control over the multiple wicket apps that will be sourced in Wicket App A's iframe. Is there anyway to essentially namespace the Wicket.Window so B does not pick up A's objects? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Modal Window
could you attach your code? -- View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14151291 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Modal Window
I am using AjaxSubmitLink saveButton = new AjaxSubmitLink("saveButton", this) { and I have set setOutputMarkupId(true); and setEscapeModelStrings(false); But I am not able to display the message. Could you tell me the reasons for not displaying the message in script? michalb_cz wrote: > > > I had similar problem. I changed Button to AjaxButton and override > onError() > and everything was alright. Note that you must call > setOutputMarkupId(true) on > components which use in another ajax-enabled component (like AjaxButton > is..). > In case below I must call feedback.setOutputMarkupId(true) where feedback > = > new Feedback(""). > > like this: > > > Button btnOk = new AjaxButton("btnOk", form) { > > @Override > protected void onSubmit(AjaxRequestTarget target, Form > form) { > // something to do, when everything is ok and > valid... > } > > @Override > protected void onError(AjaxRequestTarget target, Form > form) { > target.addComponent(feedback); // show feedback > message in feedback > component > } > }; > > This works ok. > > > Edi wrote: >> >> >> I have displayed a Wicket modal window(pop-up). >> >> it contains one text box with button. >> >> I have done date validation, if i give wrong date in text box, I have set >> the message in label. >> >> But label have not displayed. >> >> Please explain... >> > > -- View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14148748 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket Modal Window
I had similar problem. I changed Button to AjaxButton and override onError() and everything was alright. Note that you must call setOutputMarkupId(true) on components which use in another ajax-enabled component (like AjaxButton is..). In case below I must call feedback.setOutputMarkupId(true) where feedback = new Feedback(""). like this: Button btnOk = new AjaxButton("btnOk", form) { @Override protected void onSubmit(AjaxRequestTarget target, Form form) { // something to do, when everything is ok and valid... } @Override protected void onError(AjaxRequestTarget target, Form form) { target.addComponent(feedback); // show feedback message in feedback component } }; This works ok. Edi wrote: > > > I have displayed a Wicket modal window(pop-up). > > it contains one text box with button. > > I have done date validation, if i give wrong date in text box, I have set > the message in label. > > But label have not displayed. > > Please explain... > -- View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14147964 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wicket Modal Window
I have displayed a Wicket modal window(pop-up). it contains one text box with button. I have done date validation, if i give wrong date in text box, I have set the message in label. But label have not displayed. Please explain... -- View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14131480 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]