Re: ModalDialog and returning back
Hi, Some things I would try are 1-Instead of a page use a panel for your modal. That way the page expired will not be shown on the page. 2-Make your page expired page the page you want to show. 3-AFAIK the method public void renderHead(IHeaderResponse response) { response.renderOnDomReadyJavascript(getWindowOpenJavascript()); } is the one determining the modal will be show on load. Yo can for instance use a more permanent cookie and don't call response.renderOnDomReadyJavascript(getWindowOpenJavascript()); depending on that condition. Regards, Melinda On Wed, Jun 6, 2012 at 1:04 PM, Alex zeita...@googlemail.com wrote: Dear All, I have an application that on renderOnDomReadyJavascript shows Modal Dialog for 5 seconds and then closes it. It is kind of Logo. Unfortunately if user goes to another site and returns back then “Page expired” is displayed in this Modal Dialog and it is not closes. Is it possible to avoid showing this Modal Dialog after user returns to my application pressing “Back” Button on the Browser or to show it properly for 5 sec. Thanks a lot in advance, Alex public class LogoStarter { private static final Logger log = LoggerFactory.getLogger(LogoStarter.class); public LogoStarter(final WebPage webPage) { final ModalWindow modalLogo; final ModalWindow modalInfo; webPage.add(modalLogo = new OpenOnLoadModalWindow(modalLogo)); modalLogo.setTitle(); modalLogo.setPageCreator(new ModalWindow.PageCreator() { private static final long serialVersionUID = 2674999186672458996L; public Page createPage() { return new Logo(); } }); webPage.add(new AjaxLinkObject(logo) { public void onClick(AjaxRequestTarget target) { if (target != null) { modalLogo.show(target); } else { System.out.println(JS off); setResponsePage(new Logo(JS_OFF_MSG)); } } }); webPage.add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) { protected void onTimer(AjaxRequestTarget target) { if (modalLogo.isShown()) modalLogo.close(target); stop(); } }); } } public class OpenOnLoadModalWindow extends ModalWindow implements IHeaderContributor { public OpenOnLoadModalWindow(String id) { super(id); } public OpenOnLoadModalWindow(String id, IModel? model) { super(id, model); } public void renderHead(IHeaderResponse response) { response.renderOnDomReadyJavascript(getWindowOpenJavascript()); } protected boolean makeContentVisible() { return true; } }
Re: How to redirect to a page from an AJAX request?
IFAIK setResponsePage(Page.class) should work: at least I remember using it successfully on an AJAX request cycle to redirect to a different page. Regards, Melinda On Tue, May 22, 2012 at 2:41 AM, Alec Swan alecs...@gmail.com wrote: Hello, I use AjaxSubmitLink to submit a form that has captcha. I refresh captcha by adding it to ajax request. However, when the user successfully submits the form I want to redirect the user to a different page. I tried setResponsePage and throw new RestartResponseException in AjaxSubmitLink#onSubmit, but they seem to have no effect. How can I redirect the user to a page from an ajax request? Thanks, Alec - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Modal Window without ajaxTarget
See https://cwiki.apache.org/WICKET/modal-windows.html Opening a modal window on page load (no AJAX involved)Regards. Melinda On Wed, May 16, 2012 at 4:21 PM, toytown prasanna.tulad...@gmail.comwrote: I would like to show the modal window without using a AjaxRequestTarget add(newAjaxFallbackLinkVoid(localAreaSelection) { private static final long serialVersionUID = 5507632714061994338L; @Override public void onClick(AjaxRequestTarget target) { modalWindow.show(target); --- do not want ajax target } }); Is there a way to show ModalWindow unlike in the above code -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Modal-Window-without-ajaxTarget-tp4641432.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 parameters
Have you tried AjaxRequestTarget.get()? If you are in a middle of an AJAX request cycle it should give you the request target. Regards, Melinda. On Tue, May 1, 2012 at 2:51 PM, Brian Mulholland blmulholl...@gmail.comwrote: I am popping up a modal window when an ajax event fires. The event has a parameter of which key the user selected. I know I can get the parameters from the AjaxRequestTarget in the onClick event, but in ModalWindow.PageCreator.createPage(), how can I get the parameters so that I can load the right record into the popup? Brian Mulholland For every complex problem, there is an answer that is clear, simple and wrong. --H.L. Mencken Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies. --Groucho Marx - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: FilterForm Date column formatting
I think the problem is markup for cells is a span. You need to create a panel wicket:panel input wicket:id=dateField/ /wicket:panel .. Your date file code and add that panel to table cell. Regards, Melinda On Thu, Apr 26, 2012 at 8:48 AM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, Yes, sorry for that. --- Last cause: Component [cell] (path = [5:datatablecontainer:filterForm:datatable:body:rows:1:cells:3:cell]) must be applied to a tag of type [input], not: '' (line 0, column 0) Markup The problem is in jar:file:/X:/mavenrepo/org/apache/wicket/wicket-extensions/1.5.5/wicket-extensions-1.5.5.jar!/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html: [cell] -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589021.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: FilterForm Date column formatting
Can't use a conditional statement? If filter add panel if not call super.populateItem? On Thu, Apr 26, 2012 at 11:36 AM, Sandor Feher sfe...@bluesystem.hu wrote: Hi, If I do it in this way, then all of my cells in that column will change to input textfield. But I only want to change the cell which in the filter form row. Regards, Sandor -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589323.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: SSL Links and buttons
Can you try using form wicket:id=form method=get /form E.M.D On Wed, Oct 20, 2010 at 9:05 AM, sonxurxo sonxu...@gmail.com wrote: Hi Igor, thank you for your response. I tried what you pointed. The action URL in the form is correctly replaced, since I can see it with Firebug. And even Wicket receives the request when pressing the submit button, but it fails on validating required fields: it does not receive the values, neither with theFormField.getInput() (returns ) nor theFormField.getDefaultModelObjectAsString() (returns null). Just in case it matters, I'm trying it both with Jetty (http port:9090, https port:8443) and with Tomcat (http port:80 -with mod_jk, https port:443), so I modified the onComponentTag method you post and my SecureForm class now looks like: public class SecureFormT extends FormT { public SecureForm(String id) { super(id); } @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); String action = tag.getAttribute(action); action = RequestUtils.toAbsolutePath(action); action = https + action.substring(4); action = action.replace(MyApplication.get().getHttpPort(), MyApplication.get().getHttpsPort()); tag.put(action, action); } } but that modification doesn't seem to be a problem since the action URL looks OK in both cases (the port number is well replaced). Debugging with Firebug I can see that the field values are correctly sent by POST. More possible important info: the form is included in a Page that is NOT annotated with @RequireHttps. Am I missing something? Any ideas? Thank you in advance. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SSL-Links-and-buttons-tp3001634p3003364.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
page over HTTP with sign in panel over HTTPs
Hi, I has the following use case: I have some public pages (should be served over HTTP) containing a sign in panel which must be submitted over HTTPs. I have though of doing this as follows: -use an iframe to host the sign in panel: actually it would be a page served over HTTPs to the iframe. -once the user signs in serve a page to the iframe that contains JavaScript to get parent page to be redirected to the private area (served over HTTPs). I do not tried the above but I assume it might work. My question is if there is a cleaner/cleverer way to do this in wicket? Thanks in advance, Melinda
Re: page over HTTP with sign in panel over HTTPs
Martin, Thanks for your answer! Yes, I know about that class: my questions was more how to have a form submitted over HTTPs on a page served over HTTP. Regards, Ernesto On Fri, Oct 8, 2010 at 5:34 PM, Martin Grigorov mgrigo...@apache.orgwrote: See org.apache.wicket.protocol.https.HttpsRequestCycleProcessor On Fri, Oct 8, 2010 at 11:44 AM, Melinda Dweer melinda.dw...@gmail.com wrote: Hi, I has the following use case: I have some public pages (should be served over HTTP) containing a sign in panel which must be submitted over HTTPs. I have though of doing this as follows: -use an iframe to host the sign in panel: actually it would be a page served over HTTPs to the iframe. -once the user signs in serve a page to the iframe that contains JavaScript to get parent page to be redirected to the private area (served over HTTPs). I do not tried the above but I assume it might work. My question is if there is a cleaner/cleverer way to do this in wicket? Thanks in advance, Melinda
Re: page over HTTP with sign in panel over HTTPs
I will give it a try. Thanks! Melinda On Fri, Oct 8, 2010 at 5:51 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote: you can try tweaking the form so that its action is https, so class httpsform extens form { oncomponenttag(tag) { super.oncomponenttag(tag); string action=tag.get(action); action=requestutils.toabsoluteurl(action); action=https+action.substring(4); tag.put(action, action); }} -igor On Fri, Oct 8, 2010 at 2:44 AM, Melinda Dweer melinda.dw...@gmail.com wrote: Hi, I has the following use case: I have some public pages (should be served over HTTP) containing a sign in panel which must be submitted over HTTPs. I have though of doing this as follows: -use an iframe to host the sign in panel: actually it would be a page served over HTTPs to the iframe. -once the user signs in serve a page to the iframe that contains JavaScript to get parent page to be redirected to the private area (served over HTTPs). I do not tried the above but I assume it might work. My question is if there is a cleaner/cleverer way to do this in wicket? Thanks in advance, Melinda - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org