Re: onload event on img-tag
Hi, Do something like: img = new NonCachingImage(...); img.add(new AttributeModifier("onload", "yourStuffHere")); form.add(img); On Mon, May 28, 2012 at 1:21 AM, Pasithee Jupiter wrote: > Hi all > > > How can i add the onload attribute to an image? or is it possible to > prevent wicket overwriting html attributes on the img-tag? > > > In my HTML I have a form, and inside the form an img and several input > fields and a button. Click on the button triggers an ajax request and > returns new form values and a new NonCachingImage. So my goal is to run > some javascript after the image is loaded means onload="javascript:abc();">. How can I do that with wicket? > > > Thanks a lot -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Getting more stale page exception in wicket 1.5.6
Hi, By default Wicket recreates the page when StalePageException occurs. It wont recreate the page only if you handle this exception yourself in IRequestCycleListener#onException(). The more interesting problem is why you get warnings like: WARN: org.apache.wicket.request.handler.request.WebPageRenderer - The Buffered response should be handled by BufferedResponseRequestHandler. This means that BufferedResponseMapper doesn't work for some reason. Put a breakpoint in BufferedResponseMapper#mapRequest() and click on the link. On Mon, May 28, 2012 at 9:26 AM, sudeivas wrote: > Thanks for the information. But is there any way to prevent this exception or > is there any way to recreate the page if this exception occurs? > > Thanks, > Suresh > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649513.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Make additional actions on click on external links
Hello, How can I make additional actions on click event on external link? It doesn't implement onClick method. Thanks. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-additional-actions-on-click-on-external-links-tp4649516.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: Make additional actions on click on external links
You could use e.g. jQuery event registration: $("#target").click(function() { alert("Handler for .click() called."); }); See http://api.jquery.com/click for more details. -Tom on 28.05.2012 at 11:09 cosmindumy wrote: > Hello, > How can I make additional actions on click event on external link? It > doesn't implement onClick method. > Thanks. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Make additional actions on click on external links
Thanks for reply. I solved. I added a behaviour with onclick event. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Make-additional-actions-on-click-on-external-links-tp4649516p4649518.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: Problem in adding user confirmation feature by wicket way...
Please help me out here...I dont want to use javascript to get user confirmation... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-in-adding-user-confirmation-feature-by-wicket-way-tp4649510p4649523.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: Getting more stale page exception in wicket 1.5.6
Hello Martin, I am handling couple of other exceptions in my application. Below is my code, getRequestCycleListeners().add(new AbstractRequestCycleListener() { @Override public IRequestHandler onException(final RequestCycle requestCycle, final Exception e) { LOGGER.error(e.getMessage(), e); Throwable cause = e; if (cause instanceof RedirectToUrlException) { return new RedirectRequestHandler(Constants.MENU_URL); } else if (cause instanceof ListenerInvocationNotAllowedException) { //catching this because auto-refresh is having some issue when the timer is stopped //need to find some way to remove this return new RenderPageRequestHandler(new PageProvider(ProblemIndexPage.class)); } String uniqId = UUID.randomUUID().toString(); LOGGER.error("ERROR UUID : " + uniqId); //redirect to the default error page return new RenderPageRequestHandler(new PageProvider(DefaultErrorPage.class)); } Will the above code block wicket to recreate the page when StalePageException occurs? If yes, how can I handle specific runtime exceptions. Thanks, Suresh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649524.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: Getting more stale page exception in wicket 1.5.6
On Mon, May 28, 2012 at 6:26 PM, sudeivas wrote: > Hello Martin, > I am handling couple of other exceptions in my application. Below > is my code, > > getRequestCycleListeners().add(new AbstractRequestCycleListener() { > @Override > public IRequestHandler onException(final RequestCycle > requestCycle, final Exception e) { > LOGGER.error(e.getMessage(), e); > Throwable cause = e; > if (cause instanceof RedirectToUrlException) { > return new RedirectRequestHandler(Constants.MENU_URL); > } else if (cause instanceof > ListenerInvocationNotAllowedException) { > //catching this because auto-refresh is having some > issue when the timer is stopped > //need to find some way to remove this > return new RenderPageRequestHandler(new > PageProvider(ProblemIndexPage.class)); > } > String uniqId = UUID.randomUUID().toString(); > LOGGER.error("ERROR UUID : " + uniqId); > > //redirect to the default error page > return new RenderPageRequestHandler(new > PageProvider(DefaultErrorPage.class)); Here you return your error page for any exception that you don't handle earlier. You better return null in this case. Wicket will use IApplicationSettings.getInternalErrorPage() if the exception is due to a problem in your application. > } > > Will the above code block wicket to recreate the page when > StalePageException occurs? If yes, how can I handle specific runtime > exceptions. > > Thanks, > Suresh > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649524.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Pretty URLs for AjaxLazyLoadPanel
Hi, Only pages may have "pretty" urls. AjaxLazyLoadPanel is a component and it should be used inside a page. Additionally it needs to find the exact page instance. Read about stateful components for more info. What is your use case ? Why you need to make requests to an Ajax component ? It is possible to mount a component by mounting a custom IRequestMapper that returns ComponentRenderingRequestHandler in its #mapRequest() method but the result will be just the markup of the component, e.g. But I cannot guarantee that this will work because AjaxLazyLoadPanel needs to contribute some JavaScript to be able to work and there wont be in this response ... On Fri, May 25, 2012 at 9:01 PM, kevjay wrote: > I'm using AjaxTabbedPanel and AjaxLazyLoadPanel. How do I make the URLs for > the individual panels the way I want? Right now, a link to a specific panel > looks like > http://localhost:/?1-1.ILinkListener-tabs-tabs~container-tabs-2-link. > How do I make it something like http://localhost:/myTab2? I cannot seem > to find a way. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Pretty-URLs-for-AjaxLazyLoadPanel-tp4649499.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 > -- Martin Grigorov jWeekend Training, Consulting, Development http://jWeekend.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Getting more stale page exception in wicket 1.5.6
I will change to the below code, getRequestCycleListeners().add(new AbstractRequestCycleListener() { @Override public IRequestHandler onException(final RequestCycle requestCycle, final Exception e) { LOGGER.error(e.getMessage(), e); Throwable cause = e; if (cause instanceof RedirectToUrlException) { return new RedirectRequestHandler(Constants.MENU_URL); } else if (cause instanceof ListenerInvocationNotAllowedException) { //catching this because auto-refresh is having some issue when the timer is stopped //need to find some way to remove this return new RenderPageRequestHandler(new PageProvider(ProblemIndexPage.class)); } String uniqId = UUID.randomUUID().toString(); LOGGER.error("ERROR UUID : " + uniqId); return null; } and then getApplicationSettings().setInternalErrorPage(DefaultErrorPage.class); getExceptionSettings().setUnexpectedExceptionDisplay(IExceptionSettings.SHOW_INTERNAL_ERROR_PAGE); By this way, I believe I redirect only if exception is RedirectToUrlException & ListenerInvocationNotAllowedException. For other runtime exceptions like StalePageException, PageExpiredException, ComponentNotFoundException I believe wicket will try to re-create the page. For any other runtime exception (eg. null pointer exception), wicket will show internal error page. Please correct me if I am missing something. Thanks, Suresh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Getting-more-stale-page-exception-in-wicket-1-5-6-tp4649492p4649527.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