Wickedcharts (Wicked charts) Best Practice
I would like thank Tom Hombergs for Wickedcharts . It is a tremendous tool. I’m still getting to grips with it (and with Highcharts for that matter) but things are gradually falling into place.I’d like to ask a question regarding recommended methodology regarding the source of chart ‘constants’. For our non-chart non-DB screen info we use the .properties files for getting texts both via wicket-message keys and also via wicket:id’s when the constant needs to be conditional.So my question is how should we work in the most efficient manner in terms of maintenance and performance? One approach I can see is to prepare the chart options entirely in the Java program, as per your example in getting started, taking the series data from the DB. All the constant info like chart style and titles would be referenced by the Java from the .properties file and then built into the chart options in the Java. Is this the best approach? And if so, would you suggest breaking the .properties texts into small pieces or larger chunks?There’s also another variation. I feel efficiency would be improved and maintenance simplified if I could provide the information for the chart from two different places, with the DB info and conditional constant info being handled by the Java and the true constant info like chart style and titles being handled at the client, using the Wicket framework’s .properties file / wicket-key mechanism. Is this possible?Any help will be highly appreciated. Thanks for your time. Neil Leigh -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wickedcharts-Wicked-charts-Best-Practice-tp4668654.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: Download file and redirect in one go?
You can also 1- mount a resource and serve the file from there. 2- Once new page is loaded you do setTimeout(\"window.location.href='" + url + "'\", 100); where url is the URL of the resource. This will trigger download. On Thu, Dec 4, 2014 at 4:50 PM, Stefan Renz wrote: > Hi, > > how do I automatically trigger an AJAX request? Timer behavior? > > Any other ideas? I'd rather like to keep the download (resource > generating code) on the page that contains the form. The page I want to > redirect to has nothing to do with the resource... > > Thanks, bye >Stefan > > Ernesto Reinaldo Barreiro wrote: > > After submit redirect to the new page that automatically trigger an AJAX > > request and use > > > > > https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow > > > > On Thu, Dec 4, 2014 at 12:17 PM, Stefan Renz wrote: > > > >> Hi, > >> > >> after a form submission, I'd like to redirect the user to another page, > >> and stream a file to the browser (generated as a result of the form > >> submission). > >> > >> How would I achieve this? I can do both single steps, but not both > >> together... > >> > >> Thanks, bye, > >> Stefan > >> > >> > >> - > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > >> For additional commands, e-mail: users-h...@wicket.apache.org > >> > >> > > > > > > -- > im Auftrag der eFonds Solutions AG, +49-89-579494-3417 > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro
Re: Download file and redirect in one go?
Hi, how do I automatically trigger an AJAX request? Timer behavior? Any other ideas? I'd rather like to keep the download (resource generating code) on the page that contains the form. The page I want to redirect to has nothing to do with the resource... Thanks, bye Stefan Ernesto Reinaldo Barreiro wrote: > After submit redirect to the new page that automatically trigger an AJAX > request and use > > https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow > > On Thu, Dec 4, 2014 at 12:17 PM, Stefan Renz wrote: > >> Hi, >> >> after a form submission, I'd like to redirect the user to another page, >> and stream a file to the browser (generated as a result of the form >> submission). >> >> How would I achieve this? I can do both single steps, but not both >> together... >> >> Thanks, bye, >> Stefan >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > -- im Auftrag der eFonds Solutions AG, +49-89-579494-3417 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Force AjaxLink to be enabled
Haha I had already overridden AbstractLink#isLinkEnabled() and yes now Wicket renders a link rather than a span but clicking doesn't work. OnClick() isn't called at all. CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668638.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: Force AjaxLink to be enabled
Check AbstractLink#isLinkEnabled() Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 4, 2014 at 5:13 PM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > LOL > > On Thu, Dec 4, 2014 at 4:04 PM, Martin Grigorov > wrote: > > > Hi, > > > > Yes. There is! > > But I will tell you how to do it only if you update your thread about the > > caret selection with the final solution so other users can also use it > ;-) > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Thu, Dec 4, 2014 at 4:51 PM, ChambreNoire wrote: > > > > > Hi, > > > > > > Having recently migrated an old app all the way from 1.3 to 6, one of > the > > > issues I encountered was that links and other component take their > > parents > > > into consideration when determining their enabled state (introduced in > > > 1.4?). This is a real pain for me in a few specific cases. I can't > > override > > > isEnabledInHierarchy as it's final. Is there a easy quick and dirty way > > > around for a given link ? > > > > > > Many Thanks, > > > > > > CN > > > > > > -- > > > View this message in context: > > > > > > http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.html > > > Sent from the Users forum mailing list archive at Nabble.com. > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > > > > > > > > -- > Regards - Ernesto Reinaldo Barreiro >
Re: FIXED: TextField cursor reset mid-editing
Thanks! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 4, 2014 at 5:19 PM, ChambreNoire wrote: > OK so this is what I have. Disclaimer: I'm no javascript/jQuery expert so > this is mostly cobbled together from things I have found online and tested > in my particular situation. Any optimisations are more than welcome! > > So first the script > > (function($) { > $.fn.getCaretPosition = function() { > var input = this.get(0); > if (!input) return; // No (input) element found > if ('selectionStart' in input) { > // Standard-compliant browsers > return input.selectionStart; > } else if (document.selection) { > // IE > input.focus(); > var sel = document.selection.createRange(); > var selLen = document.selection.createRange().text.length; > sel.moveStart('character', -input.value.length); > return sel.text.length - selLen; > } > }; > $.fn.setCaretPosition = function(position) { > var input = this.get(0); > if (!input) return false; // No (input) element found > > input.value = input.value; > // ^ this is used to not only get "focus", but > // to make sure we don't have it everything -selected- > // (it causes an issue in chrome, and having it doesn't hurt any > other browser) > > if (input.createTextRange) { > var range = input.createTextRange(); > range.move('character', position); > range.select(); > return true; > } else { > // (input.selectionStart === 0 added for Firefox bug) > if (input.selectionStart || input.selectionStart === 0) { > input.focus(); > input.setSelectionRange(position, position); > return true; > } else { // fail city, fortunately this never happens (as far > as I've tested) :) > input.focus(); > return false; > } > } > } > })(jQuery); > > Then I add the following behavior to my TextField : > > add(new AjaxFormComponentUpdatingBehavior("onkeyup") { > > @Override > protected void onUpdate(AjaxRequestTarget target) { > > String id = getComponent().getMarkupId(); > > String caret = id + "_caretPosition"; > String selector = "$('#" + id + "')"; > > target.prependJavaScript("var $s = " + selector + > ";if($s[0]===document.activeElement){" + > "jQuery.data(document,'" + caret + "'," + selector + > ".getCaretPosition());}"); > > onFieldUpdate(getFormComponent(), target); > > target.appendJavaScript("var $p = jQuery.data(document,'" + caret + > "');" + > "if($p!=undefined){" + selector + ".setCaretPosition($p);" > + > "jQuery.removeData(document,'" + caret + "');}"); > } > > @Override > protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { > super.updateAjaxAttributes(attributes); > > String id = getFormComponent().getMarkupId() + "_onkeyup"; > > attributes.setThrottlingSettings(new ThrottlingSettings(id, > seconds(1), true)); > } > }); > > So this gets round the 'zapping focus back to the original field after > hitting tab' issue I experienced as the behavior will be called a bit after > I hit tab due to the throttle settings but that won't affect whether the > field is focused or not (it won't regain focus). So I can check this and > bypass the whole thing if the field isn't focused simply by not storing the > caret position and consequently not re-setting it. > > You'll notice I'm storing the caretPosition in 'document' using > jQuery.data(). There's probably a more 'js/jquery best practices' way to do > this. I should also be clearing the position once I set it (thinking out > loud) so I'll add that above. > > CN > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/TextField-cursor-reset-mid-editing-tp4668582p4668635.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: FIXED: TextField cursor reset mid-editing
OK so this is what I have. Disclaimer: I'm no javascript/jQuery expert so this is mostly cobbled together from things I have found online and tested in my particular situation. Any optimisations are more than welcome! So first the script (function($) { $.fn.getCaretPosition = function() { var input = this.get(0); if (!input) return; // No (input) element found if ('selectionStart' in input) { // Standard-compliant browsers return input.selectionStart; } else if (document.selection) { // IE input.focus(); var sel = document.selection.createRange(); var selLen = document.selection.createRange().text.length; sel.moveStart('character', -input.value.length); return sel.text.length - selLen; } }; $.fn.setCaretPosition = function(position) { var input = this.get(0); if (!input) return false; // No (input) element found input.value = input.value; // ^ this is used to not only get "focus", but // to make sure we don't have it everything -selected- // (it causes an issue in chrome, and having it doesn't hurt any other browser) if (input.createTextRange) { var range = input.createTextRange(); range.move('character', position); range.select(); return true; } else { // (input.selectionStart === 0 added for Firefox bug) if (input.selectionStart || input.selectionStart === 0) { input.focus(); input.setSelectionRange(position, position); return true; } else { // fail city, fortunately this never happens (as far as I've tested) :) input.focus(); return false; } } } })(jQuery); Then I add the following behavior to my TextField : add(new AjaxFormComponentUpdatingBehavior("onkeyup") { @Override protected void onUpdate(AjaxRequestTarget target) { String id = getComponent().getMarkupId(); String caret = id + "_caretPosition"; String selector = "$('#" + id + "')"; target.prependJavaScript("var $s = " + selector + ";if($s[0]===document.activeElement){" + "jQuery.data(document,'" + caret + "'," + selector + ".getCaretPosition());}"); onFieldUpdate(getFormComponent(), target); target.appendJavaScript("var $p = jQuery.data(document,'" + caret + "');" + "if($p!=undefined){" + selector + ".setCaretPosition($p);" + "jQuery.removeData(document,'" + caret + "');}"); } @Override protected void updateAjaxAttributes(AjaxRequestAttributes attributes) { super.updateAjaxAttributes(attributes); String id = getFormComponent().getMarkupId() + "_onkeyup"; attributes.setThrottlingSettings(new ThrottlingSettings(id, seconds(1), true)); } }); So this gets round the 'zapping focus back to the original field after hitting tab' issue I experienced as the behavior will be called a bit after I hit tab due to the throttle settings but that won't affect whether the field is focused or not (it won't regain focus). So I can check this and bypass the whole thing if the field isn't focused simply by not storing the caret position and consequently not re-setting it. You'll notice I'm storing the caretPosition in 'document' using jQuery.data(). There's probably a more 'js/jquery best practices' way to do this. I should also be clearing the position once I set it (thinking out loud) so I'll add that above. CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/TextField-cursor-reset-mid-editing-tp4668582p4668635.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: Force AjaxLink to be enabled
LOL On Thu, Dec 4, 2014 at 4:04 PM, Martin Grigorov wrote: > Hi, > > Yes. There is! > But I will tell you how to do it only if you update your thread about the > caret selection with the final solution so other users can also use it ;-) > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Thu, Dec 4, 2014 at 4:51 PM, ChambreNoire wrote: > > > Hi, > > > > Having recently migrated an old app all the way from 1.3 to 6, one of the > > issues I encountered was that links and other component take their > parents > > into consideration when determining their enabled state (introduced in > > 1.4?). This is a real pain for me in a few specific cases. I can't > override > > isEnabledInHierarchy as it's final. Is there a easy quick and dirty way > > around for a given link ? > > > > Many Thanks, > > > > CN > > > > -- > > View this message in context: > > > http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.html > > Sent from the Users forum mailing list archive at Nabble.com. > > > > - > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > > For additional commands, e-mail: users-h...@wicket.apache.org > > > > > -- Regards - Ernesto Reinaldo Barreiro
Re: Force AjaxLink to be enabled
Ha! Yes I was going to do that tonight but fine. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631p4668633.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: Force AjaxLink to be enabled
Hi, Yes. There is! But I will tell you how to do it only if you update your thread about the caret selection with the final solution so other users can also use it ;-) Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 4, 2014 at 4:51 PM, ChambreNoire wrote: > Hi, > > Having recently migrated an old app all the way from 1.3 to 6, one of the > issues I encountered was that links and other component take their parents > into consideration when determining their enabled state (introduced in > 1.4?). This is a real pain for me in a few specific cases. I can't override > isEnabledInHierarchy as it's final. Is there a easy quick and dirty way > around for a given link ? > > Many Thanks, > > CN > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.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 > >
Force AjaxLink to be enabled
Hi, Having recently migrated an old app all the way from 1.3 to 6, one of the issues I encountered was that links and other component take their parents into consideration when determining their enabled state (introduced in 1.4?). This is a real pain for me in a few specific cases. I can't override isEnabledInHierarchy as it's final. Is there a easy quick and dirty way around for a given link ? Many Thanks, CN -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Force-AjaxLink-to-be-enabled-tp4668631.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: Production deployment ajax problem
it's been a while since I've read the https://cwiki.apache.org/confluence/display/WICKET/Wicket%27s+XHTML+tags#Wicket'sXHTMLtags-Elementwicket:container thank you for your help Regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/SOLVED-Production-deployment-ajax-problem-tp4668611p4668630.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: Production deployment ajax problem
trying ... thank you ! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668627.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: Production deployment ajax problem
It works now replaced wicket:container with div and it works regards Armando PS: FML -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668629.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: jqueryuidatepicker Wicket.Ajax: FunctionsExecuter.processNext: TypeError: Cannot read property 'indexOf' of undefined
It my javascript issue not with wicket. I resolved it. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jqueryuidatepicker-Wicket-Ajax-FunctionsExecuter-processNext-TypeError-Cannot-read-property-indexOf-d-tp4668609p4668610.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: Production deployment ajax problem
vanish On Thu, Dec 4, 2014 at 1:22 PM, Ernesto Reinaldo Barreiro < reier...@gmail.com> wrote: > replace wicket container by a div. In production it will banish. > > On Thu, Dec 4, 2014 at 1:10 PM, armandoxxx > wrote: > >> removed it ;) >> >> btw ... >> HTML code >> >> >> wicket:container gets ID "id7c" on first load .. NOW I PRESS BUTTON to >> show >> another panel >> >> in response I get >> >> >> >> >> -- >> View this message in context: >> http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668624.html >> Sent from the Users forum mailing list archive at Nabble.com. >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > > -- > Regards - Ernesto Reinaldo Barreiro > -- Regards - Ernesto Reinaldo Barreiro
Re: Production deployment ajax problem
replace wicket container by a div. In production it will banish. On Thu, Dec 4, 2014 at 1:10 PM, armandoxxx wrote: > removed it ;) > > btw ... > HTML code > > > wicket:container gets ID "id7c" on first load .. NOW I PRESS BUTTON to > show > another panel > > in response I get > > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668624.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro
Re: Production deployment ajax problem
removed it ;) btw ... HTML code wicket:container gets ID "id7c" on first load .. NOW I PRESS BUTTON to show another panel in response I get -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668624.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: Production deployment ajax problem
and this.aboutComponent.setOutputMarkupId(true); this.accountComponent.setOutputMarkupId(true); this.alertsComponent.setOutputMarkupId(true); this.infoComponent.setOutputMarkupId(true); are not really needed Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 4, 2014 at 2:03 PM, armandoxxx wrote: > this is all the code I have for this panels ... > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668618.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: Production deployment ajax problem
checking it out ... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668622.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: Production deployment ajax problem
tried it .. does not help ... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668621.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: Production deployment ajax problem
Then fire the browser debugger and check what id the old id of the wrapper and what is the id for the element in the ajax response. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 4, 2014 at 1:59 PM, armandoxxx wrote: > This ... > > > ... does not help ... and to tell you the truth I don't want these panels > to show in markup ... > > I just want my panelWrapper to have content replaced with the new panel > (which should be visible) > > Regards > > Armando > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668617.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: Production deployment ajax problem
Hi, panelWrapper is the one that needs .setOutputMarkupPlaceholderTag(true) On Thu, Dec 4, 2014 at 12:59 PM, armandoxxx wrote: > This ... > > > ... does not help ... and to tell you the truth I don't want these panels > to show in markup ... > > I just want my panelWrapper to have content replaced with the new panel > (which should be visible) > > Regards > > Armando > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668617.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro
Re: Production deployment ajax problem
this is all the code I have for this panels ... -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668618.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: Production deployment ajax problem
This ... ... does not help ... and to tell you the truth I don't want these panels to show in markup ... I just want my panelWrapper to have content replaced with the new panel (which should be visible) Regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611p4668617.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: Production deployment ajax problem
Hi, You need to call component.setOutputMarkupPlaceholderTag(true) for all components which are hidden and should be shown with Ajax. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Thu, Dec 4, 2014 at 10:55 AM, armandoxxx wrote: > Hey guys .. > > I've got problem with AjaxFallbackLink in production deployment ... > > > for example : > > > > SettingsComponent.this.hideAll(); << hides all panels (sets visibility to > false) > SettingsComponent.this.infoComponent.setVisible(true); << sets desired > panel > to visible > ajaxRequestTarget.add(SettingsComponent.this.panelWrapper); << refreshes > the > panel wrapper ... > > > and the problem is .. that AJAX request is executed, data returned (html > and > javascripts are returned from server - I can see it all in development > window) ... and nothing happens .. if I press F5 to refresh the page .. the > correct panel is displayed ... > in development deployment everything works fine ... > > any ideas? and suggestions ... > > regards > > Armando > > > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611.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 > >
jqueryuidatepicker Wicket.Ajax: FunctionsExecuter.processNext: TypeError: Cannot read property 'indexOf' of undefined
getting this error Wicket.Ajax: FunctionsExecuter.processNext: TypeError: Cannot read property 'indexOf' of undefined panel has a text-field onDomReady I calling jqueryui.datepicker() function to modify this text-field. Any ajax updates after clicking on the calendar icon or entering text in the this text-field is causing the error. Please advice resolution. I am using wicket 6.12.0 -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/jqueryuidatepicker-Wicket-Ajax-FunctionsExecuter-processNext-TypeError-Cannot-read-property-indexOf-d-tp4668609.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: Serve file without download links etc
Ended up doing something like this: //in Application init mountResource("file", new ResourceReference() { @Override public IResource getResource() { return new AbstractResource() { @Override protected ResourceResponse newResourceResponse(Attributes attributes) { final FileDescription fileDescription = fileDescriptionService.findOne(attributes.getParameters().get("file").toLong()); final AbstractResource.ResourceResponse resourceResponse = new AbstractResource.ResourceResponse(); resourceResponse.setContentType(fileDescription.getMimeType()); resourceResponse.setContentLength(fileDescription.getSize()); resourceResponse.setFileName(fileDescription.getName()); if (resourceResponse.dataNeedsToBeWritten(attributes)) { resourceResponse.setWriteCallback(new AbstractResource.WriteCallback() { @Override public void writeData(Attributes attributes) throws IOException { try (InputStream data = fileDescription.getData()) { IOUtils.copy(data, attributes.getResponse().getOutputStream()); } } }); } return resourceResponse; } }; } }); On 2014年12月03日 12:10, fred-fri wrote: > I need to implement public URLs that lead directly to files. I'm > thinking I could create a page that takes a unique file identifier as > parameter, uses that to look up the file, and serve the file. But how > can I serve the file immediately without using download links etc? > - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Production deployment ajax problem
Hey guys .. I've got problem with AjaxFallbackLink in production deployment ... for example : SettingsComponent.this.hideAll(); << hides all panels (sets visibility to false) SettingsComponent.this.infoComponent.setVisible(true); << sets desired panel to visible ajaxRequestTarget.add(SettingsComponent.this.panelWrapper); << refreshes the panel wrapper ... and the problem is .. that AJAX request is executed, data returned (html and javascripts are returned from server - I can see it all in development window) ... and nothing happens .. if I press F5 to refresh the page .. the correct panel is displayed ... in development deployment everything works fine ... any ideas? and suggestions ... regards Armando -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Production-deployment-ajax-problem-tp4668611.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: Download file and redirect in one go?
After submit redirect to the new page that automatically trigger an AJAX request and use https://cwiki.apache.org/confluence/display/WICKET/AJAX+update+and+file+download+in+one+blow On Thu, Dec 4, 2014 at 12:17 PM, Stefan Renz wrote: > Hi, > > after a form submission, I'd like to redirect the user to another page, > and stream a file to the browser (generated as a result of the form > submission). > > How would I achieve this? I can do both single steps, but not both > together... > > Thanks, bye, > Stefan > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Regards - Ernesto Reinaldo Barreiro
Download file and redirect in one go?
Hi, after a form submission, I'd like to redirect the user to another page, and stream a file to the browser (generated as a result of the form submission). How would I achieve this? I can do both single steps, but not both together... Thanks, bye, Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org