Re: wicket abort ajax handling of multipart form when the server is stopped
Sorry that I missed to mention the browser. Thanks for the quick help. Do we have any schedule for the next wicket-7 release? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-abort-ajax-handling-of-multipart-form-when-the-server-is-stopped-tp4670076p4670084.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 abort ajax handling of multipart form when the server is stopped
in normal case, I have tested that wicket ajax multipart form submit event can be triggered properly in this sequence onbefore onprecondition onbeforesend onafter onsucess oncomplete but when the server is stopped and the same ajax multipart form is submitted, only these events are triggered onbefore onprecondition onbeforesend onafter i.e. the onfaliure, oncomplete are not called and the browser is just hanged and the wicket js is waiting forever for load.handleMultipartComplete from the upload iframe, i.e. this ajax form submit is not completed and further ajax event will be just queued from the firebug console, the iframe html can be found as: the html inside the iframe simply means Connection Error so how can I proceed to handle this problem? -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/wicket-abort-ajax-handling-of-multipart-form-when-the-server-is-stopped-tp4670076.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 cache the html output of a panel?
we have tried the best to cache the backing model (or data) and we are always looking how to push our performance to a limit it seems we are hitting the limit now, instead we go to refactor/revamp a lot, we want to see if we can do anything on wicket such as caching the generated html that can help Jeremy Thomerson-5 wrote: This topic has been covered many times here on the list. The result is that you almost never really need to cache the generated HTML, but rather the loading of the backing model. Are you really sure that you need to cache the generated HTML? -- Jeremy Thomerson http://www.wickettraining.com On Thu, May 21, 2009 at 5:30 AM, TSANG Yiu Wing ywts...@gmail.com wrote: any hint that can help to apply caching on the html output of a panel? the panel is dynamic in nature, no ajax, i.e. stateless by itself, and is unique per url but needs some time to generate so i want to cache the html output of this panel - 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 -- View this message in context: http://www.nabble.com/how-to-cache-the-html-output-of-a-panel--tp23650923p23662724.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
request time logging with application and network time disguished
we are trying to do logging on the request time to check the application processing time and the request output network time we first try to time the request processing by overriding WebRequestCycle#onBeginRequest, #onEndRequest but it seems the processing time is the same as the request time logged at tomcat, i.e. it includes both application+request output network time can i log the application time, isolating the request output network time? i check that i am using IRequestCycleSettings.RenderStrategy REDIRECT_TO_BUFFER, by which the IRequestCycleSettings.RenderStrategy class javadoc says: * bufferResponse (defaults to true) - True if the application should buffer responses. This * does require some additional memory, but helps keep exception displays accurate because the whole * rendering process completes before the page is sent to the user, thus avoiding the possibility of * a partially rendered page. so we can time the whole wicket rendering process (the application logic) before sending out to the client? can anyone point out where i can add the timing by myself? if wicket does not have an easy extension point here, i can just go to the code and compile for my use myself many thanks -- View this message in context: http://www.nabble.com/request-time-logging-with-application-and-network-time-disguished-tp22530747p22530747.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: question about adding synchronized on mountsOnPath at WebRequestCodingStrategy
i don't have concrete stress test results to support if this synchronized hurts the performance badly but instead i was trying to throw a question on the code to see if it is necessary to use synchronized at the case (in fact, i don't support adding mount paths dynamically during runtime, so it is just read-only and not necessary to have it synchronized) btw, i also find other places in the codes have the similar situation , e.g. WebRequestCodingStrategy#getMountEncoder and if there are too much unnecessary synchronized codes, i think it hurts Thomas Mäder-2 wrote: Root of all evil! Root of all evil! ;-) On Thu, Feb 12, 2009 at 6:41 PM, Johan Compagner jcompag...@gmail.comwrote: And for 1.4+ we could make that map concurrent if that isnt already the case -- Thomas Mäder Wicket Eclipse Consulting www.devotek-it.ch -- View this message in context: http://www.nabble.com/question-about-adding-%22synchronized%22-on-mountsOnPath-at-WebRequestCodingStrategy-tp21970542p21988196.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
question about adding synchronized on mountsOnPath at WebRequestCodingStrategy
at 1.3.5 class: org.apache.wicket.protocol.http.request.WebRequestCodingStrategy method: urlCodingStrategyForPath the variable mountsOnPath is synchronized is this necessary? because the WebRequestCodingStrategy is initialized once by request cycle processor, which in turns is shared by all requests (i read this at Wicket In Action) so synchornized the mountsOnPath can produce a big lock contention problem if we have many requests at the same time? -- View this message in context: http://www.nabble.com/question-about-adding-%22synchronized%22-on-mountsOnPath-at-WebRequestCodingStrategy-tp21970542p21970542.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: Turn off form validation
i also have a similar use case that requires turning off validation for some ajax button links e.g. i have a form, that may have some text fields with different/none validators and i want to do translation on some of the text fields by ajax/dynamically, so i need to use ajax button links to submit the form with the latest input values to backend logic for this case, we want to supress the validation error (if any) and have wicket to still propagate the form fields to our model automatically we can't use setdefaultformprocess to false for the ajax button link so i go to have a look at the form processing, and copy the wicket's form property propagation logic to my form's onerror: code @Override protected void onError() { // just for demonstration, can make it happen only for certain cases only // before updating, call the interception method for clients beforeUpdateFormComponentModels(); // Update model using form data updateFormComponentModels(); // Persist FormComponents if requested // private, can't call // persistFormComponentData(); super.onError(); } /code there may be problem in propagating the form fields to model if there is validation error, but it looks ok to me because the form fields with no validation error should still get their values submitted and propagated nicely, event some other form fields may have validation error noon wrote: I solved similar problem where I had some required TextField components and an AJAX component which does a AJAX submit. During this AJAX submit I wanted to prohibit all the form validations. I achieved this by setting the AJAX components (an autocomplete TextField with custom AJAX behaviour) into its own nested form... form which is inside another form. I'm not sure does this solve your problem. I found my solution just by trying differend solutions and it worked :) hbf wrote: I have a custom component that allows the user to select one or more tags. For this, the component has a text field and an AjaxButton Add to add a tag. All works fine if I use the component in a form without validation errors. If, however, a text field has setRequired(true), the AjaxButton's onSubmit() method is not called (but onError() instead). In this case, I do not want this behaviour but want form validation to be disabled for the Add AjaxButton. (I still need to get the model values updated, though.) Is there an easy way to achieve this? I've read about conditional validation, http://cwiki.apache.org/WICKET/conditional-validation.html but as my component does not know about the enclosing form, I am looking for another solution. Many thanks, Kaspar - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Turn-off-form-validation-tp21090395p21265480.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: Release date for 1.3.5?
as i also want to know the release schedule of 1.3.5, after searching the mail list, it seems this thread is the latest about the topic, so i bring this thread up again do we have a planned schedule for 1.3.5? thanks Jörn Zaefferer-2 wrote: Hi, is there a release date planned for 1.3.5? There are important updates in trunk, like protection against CSRF (https://issues.apache.org/jira/browse/WICKET-1782). If there isn't a date yet, what needs to be done to get one? Regards Jörn -- View this message in context: http://www.nabble.com/Release-date-for-1.3.5--tp19368299p19601665.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]
calculate the request-only-process time
we want to calculate the time to process the request , excluding the response stream time e.g. 1) request received at tomcat - 2) wicket filter - 3) business + wicket rendering logic - 4) response streaming we want the time of steps 2+3, we try to count the time use the method onBeginRequest, onEndRequest at our custom WebRequestCycle but it is found that the onEndRequest should be called after the response is completed to send to the client (i.e. similar to the tomcat request time counting) so any suggestion to count the request-only-process time? -- View this message in context: http://www.nabble.com/calculate-the-request-only-process-time-tp19264621p19264621.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: how to mark wicket html response as cacheable?
thanks how about skipping the content rendering? i.e. how to just make the web page's response to include the headers only? jWeekend wrote: One way is to override WebPage's setHeaders(WebResponse response) method and call setHeader on the passed in WebResponse. Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk ywtsang wrote: i want to set my html with last modified date in order to allow client side caching how can we do that in wicket? or we need to manipulate the response header directly? -- View this message in context: http://www.nabble.com/how-to-mark-%22wicket-html-response%22-as-%22cacheable%22--tp19248592p19249443.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: how to mark wicket html response as cacheable?
yes, our pages basically are dynamic as the pages contain ajax component we plan to do that for the optimization of non-javascript clients like crawlers we try to define a page modification logic and implement the 304 not modified in order to save the bandwidth or so if it is not supported by wicket now, we will look for our solution, thanks Johan Compagner wrote: Why would you do that? That should only be done in a head request. But currently i dont think we have support for webpages last modified request at the moment. Problem is that wickets pages are really dynamic, make sure that yours are really static dont use ajax and that stuff on them because if a browser really caches stuff i dont know if then everything is always in sync. On 9/1/08, ywtsang [EMAIL PROTECTED] wrote: thanks how about skipping the content rendering? i.e. how to just make the web page's response to include the headers only? jWeekend wrote: One way is to override WebPage's setHeaders(WebResponse response) method and call setHeader on the passed in WebResponse. Regards - Cemal http://www.jWeekend.co.uk http://jWeekend.co.uk ywtsang wrote: i want to set my html with last modified date in order to allow client side caching how can we do that in wicket? or we need to manipulate the response header directly? -- View this message in context: http://www.nabble.com/how-to-mark-%22wicket-html-response%22-as-%22cacheable%22--tp19248592p19249443.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/how-to-mark-%22wicket-html-response%22-as-%22cacheable%22--tp19248592p19264551.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]
how to mark wicket html response as cacheable?
i want to set my html with last modified date in order to allow client side caching how can we do that in wicket? or we need to manipulate the response header directly? -- View this message in context: http://www.nabble.com/how-to-mark-%22wicket-html-response%22-as-%22cacheable%22--tp19248592p19248592.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: strange ajax hang-up problem at IE6, windows 98
thanks we also only can reproduce the enviornment using vmware for the problem OS, it is reported came from our customer, so we can just go to fix them for now, we have a very dirty fix and will check with the customer to see if it works Matej Knopp-2 wrote: Hi, You can create a jira issue for it, unfortunately I don't think I'll be able to try to reproduce it as I don't have any machine with W98 + IE6 around. Who does use that anyway? Last time I checked it was 2008... (Anyway, even for Windows 98 there are bunch of browsers available that are way better than IE6) -Matej On Thu, Aug 28, 2008 at 2:03 PM, ywtsang [EMAIL PROTECTED] wrote: at windows 98 , IE6, when i click an ajax link, it can fire the request to server, and server has processed and completed sending the request but the browser still hang up or waiting, until i click somewhere at the page, then the wicket ajax action will then proceed it happens only at windows 98 +IE6; we have no problem in other combination of browsers and new-er windows also, it happens only at the ajax link, but not other ajax event like on change of select box we suspect that some handlers at the steps hang up, but can't solve that here is the log from the wicket debug window: INFO: Response parsed. Now invoking steps... wait wait wait hang up here... until i click somewhere at the page INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: last focus id was not set -- View this message in context: http://www.nabble.com/strange-ajax-hang-up-problem-at-IE6%2C-windows-98-tp19199143p19199143.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/strange-ajax-hang-up-problem-at-IE6%2C-windows-98-tp19199143p19217767.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]
strange ajax hang-up problem at IE6, windows 98
at windows 98 , IE6, when i click an ajax link, it can fire the request to server, and server has processed and completed sending the request but the browser still hang up or waiting, until i click somewhere at the page, then the wicket ajax action will then proceed it happens only at windows 98 +IE6; we have no problem in other combination of browsers and new-er windows also, it happens only at the ajax link, but not other ajax event like on change of select box we suspect that some handlers at the steps hang up, but can't solve that here is the log from the wicket debug window: INFO: Response parsed. Now invoking steps... wait wait wait hang up here... until i click somewhere at the page INFO: Response processed successfully. INFO: Invoking post-call handler(s)... INFO: last focus id was not set -- View this message in context: http://www.nabble.com/strange-ajax-hang-up-problem-at-IE6%2C-windows-98-tp19199143p19199143.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: Discussion on Wicket Interface Speed-Up
nice we are also taking efforts in optimizing the webapp as we serve the resources (images/css/js) using 3rd content provider, our approach is different from your wicket-focus turning; but it indeeds give me some insight, thanks we also want to merge the css/js files, but after thinking carefully, it can't work for us because we are using header contribution at different panels, it is very flexible for the designers to split the css/js files according to the panel and they like it very much for the flexibility, maintainability and reusability however, since a panel can hide/show dynamically for the same url in different times (though not common, but we can't avoid that), that means we can't simply merge different css/js files from different panels for the given page Stefan Fußenegger wrote: I just finished the 4th and last entry of my series Wicket Interface Speed-Up on my blog. To give a short summary: I investigated one of my apps with YSlow and started optimizing it's interface rendering speed [1]. Especially Wicket's way of handling resources, i.e. JS and CSS files, causes interfaces to load rather slowly. In my articles, I explain how to modify the cache interval [2], how to mount resources with a version (e.g. /css/all-1234.css) in order to use aggressive client-side caching (e.g. resources expire after a year) [3]. Finally, I show how to merge resources at application startup (using a class classed MergedResourceStream) to reduce the number of resources a client has to download [4], including code). I was able to increase interface loading times considerably, so it's surely worth a look. I feel that it would also be worth to discuss, whether this work could be part of upcoming Wicket versions. For the time being I'd like to make the code attached to [4] a wicketstuff project - sfussenegger needs commit access ;) - and wait for your feedback. The links: [1] http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up.html Wicket Interface Speed-Up [2] http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up-modifying.html Wicket Interface Speed-Up: Modifying Expires and Cache-Control Headers [3] http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up-caching.html Wicket Interface Speed-Up: Caching Resources Forever [4] http://talk-on-tech.blogspot.com/2008/08/wicket-interface-speed-up-merging.html Wicket Interface Speed-Up: Merging Resources for Fewer HTTP Requests -- View this message in context: http://www.nabble.com/Discussion-on-%22Wicket-Interface-Speed-Up%22-tp19197540p19212465.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]
change the mountpath of wicket request
currently all wicket request at mounted at root, e.g. /?wicket:interface can we change it to mount at different place like /customer/?wicket:interface -- View this message in context: http://www.nabble.com/change-the-%22mountpath%22-of-wicket-request-tp17775860p17775860.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]
configure the expire header value
how to configure expire header value for wicket resources like indicator.gif wicket js etc ? and, if we can set the expire to long time away, can wicket name the resources with version according to wicket release version? -- View this message in context: http://www.nabble.com/configure-the-%22expire%22-header-value-tp17598027p17598027.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]
change wicket resource (js) path
how can i change the wicket resource (e.g. wicket ajax js) path? i want to change it to point to our content server rather than to the web server -- View this message in context: http://www.nabble.com/change-wicket-resource-%28js%29-path-tp17511746p17511746.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: client side handling of ajax request session expiration
the implementation of js failure handler does not work for the case (from tracing the js codes) i guess it is because the ajax session expire exception thrown to the client contains redirect path information, by which wicket just use this redirect path and ignore the failure handler and i have come up a quick solution: override the method WebRequestCycleProcessor (i.e. need to register your custom processor) code public IRequestTarget resolve(RequestCycle requestCycle, RequestParameters requestParameters) { try { return super.resolve(requestCycle, requestParameters); } catch (RuntimeException re) { if (re instanceof PageExpiredException) { if (((WebRequestCycle) requestCycle).getWebRequest().isAjax()) { // return a custom ajax request that only contains failure handle js /* AjaxRequestTarget art = new AjaxRequestTarget(null); art.appendJavascript(your failure handler js); return art; */ } } throw re; } } /code Markus Strickler wrote: Hi- not sure if this helps in your case, but if you define the wicketGlobalFailureHandler() JavaScript function, it will be called if your ajax request fails (because of page expiration or any other reason). Or use Wicket.Ajax.registerFailureHandler(function() { ...}) (but I never tried that myself). -markus Am 17.04.2008 um 13:01 schrieb ywtsang: we want to handle session expiration exception triggered by an ajax request since the session is expired, the ajax request can't be forwarded to the corresponding ajax behavior, instead, the server throw session expiration exception (we have configured the handling by getApplicationSettings().setPageExpiredErrorPage) the handling is ok for non-ajax request, but not ajax request we want to handle that using client side javascript how can we achieve that? -- View this message in context: http://www.nabble.com/client-side- handling-of-ajax-request-session-expiration-tp16743324p16743324.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16824188.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: client side handling of ajax request session expiration
right, we have implemented the keep alive timer as well but still, we also want to handle the ajax expiration exception at client side, because we discovered that we can't preserve the session if the server is restarted Erik van Oosten wrote: Hi Ywtsang, Not an answer to your question, but you can also consider using a ajax timer to keep the session alive. For example as outlined in http://chillenious.wordpress.com/2007/06/19/how-to-create-a-text-area-with-a-heart-beat-with-wicket/. Regards, Erik. ywtsang wrote we want to handle session expiration exception triggered by an ajax request since the session is expired, the ajax request can't be forwarded to the corresponding ajax behavior, instead, the server throw session expiration exception (we have configured the handling by getApplicationSettings().setPageExpiredErrorPage) the handling is ok for non-ajax request, but not ajax request we want to handle that using client side javascript how can we achieve that? -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16762728.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]
captcha image random display problem
i use the captcha image, but sometime the image shows incompletely e.g. it does not show the full image, it is just chopped it happened randomly my form also have an ajax link to allow refresh the captcha immediately if i click the ajax link to refresh the image , the image chops randomly with random extent, to the worst, sometime it shows broken image both jetty/tomcat can have the above problem any hint that can help further trouble shoot the problem? -- View this message in context: http://www.nabble.com/captcha-image-random-display-problem-tp16763427p16763427.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: client side handling of ajax request session expiration
thanks, having proper setup of clustering with session replication should be the correct way to go in long term but for this stage, we are restricted to solve the problem at application level our application can afford to have ajax session expire if we restart our server(s) occasionally, but we want to handle that ajax session expire exception gracefully at client side can we hack the wicket codes (java/js) that can intercept the ajax session expiration? any class/pointer that i should look at? Erik van Oosten wrote: ywtsang wrote: because we discovered that we can't preserve the session if the server is restarted Ah, I understand. Well, you could if you use a servlet container that support this, or if you use Terracotta. Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16767350.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: captcha image random display problem
we are using wicket 1.3.1 Jonathan Locke wrote: i think i've seen this before too at some point. what wicket version? ywtsang wrote: i use the captcha image, but sometime the image shows incompletely e.g. it does not show the full image, it is just chopped it happened randomly my form also have an ajax link to allow refresh the captcha immediately if i click the ajax link to refresh the image , the image chops randomly with random extent, to the worst, sometime it shows broken image both jetty/tomcat can have the above problem any hint that can help further trouble shoot the problem? -- View this message in context: http://www.nabble.com/captcha-image-random-display-problem-tp16763427p16767377.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]
client side handling of ajax request session expiration
we want to handle session expiration exception triggered by an ajax request since the session is expired, the ajax request can't be forwarded to the corresponding ajax behavior, instead, the server throw session expiration exception (we have configured the handling by getApplicationSettings().setPageExpiredErrorPage) the handling is ok for non-ajax request, but not ajax request we want to handle that using client side javascript how can we achieve that? -- View this message in context: http://www.nabble.com/client-side-handling-of-ajax-request-session-expiration-tp16743324p16743324.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]
fail to check HttpServletRequest.isSecure under tomcat
i have configured the tomcat (6.0.13) to use SSL when i access my app under https and try to check the HttpServletRequest.isSecure (the http servlet request is retrieved from RequestCycle.get()), it always returns false (i have already configured the tomcat connector to returns true for the secure attribute) i don't know if it relates to wicket, but want to see if i can get any hint for this problem if somebody here is successful in using wicket+tomcat for this case -- View this message in context: http://www.nabble.com/fail-to-check-HttpServletRequest.isSecure-under-tomcat-tp16603545p16603545.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]
ajax error handling on server side exception
i can sucecssfuly use getFailureScript to act against the client-side ajax error, i.e the server is down and ajax request is sent with failure can we have similar facility for server-side exception upon ajax request? e.g. for now, if the server throw exception during onevent of an ajax request, the response will trigger a redirect to error page, we want to re-use something similar to getFailureScript to handle the error at client side a suggestion that may work is to try-and-catch all exception happened during onevent of ajax request, and send back a error-javascript to the ajaxTarget(.appendJavascript); but we think that this is difficult and troublesome to refactor all of our ajax code, and -- View this message in context: http://www.nabble.com/ajax-error-handling-on-server-side-exception-tp16624390p16624390.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: pass information through ajax without form
i have traced the wicket source codes at the place that how it generates the ajax js like wcall=wicketAjaxGet('xxx') but i don't know exactly what this does, so how to add parameter to the wicket ajax request? i can add custom js to the wicket ajax javascript, but how can I pass the some dynamic js state into that ajax request, e.g. i trigger the ajax request by a link with AjaxEventBehavior on onclick event. would you mind show me a simple example? David Bernard-2 wrote: For a similar case, I override (in MyBehavior) @Override public final void respond(AjaxRequestTarget target) { try { Request req = RequestCycle.get().getRequest(); String param1 = req.getParameter(param1); // to stuff super.respond(target); //?? } catch (RuntimeException exc) { throw exc; } catch (Exception exc) { throw new RuntimeException(wrap: + exc.getMessage(), exc); } } And you need to override (server or client side) the callbackUrl to add parameter. ywtsang wrote: How to pass information (stored in an attribute of a html tag, or javascript variable) through ajax without involving form? e.g. there is an ajax link and after I click this ajax link, an ajax event is triggered and I want to get the states of other html elements/javascript states in this ajax event it is no problem to use form, but we have a restriction that no form is used (may look weird to all here), so I would like to see if there is workaround in wicket. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/pass-information-through-ajax-without-form-tf4560660.html#a13016592 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: pass information through ajax without form
my case is: there is a javascript variable (let say var STATE;) that will be updated througout the client side javascript event there is a link (for example) that I want to use to pass the STATE through ajax to server. in your codes, does client side javascript method DnDSortableBehavior.asQueryString() generate the query string and append to the wicketAjaxGet? and you parse the parameters in the server side? I think you have already given me good hints and I will continue work on that, thanks very much David Bernard-2 wrote: Currently I have no simple example :-( In my case (wicketstuff-jquery), I've got a link that call a javascript function generated (with a template on server side). In this function : var wcall = wicketAjaxGet('${callbackUrl}' + DnDSortableBehavior.asQueryString(), function(){}, function(){}); And the method DnDSortableBehavior.asQueryString() is in charge of formated collected state, params,... var DnDSortableBehavior = { ... asQueryString : function() { return 'itemId=' + this.itemId + 'srcContainerId=' + this.srcContainerId + 'srcPosition=' + this.srcPosition + 'destContainerId='+ this.destContainerId + 'destPosition=' + this.destPosition; } }; In my case I use jquery to retrieve states, values. If I've got time this evening, I'll try to create a sample. Which type of information do you want to send back to server ? ywtsang wrote: i have traced the wicket source codes at the place that how it generates the ajax js like wcall=wicketAjaxGet('xxx') but i don't know exactly what this does, so how to add parameter to the wicket ajax request? i can add custom js to the wicket ajax javascript, but how can I pass the some dynamic js state into that ajax request, e.g. i trigger the ajax request by a link with AjaxEventBehavior on onclick event. would you mind show me a simple example? David Bernard-2 wrote: For a similar case, I override (in MyBehavior) @Override public final void respond(AjaxRequestTarget target) { try { Request req = RequestCycle.get().getRequest(); String param1 = req.getParameter(param1); // to stuff super.respond(target); //?? } catch (RuntimeException exc) { throw exc; } catch (Exception exc) { throw new RuntimeException(wrap: + exc.getMessage(), exc); } } And you need to override (server or client side) the callbackUrl to add parameter. ywtsang wrote: How to pass information (stored in an attribute of a html tag, or javascript variable) through ajax without involving form? e.g. there is an ajax link and after I click this ajax link, an ajax event is triggered and I want to get the states of other html elements/javascript states in this ajax event it is no problem to use form, but we have a restriction that no form is used (may look weird to all here), so I would like to see if there is workaround in wicket. - 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/pass-information-through-ajax-without-form-tf4560660.html#a13017389 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]