Re: Draggable multiple containment
Hello Sebastien, It's about jqueryui draggable. According to my tests it only works on first element being selected by selector provided i.e. in case two elements on the page has class="drop target", only one will work as containment setting containment to empty string helps, but On Wed, Apr 27, 2016 at 3:15 AM, Sebastienwrote: > Hi Maxim, > > Is it about jQuery or Kendo draggable? > > Sebastien. > > On Tue, Apr 26, 2016 at 7:06 PM, Maxim Solodovnik > wrote: > > > Hello Sebastien, > > > > I'm trying to use Draggable, > > everything works as expected as long as I'm using single selector for the > > "containment" (for ex: ".drop.target" or ".drop.target1") > > > > but fails if I'm using both ".drop.target, .drop.target1" > > Maybe you know are there any limitations? > > > > > > -- > > WBR > > Maxim aka solomax > > > -- WBR Maxim aka solomax
Re: upgrade to wicket 7.2 append javascript to AjaxRequestTarget
Hi, > clickButtonWithId('id2fb') this is not Wicket's JavaScript. Show us the source of this method or even better create a quickstart. Regards Sven On 26.04.2016 22:51, fachhoch wrote: I upgraded from 6.19 to 7.2. append javascript to ajaxrequesttarget results error in client side Ib54b:1 Wicket.Ajax: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: TypeError: Cannot read property 'toUpperCase' of undefined, text: (function(){clickButtonWithId('id2fb')})(); I have two ajax links one hidden and other visible, click on visible it does some loading at server side then call append js to ajaxrequestatrget which clicks the hidden btn, no issues it works, but at client side I see the error. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/upgrade-to-wicket-7-2-append-javascript-to-AjaxRequestTarget-tp4674447.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
Re: Panel.this always giving previous version of the object but not the modified one.
Hi Martin, event.getPayload() giving AjaxRequestTarget not the GridValueChangeEvent. If I change the "IEventSink" as *FieldSearchTextField.this *in send(--,--,--) it gives GridValueChangeEvent, but it is not working in WindowClosedCallback(). FieldSearchTextField is a customized text component not a page. so whenever I tried to get page by PageReference its always giving parent page. On Mon, Apr 25, 2016 at 2:49 PM, Martin Grigorovwrote: > Hi, > > You need: > > Page openerPage = getPageReference().getPage(); > openerPage.send(openerPage, Broadcast.BREADTH, new > GridValueChangeEvent(target, selectedRow)); > > Then any component inside 'openerPage' will receive this event and can read > and store the selected row from it. > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Mon, Apr 25, 2016 at 4:53 PM, durairaj t > wrote: > > > Please refer the below formatted code snippet. > > > > I'm setting selectedRow value in page creator and expecting the same > > in window close call back (Line number 24), I tried with the Inter > > component communication examples as you suggested. But I don't know how > to > > update the selectedRow in line #24 with onEven(IEvent event). > > > > > > > > Paste Bin URL: http://pastebin.com/Y2KA2LNn > > > > > > > >1. > >2. public class FieldSearchTextField extends MaskedTextField{ > >3.ResultRow selectedRow; > >4. > >5./* other business code here*/ > >6. > >7./* page creator */ > >8. modalWindow.setPageCreator (new ModalWindow.PageCreator() { > >9. public Page createPage() { > >10. FieldSearchModalPage casePartyModalPage = new > > FieldSearchModalPage(searchOption, modalWindow){ > >11.@Override > >12. public void updateValue(ResultRow row, AjaxRequestTarget > >target) { > >13. selectedRow = row; /* selectedRow is not null here*/ > >14. getPageReference().getPage().send( getPage(), > >Broadcast.BREADTH,new GridValueChangeEvent(target)); > >15.} > >16. } > >17.} > >18. } > >19. > >20./* window close call back*/ > >21. modalWindow.setWindowClosedCallback(new > >ModalWindow.WindowClosedCallback() { > >22. @Override > >23. public void onClose(AjaxRequestTarget target){ > >24. /* how to get the selectedRow value here? */ > >25. onFieldSearchWindowClose(selectedRow, target);*// selectedRow > >is null here.* > >26. } > >27. } > >28. > >29. /*onEvent implementation*/ > >30. @Override > >31. public void onEvent(IEvent event) { > >32. super.onEvent(event); > >33. if(event.getPayload() instanceof GridValueChangeEvent) { > >34. GridValueChangeEvent gridValueChangeEvent = > >((GridValueChangeEvent) event. > >35. getPayload()); > >36. gridValueChangeEvent.getTarget().add(this); > >37. } > >38. } > >39. /* Grid value change event class*/ > >40.public class GridValueChangeEvent { > >41. private final AjaxRequestTarget target; > >42. > >43. public GridValueChangeEvent(AjaxRequestTarget target) { > >44. this.target = target; > >45. } > >46. public AjaxRequestTarget getTarget() { > >47. return target; > >48. } > >49. } > >50. > >51. } > > > > > > On Fri, Apr 22, 2016 at 4:53 PM, Martin Grigorov > > wrote: > > > > > Please use some pastebin service. > > > It is hard to read and follow this code. > > > > > > Martin Grigorov > > > Wicket Training and Consulting > > > https://twitter.com/mtgrigorov > > > > > > On Fri, Apr 22, 2016 at 10:43 PM, durairaj t > > > wrote: > > > > > > > Thank you Martin. I tried with examples but those are not working in > my > > > > case. I don't know how to call the onEvent in line number 19 in the > > below > > > > code snippet. Please share me if you have any examples. > > > > > > > > > > > > 1. public class FieldSearchTextField extends MaskedTextField{ > > > > 2. ResultRow selectedRow; > > > > 3. /* page creator */ > > > > 4. modalWindow.setPageCreator (new ModalWindow.PageCreator() { > > > > 5.public Page createPage() { > > > > 6. FieldSearchModalPage casePartyModalPage = new > > > > FieldSearchModalPage(searchOption, modalWindow){ > > > > 7. @Override > > > > 8.public void updateValue(ResultRow row, AjaxRequestTarget > target) > > { > > > > 9. selectedRow = row;* //selectedRow is not null here* > > > > 10. getPageReference().getPage().send( getPage(), > Broadcast.BREADTH,new > > > > GridValueChangeEvent(target)); > > > > 11. } > > > > 12.} > > > > 13.
upgrade to wicket 7.2 append javascript to AjaxRequestTarget
I upgraded from 6.19 to 7.2. append javascript to ajaxrequesttarget results error in client side Ib54b:1 Wicket.Ajax: Wicket.Ajax.Call.processEvaluation: Exception evaluating javascript: TypeError: Cannot read property 'toUpperCase' of undefined, text: (function(){clickButtonWithId('id2fb')})(); I have two ajax links one hidden and other visible, click on visible it does some loading at server side then call append js to ajaxrequestatrget which clicks the hidden btn, no issues it works, but at client side I see the error. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/upgrade-to-wicket-7-2-append-javascript-to-AjaxRequestTarget-tp4674447.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: Draggable multiple containment
Hi Maxim, Is it about jQuery or Kendo draggable? Sebastien. On Tue, Apr 26, 2016 at 7:06 PM, Maxim Solodovnikwrote: > Hello Sebastien, > > I'm trying to use Draggable, > everything works as expected as long as I'm using single selector for the > "containment" (for ex: ".drop.target" or ".drop.target1") > > but fails if I'm using both ".drop.target, .drop.target1" > Maybe you know are there any limitations? > > > -- > WBR > Maxim aka solomax >
Re: Storing Pages
Wicket already does this. Please check https://ci.apache.org/projects/wicket/guide/7.x/guide/internals.html#pagestoring In short: The stateful page(s) used in the last request cycle are stored in the http session as live instances, because the chance to reuse it/them is high, e.g. clicking a link. Additionally the same page(s) are also stored on the disk as byte[]. If you use browser's back button then Wicket will deserialize the page from the disk. So you can just keep the page id around and use getSession().getPageManager().getPage(pageId) to get a reference to a page. The size of the file for storing session's pages on disk is limited (see StoreSettings), so after some time a page expires, i.e. it is removed from the disk. You can "touch" it from time to time (e.g. on every request) to keep it in the file. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Apr 26, 2016 at 10:29 PM, Lon Varscsakwrote: > To be clearer, I just basically want to take a page that the user is on, > keep a reference to it, and return the user back to it at some point in the > future. It seems to work fine (I’m used to doing this since Apple’s > WebObjects is similar), but I just wanted to make sure I didn’t paint > myself into a corner. :P > > On Tue, Apr 26, 2016 at 1:25 PM, Lon Varscsak > wrote: > > > So by sending me there are you suggesting that storing an iVar to a page > > object is bad? > > > > On Tue, Apr 26, 2016 at 1:00 PM, Martin Grigorov > > wrote: > > > >> Hi, > >> > >> Take a look at https://github.com/martin-g/single-page-instance and the > >> discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75 > >> Might be useful for you! > >> > >> Martin Grigorov > >> Wicket Training and Consulting > >> https://twitter.com/mtgrigorov > >> > >> On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsak > >> wrote: > >> > >> > Is it bad to store pages in the session for re-use? The idea being > that > >> > for a given page, I only want one instance per session. > >> > > >> > -Lon (Wicket Newb) > >> > > >> > > > > >
Re: Storing Pages
To be clearer, I just basically want to take a page that the user is on, keep a reference to it, and return the user back to it at some point in the future. It seems to work fine (I’m used to doing this since Apple’s WebObjects is similar), but I just wanted to make sure I didn’t paint myself into a corner. :P On Tue, Apr 26, 2016 at 1:25 PM, Lon Varscsakwrote: > So by sending me there are you suggesting that storing an iVar to a page > object is bad? > > On Tue, Apr 26, 2016 at 1:00 PM, Martin Grigorov > wrote: > >> Hi, >> >> Take a look at https://github.com/martin-g/single-page-instance and the >> discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75 >> Might be useful for you! >> >> Martin Grigorov >> Wicket Training and Consulting >> https://twitter.com/mtgrigorov >> >> On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsak >> wrote: >> >> > Is it bad to store pages in the session for re-use? The idea being that >> > for a given page, I only want one instance per session. >> > >> > -Lon (Wicket Newb) >> > >> > >
Re: Storing Pages
On Tue, Apr 26, 2016 at 10:25 PM, Lon Varscsakwrote: > So by sending me there are you suggesting that storing an iVar to a page > object is bad? > I haven't re-read the discussion soon, so I am not sure what you relate to. I just gave you a link to a similar discussion and a possible implementation. The discussion explains pros and cons. > > On Tue, Apr 26, 2016 at 1:00 PM, Martin Grigorov > wrote: > > > Hi, > > > > Take a look at https://github.com/martin-g/single-page-instance and the > > discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75 > > Might be useful for you! > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsak > > wrote: > > > > > Is it bad to store pages in the session for re-use? The idea being > that > > > for a given page, I only want one instance per session. > > > > > > -Lon (Wicket Newb) > > > > > >
Re: Storing Pages
So by sending me there are you suggesting that storing an iVar to a page object is bad? On Tue, Apr 26, 2016 at 1:00 PM, Martin Grigorovwrote: > Hi, > > Take a look at https://github.com/martin-g/single-page-instance and the > discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75 > Might be useful for you! > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsak > wrote: > > > Is it bad to store pages in the session for re-use? The idea being that > > for a given page, I only want one instance per session. > > > > -Lon (Wicket Newb) > > >
Re: [wicketstuff-restannotations] How to automatically generate Swagger definitions.
Hi, at the moment we don't have such kind of integration with Swagger. You may obtain some results if you use Spring in your application: https://dzone.com/articles/swagger-make-developers-love. However I've never tried this kind of solution. On 25/04/2016 16:08, Fabio Fioretti wrote: Hi all, I have been successfully using wicketstuff-restannotations to create some REST web services in my Wicket 6.22.0 application - thanks for that, very straightforward. Now that my REST resources and methods are complete and correctly annotated, I would need to generate the related Swagger definitions. Is there an easy way to do so? Many thanks, Fabio - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Storing Pages
Hi, Take a look at https://github.com/martin-g/single-page-instance and the discussion about it at http://markmail.org/message/ofyvgybcjp5cvf75 Might be useful for you! Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Tue, Apr 26, 2016 at 6:22 PM, Lon Varscsakwrote: > Is it bad to store pages in the session for re-use? The idea being that > for a given page, I only want one instance per session. > > -Lon (Wicket Newb) >
Draggable multiple containment
Hello Sebastien, I'm trying to use Draggable, everything works as expected as long as I'm using single selector for the "containment" (for ex: ".drop.target" or ".drop.target1") but fails if I'm using both ".drop.target, .drop.target1" Maybe you know are there any limitations? -- WBR Maxim aka solomax
Storing Pages
Is it bad to store pages in the session for re-use? The idea being that for a given page, I only want one instance per session. -Lon (Wicket Newb)
Re: WicketTester + DateTimeField
Hey, good point, thanks a lot ! I was using the inner workings of DateTextField to get the formatted string with locale DateFormat.getDateInstance(DateFormat.SHORT, Locale.getDefault()).format(date) but setting the locale on request is much better, thanks again ! Zbynek On Tue, Apr 26, 2016 at 6:01 PM, Martin Grigorovwrote: > Hi, > > WicketTester simulates browser behavior, so it sends String that is > converted to a Date by the Wicket component. > You can use tester.getRequest().setLocale(aLocale) to simulate localized > browser. > On Apr 26, 2016 4:22 PM, "Zbynek Vavros" wrote: > > Hi, > > whats the proper way to work with WicketTester and DateTimeFields ? > I am using > > FormTester.setValue("myDateTimeField". "formattedDateTime"); > > is there any way using proper date instead of string (that differs with > locales) ? > using DateTimeField.setModelObject() or DateTimeField.setDefaultModejObject > breaks our validator that works with getConvertedInput... > > Thanks, > Zbynek >
Re: WicketTester + DateTimeField
Hi, WicketTester simulates browser behavior, so it sends String that is converted to a Date by the Wicket component. You can use tester.getRequest().setLocale(aLocale) to simulate localized browser. On Apr 26, 2016 4:22 PM, "Zbynek Vavros"wrote: Hi, whats the proper way to work with WicketTester and DateTimeFields ? I am using FormTester.setValue("myDateTimeField". "formattedDateTime"); is there any way using proper date instead of string (that differs with locales) ? using DateTimeField.setModelObject() or DateTimeField.setDefaultModejObject breaks our validator that works with getConvertedInput... Thanks, Zbynek
WicketTester + DateTimeField
Hi, whats the proper way to work with WicketTester and DateTimeFields ? I am using FormTester.setValue("myDateTimeField". "formattedDateTime"); is there any way using proper date instead of string (that differs with locales) ? using DateTimeField.setModelObject() or DateTimeField.setDefaultModejObject breaks our validator that works with getConvertedInput... Thanks, Zbynek
Re: Palette - AJAX functionality
Hi, have you checked whether an Ajax is triggered, possibly losing the current selection? A quickstart would help :) Sven On 26.04.2016 15:19, PDiefent wrote: Hello, I've migrated my Wicket 6 application to Wicket 7 and I got some problems with a modal window containing a palette component. In Wicket 7 no updates are visible between the two lists (available/selected). If I try to move one entry to the opposite list there is only a short flicker but no entry will be moved. Unfortunaletly there is no AJAX related example available for Wicket 7 ... Thanks for any hints Peter -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433.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
Palette - AJAX functionality
Hello, I've migrated my Wicket 6 application to Wicket 7 and I got some problems with a modal window containing a palette component. In Wicket 7 no updates are visible between the two lists (available/selected). If I try to move one entry to the opposite list there is only a short flicker but no entry will be moved. Unfortunaletly there is no AJAX related example available for Wicket 7 ... Thanks for any hints Peter -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Palette-AJAX-functionality-tp4674433.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 extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ?
Hi, then I'd suggest you just extend AbstractToolbar and do your own thing. CssAttributeBehavior isn't magic, it's just appending a css class. Have fun Sven On 26.04.2016 01:47, andre seame wrote: Thanks, But it no so easy, because the idea is to modify the populateItem of refreshingView. Thanks, PHL. De : Sven MeierEnvoyé : lundi 25 avril 2016 07:22 À : users@wicket.apache.org Objet : Re: How to extends repeater.data.table.HeadersToolbar (How to resolve CssAttributeBehavior) ? Hi, HeadersToolbar already creates a RefreshingView in its constructor, you should not repeat that. The following should do: public THHeadersToolbar(final DataTable table, final ISortStateLocator stateLocator) { // inherited stuff super(table); // ... do custom stuff } Have fun Sven On 25.04.2016 00:45, andre seame wrote: I would like to modify org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.html and org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar.java. So I would to create myHeadersToolbar that extends org.apache.wicket.extensions.markup.html.repeater.data.table.HeadersToolbar. But, I have a problem : public THHeadersToolbar(final DataTable table, final ISortStateLocator stateLocator) { super(table); RefreshingView > headers = new RefreshingView >("headers") { @Override protected void populateItem(Item > item) { ... if (column instanceof IStyledColumn) { CssAttributeBehavior cssAttributeBehavior = new DataTable.CssAttributeBehavior() ... Therefore, Eclipse propose to import org.apache.wicket.extensions.markup.html.repeater.data.table.DataTable.CssAttributeBehavior; But this fails : Eclipse says : CssAttributeBehavior cannot be resolved to a type And Eclipse is right : public class DataTable extends Panel implements IPageableItems { static abstract class CssAttributeBehavior extends Behavior How to modify the HeadersToolbar ? Is "extends" the good idea ? Other Solution ? Thanks, PHL. - 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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org