Re: [Wicket-user] Playing with models:)/wicket.extensions.markup.html.form.palette.Palette;
Ill like to take you up on the discussion. I see the following pros and cons with this approach: Pro setObject: Allows the user to implement logic into the model If so desired Special conversions to satishfy wicket components needs, for example, wicket component needs one list but you have three, so join them in the get operator and split them in the set Logic, etc disable other components, notify Hold the standard implicitly directed by having a set object method Feels the right wayJ Con setObject: Performance could be slightly improved? I do think that that using setObject on the model is something that always should be done; it creates a lot of flexibility and why have setObject if not to use it, if not it will only cause confusion. -regards Nino From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg Sent: 17. juli 2006 17:32 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Playing with models:)/wicket.extensions.markup.html.form.palette.Palette; components whose model is backed by a collection do not always call setobject() because they work on the collection directly so there is no need to call Collection c=model.getObject(); c.clear(); //refill c model.setObject(c); == NOOP and also in wicket there is a guard component.setObject(c) { if (c.equals(model.getobject()) { //noop } else { //clone for version tracking; model.setObject (c); } } the above saves on unnecessary cloning. just a few things to be aware of, whether or not we should call setobject() anyways is still up for discussion. i kinda think we should even though sometimes the objects are the same. -Igor On 7/17/06, Nino Wael [EMAIL PROTECTED] wrote: Strange then, it seems as the extension palette does not update on a submit? Does it somehow detach from its model? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Eelco Hillenius Sent: 17. juli 2006 12:14 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Playing with models:) /wicket.extensions.markup.html.form.palette.Palette; When is setObject supposed to get called, Cause I only see it get called during construct? Whenever a (form)component has to update it's modelcontents. Or if you call setObject explicitly of course :() Typically, a component update is done by Form, which visits all it's children and calls updateModel on them. Eelco - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket in large scale production scenarios?
Hi Peter, I've done some performance/load tests with Wicket for our current project. Wicket itself isn't the problem in this regard, usually it is the amount of data you want to present on your pages. That data typically comes from a database and the number of queries and the amount of data to be read is the limiting factor. We had discovered some performance hotspots, but those have been removed in 1.2. We're going to do another round of load tests the coming weeks so take a close watch on the dev list to see if any problems arise ;-) There aren't any publicly available large scale sites available afaik, if you mean portals such as cnn.com, theserverside.com, etc. Wicket is typically used in applications rather than web sites. There have been several threads about this subject on JavaLobby. I suggest perusing those. And of course: http://www.wicket-wiki.org.uk/wiki/index.php/Stories On the productivity note, the only independent reference I could find is: http://www.indicthreads.com/news/435/wicket_java_framework_saves_programming_time.html I don't know how they measured it, nor if it is typical. At our company we don't see a productivity boost per se, but more a shift in productivity. The biggest problem is that with Wicket you are able to build more complex application, so we build more complex applications. This takes more time. On 7/17/06, Peter Neubauer [EMAIL PROTECTED] wrote: Hi there, we are planning to propose Wicket for a large scale migration project, and beside my previous question about the Swing compatibility (which I think after your nice hints is solveable, thanks!) I have some more questions - basically the usual sales and standard stuff: - is there any experience of Wicket performance in load tests? - are there any current large-scale production sites known that we could use as success stories? - is there any independent references on productivity of development with wicket? Thanks for any hints on this. Of course, once we get some projects behind it we can feed back more stuff, intended is the use together with the OPS4J OSGi-Wicket integration and RSP-UI, so there is a lot of good integration work coming in. /peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Download Wicket 1.2 now! Write Ajax applications without touching JavaScript! -- http://wicketframework.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket in large scale production scenarios?
Martijn, thanks for the good reply, will try to make something out of it to present to the customer. Thanks a lot! /peter On 7/18/06, Martijn Dashorst [EMAIL PROTECTED] wrote: Hi Peter, I've done some performance/load tests with Wicket for our current project. Wicket itself isn't the problem in this regard, usually it is the amount of data you want to present on your pages. That data typically comes from a database and the number of queries and the amount of data to be read is the limiting factor. We had discovered some performance hotspots, but those have been removed in 1.2. We're going to do another round of load tests the coming weeks so take a close watch on the dev list to see if any problems arise ;-) There aren't any publicly available large scale sites available afaik, if you mean portals such as cnn.com, theserverside.com, etc. Wicket is typically used in applications rather than web sites. There have been several threads about this subject on JavaLobby. I suggest perusing those. And of course: http://www.wicket-wiki.org.uk/wiki/index.php/Stories On the productivity note, the only independent reference I could find is: http://www.indicthreads.com/news/435/wicket_java_framework_saves_programming_time.html I don't know how they measured it, nor if it is typical. At our company we don't see a productivity boost per se, but more a shift in productivity. The biggest problem is that with Wicket you are able to build more complex application, so we build more complex applications. This takes more time. On 7/17/06, Peter Neubauer [EMAIL PROTECTED] wrote: Hi there, we are planning to propose Wicket for a large scale migration project, and beside my previous question about the Swing compatibility (which I think after your nice hints is solveable, thanks!) I have some more questions - basically the usual sales and standard stuff: - is there any experience of Wicket performance in load tests? - are there any current large-scale production sites known that we could use as success stories? - is there any independent references on productivity of development with wicket? Thanks for any hints on this. Of course, once we get some projects behind it we can feed back more stuff, intended is the use together with the OPS4J OSGi-Wicket integration and RSP-UI, so there is a lot of good integration work coming in. /peter - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -- Download Wicket 1.2 now! Write Ajax applications without touching JavaScript! -- http://wicketframework.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket Hibernate Application Transactions
Nathan Hamblen wrote: As others have pointed out, the magic of IModel works better than you think (or thought) it does. I often have two constructors for pages, one taking bookmarkable parameters and another taking an IModel so that I don't always have to reload DB objects page to page. It's a cinch. Currently I use models to hold, attach detach my persistent objects. About using IModels in constructors, I've mostly do it to be able to unit test my pages easier. But inside my application code, I prefer other components *not* to see or be aware of each other's internal models. That said, I prefer 'new PersonProfilePage(id,person)' instead of 'new PersonProfilePage(id,profileModel)'. I would like to hear comments on this, since I'm not sure everybody agrees. This system works very well and practically everyone uses it, but that shouldn't stop you from trying something else. Whatever you come up with just might be the way we all do it in a few years, when server resources dwarf those available today. I like IModels fine, and will like them even more when they're strongly typed, but I'll admit it would be easier to just pass around the objects they contain. Significantly easier for new users. So please do give it a shot. (I'm assuming your app is high-complexity, low-volume, or that you have small data objects.) I can't think of anything in Wicket that would slow you down, other than the minor annoyance of having to wrap objects in new Model(Serializable o) before passing them to some framework components. And let us know how it goes! Nathan I'm currently using detached objects in my pages. Although it would seem easy at first, there's a hell lot of problems keeping the objects in sync with session. Lazy exceptions are just one of them. You could Also easily get two objects with same id in the session if you're not careful. As I said earlier, I use Session.lock() to re-attach objects. Cascading the lock through the object graph and taking care of attaching all objects in use is also another pain. We need to come up with something that would free the developer of thinking about this attaching detaching of objects. Sure I'll look more for an efficient way,But until something is found I'll revert back to loading objects with each request. Iman - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket Hibernate Application Transactions
I don't think models have to be implementation details. Sometimes that makes sense, and in that case I usually like to embed the model class in the component itself. But lots of other times, you can make the model so that it can easily be reused by other components, possibly at the same time. This is especially true for master detail relations etc, something you can perfectly model with interdependent models. One of the main reasons for us wanting to apply generics in Wicket 2.0 is to have strongly typed models. In Wicket 2.0, components can force that they only accept models of a certain type (e.g. IModelPerson) so that you can have the same type of strong typing you have when passing pojos, but still hiding where the pojo comes from (or when). So in Wicket 2.0 a development approach where you pass models a lot makes even more sense. That's just my 2c of course :) Eelco Currently I use models to hold, attach detach my persistent objects. About using IModels in constructors, I've mostly do it to be able to unit test my pages easier. But inside my application code, I prefer other components *not* to see or be aware of each other's internal models. That said, I prefer 'new PersonProfilePage(id,person)' instead of 'new PersonProfilePage(id,profileModel)'. I would like to hear comments on this, since I'm not sure everybody agrees. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] ListView#accept() proposal
But then you need to pre filter the list. Because what would size() return??But going with something out of the repeater package would be better.But then still you need to filter up front because all those Repeaters do want to know the total size? And filtering on demand doesn't work then.johanOn 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote:im sorry but why will there be a listcopy?that is certainly a way to go but its not the only way. from the model return a List interfcace that filters on the fly. -IgorOn 7/17/06, Aaron Hiniker [EMAIL PROTECTED] wrote: Yeah, there's no problem implementing this in the model, other than the fact that there will be a list copy. Aaron On Mon, 2006-07-17 at 17:02 -0700, Igor Vaynberg wrote: the filtering should be performed in the model - it is the perfect place for it. -Igor On 7/17/06, Juergen Donnerstag [EMAIL PROTECTED] wrote: Just out of my head. Paging which is based on windows size and list size would need to take these into consideration. Not sure this change is trivial. Juergen On 7/18/06, Aaron Hiniker [EMAIL PROTECTED] wrote: I frequently have the need to filter the elements in a ListView.. of course I can filter elements before passing them to ListView by creating a new List, but it seems a lot cleaner to have an accept() method, just like in IFeedbackMessageFilter or whatever. ie: add( new ListView( list, myList ) ) { public void onPopulateItem( ListItem item ) { ... } public boolean accept( ListItem item ) { return ((MyEntity)item.getModel()).isActive(); } } Would this be trivial to add to the ListView component? ie: Aaron - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash
Re: [Wicket-user] Model and setObject?
Please see the other mail I sent.. Re: [Wicket-user] Playing withmodels:)/wicket.extensions.markup.html.form.palette.Palette; From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Johan Compagner Sent: 18. juli 2006 12:48 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Model and setObject? I have to see pallet component first but does that use a Multiple Select ListBox or something like that? Yes in 1.2 there is a the problem that it doesn't go through setObject it does it directly on the list. This will be fixed in 2.0. Because we did need to change some internal things first. I think there is an open bug report for this. johan On 7/17/06, Nino Wael [EMAIL PROTECTED] wrote: Hmm, when doing further debug. It seems as the backing object are updated but not via the models setObject command. Is it supposed to work like that? Regards Nino From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Nino Wael Sent: 17. juli 2006 15:02 To: wicket-user@lists.sourceforge.net Subject: [Wicket-user] Model and setObject? Hi Starting this over again, trying to explain more clearly what im doing here. I've created a AbstractModel that pretty much works as property model, only difference are that the setObject sets the object and does a little bit more. My model is attached to the wicket.extensions.markup.html.form.palette as the model representing user choices. The palette component consists of two listboxes and some buttons to move the selection, it moves the selection by _javascript_ so I have a submit button in my form aswell. My issue is that it seems as the models setObject are only called in the constructor, or when I explicitly call it? But I can clearly see that the palette gets updated correctly even if I switch pages. Regards Nino - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] ajax the wiki
Not sure about Best Practice, but DropDownChoice_Examples/More_Examples on the wiki (http://www.wicket-wiki.org.uk/wiki/index.php/DropDownChoice_Examples#More_Examples) shows the onSelectionChanged method and then the Ajax methods of handling the changes where you have two DropDownChoice components, with the values of the first determining the values of the second. /Gwyn On 17/07/06, Scott Swank [EMAIL PROTECTED] wrote: I want to take my first dive into Ajax with Wicket. Can anyone point me to a useful page on the wiki... or elsewhere. Alternately, I've read through the example code and a simple pointer toward one example or another as best practices would be swell. Many thanks, Scott -- Scott Swank reformed mathematician - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Playing with models:)/wicket.extensions.markup.html.form.palette.Palette;
yes you are right.But in 1.2 this couldn't be done because of some code that was sitting in the way (modelChanging/changed double called and so on)in 2.0 we pretty much have fixed that part i believe. now. Have to look at it further. johanOn 7/18/06, Nino Wael [EMAIL PROTECTED] wrote: I'll like to take you up on the discussion. I see the following pros and cons with this approach: Pro setObject: Allows the user to implement logic into the model If so desired Special conversions to satishfy wicket components needs, for example, wicket component needs one list but you have three, so join them in the get operator and split them in the set Logic, etc disable other components, notify … Hold the standard implicitly directed by having a set object method Feels the right way J Con setObject: Performance could be slightly improved? I do think that that using setObject on the model is something that always should be done; it creates a lot of flexibility and why have setObject if not to use it, if not it will only cause confusion. -regards Nino From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Igor Vaynberg Sent: 17. juli 2006 17:32 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Playing with models:)/wicket.extensions.markup.html.form.palette.Palette; components whose model is backed by a collection do not always call setobject() because they work on the collection directly so there is no need to call Collection c=model.getObject(); c.clear(); //refill c model.setObject(c); == NOOP and also in wicket there is a guard component.setObject(c) { if (c.equals(model.getobject()) { //noop } else { //clone for version tracking; model.setObject (c); } } the above saves on unnecessary cloning. just a few things to be aware of, whether or not we should call setobject() anyways is still up for discussion. i kinda think we should even though sometimes the objects are the same. -Igor On 7/17/06, Nino Wael [EMAIL PROTECTED] wrote: Strange then, it seems as the extension palette does not update on a submit? Does it somehow detach from its model? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] ] On Behalf Of Eelco Hillenius Sent: 17. juli 2006 12:14 To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Playing with models:) /wicket.extensions.markup.html.form.palette.Palette; When is setObject supposed to get called, Cause I only see it get called during construct? Whenever a (form)component has to update it's modelcontents. Or if you call setObject explicitly of course :() Typically, a component update is done by Form, which visits all it's children and calls updateModel on them. Eelco - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Modal Dialog
Like a Swing modal dialog? So that exeuction of code stops until the dialog is closedand then resumes again! CooljohanP.S. or is that called something else Cont.. ;) On 7/17/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Not at this time. Shouldn't be too hard to do, but we're still waitingfor someone to contribute it :)EelcoOn 7/17/06, Арву Оетук [EMAIL PROTECTED] wrote: Hi all. Is component like Modal Dialog exist in wicket framework? Dmitry. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user- Using Tomcat but need to do more? Need to support web services, security?Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Modal Dialog
Once I made a component like this. here is demonstration http://ruzin.fei.tuke.sk:8080/majcher/app the source code should be here, http://knopp.sk/modal.zip but a) it's wicket 1.1 b) there could be some glitches on java side Once I finish the tree I might rework it to make the modal dialog more solid and polished. -Matej Frank Bille Jensen wrote: +1 :) On Tue, 2006-07-18 at 14:30 +0200, Johan Compagner wrote: Like a Swing modal dialog? So that exeuction of code stops until the dialog is closed and then resumes again! Cool johan P.S. or is that called something else Cont.. ;) On 7/17/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Not at this time. Shouldn't be too hard to do, but we're still waiting for someone to contribute it :) Eelco On 7/17/06, Арву Оетук [EMAIL PROTECTED] wrote: Hi all. Is component like Modal Dialog exist in wicket framework? Dmitry. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Modal Dialog
Yay for Matej! Eelco On 7/18/06, Matej Knopp [EMAIL PROTECTED] wrote: Once I made a component like this. here is demonstration http://ruzin.fei.tuke.sk:8080/majcher/app the source code should be here, http://knopp.sk/modal.zip but a) it's wicket 1.1 b) there could be some glitches on java side Once I finish the tree I might rework it to make the modal dialog more solid and polished. -Matej Frank Bille Jensen wrote: +1 :) On Tue, 2006-07-18 at 14:30 +0200, Johan Compagner wrote: Like a Swing modal dialog? So that exeuction of code stops until the dialog is closed and then resumes again! Cool johan P.S. or is that called something else Cont.. ;) On 7/17/06, Eelco Hillenius [EMAIL PROTECTED] wrote: Not at this time. Shouldn't be too hard to do, but we're still waiting for someone to contribute it :) Eelco On 7/17/06, Арву Оетук [EMAIL PROTECTED] wrote: Hi all. Is component like Modal Dialog exist in wicket framework? Dmitry. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket Hibernate Application Transactions
its my 2c as well this is not a wicket-related problem anyhow - its http related problem. -Igor On 7/18/06, Eelco Hillenius [EMAIL PROTECTED] wrote: I don't think models have to be implementation details. Sometimes thatmakes sense, and in that case I usually like to embed the model classin the component itself. But lots of other times, you can make themodel so that it can easily be reused by other components, possibly at the same time. This is especially true for master detail relationsetc, something you can perfectly model with interdependent models.One of the main reasons for us wanting to apply generics in Wicket 2.0 is to have strongly typed models. In Wicket 2.0, components can forcethat they only accept models of a certain type (e.g. IModelPerson)so that you can have the same type of strong typing you have whenpassing pojos, but still hiding where the pojo comes from (or when). So in Wicket 2.0 a development approach where you pass models a lotmakes even more sense.That's just my 2c of course :)Eelco Currently I use models to hold, attach detach my persistent objects. About using IModels in constructors, I've mostly do it to be able to unit test my pages easier. But inside my application code, I prefer other components *not* to see or be aware of each other's internal models. That said, I prefer 'new PersonProfilePage(id,person)' instead of 'new PersonProfilePage(id,profileModel)'. I would like to hear comments on this, since I'm not sure everybody agrees. -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] RequestCycle scope
Is there a way to attach objects to a request cycle... I'm interested in creating session beans that live only during the duration of the request Aaron - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] RequestCycle scope
you can create your own subclass of the request cycle and tell wicket to use that instead.you can do that by overriding WebApplication.getDefaultRequesteCycleFactory and returning your own instance of the factory. -IgorOn 7/18/06, Aaron Hiniker [EMAIL PROTECTED] wrote: Is there a way to attach objects to a request cycle... I'm interested in creating session beans that live only during the duration of the request Aaron -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] RequestCycle scope
alternatively you can override WebSession.getRequestCycleFactory()-IgorOn 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote:you can create your own subclass of the request cycle and tell wicket to use that instead. you can do that by overriding WebApplication.getDefaultRequesteCycleFactory and returning your own instance of the factory. -IgorOn 7/18/06, Aaron Hiniker [EMAIL PROTECTED] wrote: Is there a way to attach objects to a request cycle... I'm interested in creating session beans that live only during the duration of the request Aaron -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] java.io.NotSerializableException on my session object
I just changed the log4j log level for wicket to DEBUG and now my application craps out with the following error: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: mystuff.wicketapp.MyWebSession Am I to assume that the entire hierarchy of class properties contained within MyWebSession must implement Serializable? If so can you offer any alternatives? Why does my app still work when the log level is set higher? I guess the real question is does it really work? I haven't tested clustering and state replication. I would assume that the above error would cause state replication to fail. True? -S2 -- Steve Moitozo II - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
this is not a requiremenet of wicket per se but that of the servlet containers. anything you keep in http session must be serializable. since wicket keeps most of its entities in session they must be serializable.when you set level to debug you tripped this: HttpSessionStore:47public void setAttribute(Request request, String name, Object value){// Do some extra profiling/ debugging. This can be a great help// just for testing whether your webbapp will behave when using // session replicationif (log.isDebugEnabled())the code inside the if block will try to serialize whatever you are trying to put into session immediately so there are no surprises during replication. there is no alternative as far as i know, simply a requirement that must be followed when dealing with java webapps and storing things in session.-IgorOn 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: I just changed the log4j log level for wicket to DEBUG and now myapplication craps out with the following error:Internal error cloning object. Make sure all dependent objects implementSerializable. Class: mystuff.wicketapp.MyWebSessionAm I to assume that the entire hierarchy of class properties containedwithin MyWebSession must implement Serializable? If so can you offer anyalternatives?Why does my app still work when the log level is set higher? I guess the real question is does it really work? I haven't tested clustering andstate replication. I would assume that the above error would cause statereplication to fail. True?-S2--Steve Moitozo II -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] Wicket Hibernate Application Transactions
Agreed. I don't think there's anything here that needs fixing. I was just saying that if Iman or anyone else wants to experiment with extended Hibernate sessions, I think that would be cool. (Reattaching orphaned Hibernate objects is not a road I would want to go down.) In the mean time our system of loading rows from the database on each request cycle is totally ligit and no different from practically every DB+HTTP app out there. Nathan Igor Vaynberg wrote: its my 2c as well this is not a wicket-related problem anyhow - its http related problem. -Igor - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
Thanks for the quick response. Do you know if there's a way to tell Java which parts of an object are vital during serialization and which can be ignored. I'm thinking about how Detachable Models work. Am I correct in assuming that if I do not correct this my app will continue to work in a single JVM environment but it will probably not work in a clustered environment? -S2 -- Steve Moitozo II Manager of Web Technology Bates College 207-786-6266 Get the Bates College CA Certificate at: http://www.bates.edu/ils/offices/web/crypto/ Igor Vaynberg wrote: this is not a requiremenet of wicket per se but that of the servlet containers. anything you keep in http session must be serializable. since wicket keeps most of its entities in session they must be serializable. when you set level to debug you tripped this: HttpSessionStore:47 public void setAttribute(Request request, String name, Object value) { // Do some extra profiling/ debugging. This can be a great help // just for testing whether your webbapp will behave when using // session replication if (log.isDebugEnabled()) the code inside the if block will try to serialize whatever you are trying to put into session immediately so there are no surprises during replication. there is no alternative as far as i know, simply a requirement that must be followed when dealing with java webapps and storing things in session. -Igor On 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: I just changed the log4j log level for wicket to DEBUG and now my application craps out with the following error: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: mystuff.wicketapp.MyWebSession Am I to assume that the entire hierarchy of class properties contained within MyWebSession must implement Serializable? If so can you offer any alternatives? Why does my app still work when the log level is set higher? I guess the real question is does it really work? I haven't tested clustering and state replication. I would assume that the above error would cause state replication to fail. True? -S2 -- Steve Moitozo II - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user smime.p7s Description: S/MIME Cryptographic Signature - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
There is a DEBUG level logger in wicket.protocol.http.HttpSessionStore that tries to serialize any attribute that is set. The development version - soon 1.2.1 - has a fix so that it doesn't depend on the log level, but instead on an application setting: if (Application.get().getDebugSettings().getSerializeSessionAttributes()) { String valueTypeName = (value != null ? value.getClass().getName() : null); try { final ByteArrayOutputStream out = new ByteArrayOutputStream(); new ObjectOutputStream(out).writeObject(value); log.debug(Stored attribute + name + { + valueTypeName + } with size: + Bytes.bytes(out.size())); } catch (Exception e) { throw new WicketRuntimeException( Internal error cloning object. Make sure all dependent objects implement Serializable. Class: + valueTypeName, e); } } The reason we deliver that functionality is to help you ensure you application can function properly in a cluster, using session replication. There are many strategies however, including a different approach than normal serializing, but serializing is the default, and is something you should use when you use a backing httpsession (Wicket's default) anyway. Anything that may end up in the session store, components (and their state), models, etc, should be serializable. If you want to pursue a different strategy, implement an ISessionStore that does this. Hope this helps, Eelco On 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: I just changed the log4j log level for wicket to DEBUG and now my application craps out with the following error: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: mystuff.wicketapp.MyWebSession Am I to assume that the entire hierarchy of class properties contained within MyWebSession must implement Serializable? If so can you offer any alternatives? Why does my app still work when the log level is set higher? I guess the real question is does it really work? I haven't tested clustering and state replication. I would assume that the above error would cause state replication to fail. True? -S2 -- Steve Moitozo II - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
On 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: Thanks for the quick response. Do you know if there's a way to tell Java which parts of an object are vital during serialization and which can be ignored. yep, the transient keyword. Transient fields will not be serialized (and thus null after serialization). Useful for lazy init fields. Am I correct in assuming that if I do not correct this my app will continue to work in a single JVM environment but it will probably not work in a clustered environment? Correct, if you use the default serialization mechanism. Fix is easy usually. Just let those classes implement Serializable. Eelco - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
Thanks for the quick response. Do you know if there's a way to tell Java which parts of an object are vital during serialization and which can be ignored. I'm thinking about how Detachable Models work.not really sure what you mean or why you would have to do that. what is the usecase for having something that is not serializable in session? Am I correct in assuming that if I do not correct this my app willcontinue to work in a single JVM environment but it will probably not work in a clustered environment?yep. the debug feature serializes immediately so you get the error now instead of whenever the servlet container tries to replicate your session for you - at which point you will get a very similar error. -Igor-S2--Steve Moitozo IIManager of Web Technology Bates College207-786-6266Get the Bates College CA Certificate at:http://www.bates.edu/ils/offices/web/crypto/Igor Vaynberg wrote: this is not a requiremenet of wicket per se but that of the servlet containers. anything you keep in http session must be serializable. since wicket keeps most of its entities in session they must be serializable. when you set level to debug you tripped this: HttpSessionStore:47 public void setAttribute(Request request, String name, Object value) { // Do some extra profiling/ debugging. This can be a great help // just for testing whether your webbapp will behave when using // session replication if (log.isDebugEnabled()) the code inside the if block will try to serialize whatever you are trying to put into session immediately so there are no surprises during replication. there is no alternative as far as i know, simply a requirement that must be followed when dealing with java webapps and storing things in session. -Igor On 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: I just changed the log4j log level for wicket to DEBUG and now my application craps out with the following error: Internal error cloning object. Make sure all dependent objects implement Serializable. Class: mystuff.wicketapp.MyWebSession Am I to assume that the entire hierarchy of class properties contained within MyWebSession must implement Serializable? If so can you offer any alternatives? Why does my app still work when the log level is set higher? I guess the real question is does it really work? I haven't tested clustering and state replication. I would assume that the above error would cause state replication to fail. True? -S2 -- Steve Moitozo II - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net 's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
i would be careful about using transient since you will have to implement null checks anytime you access that field.-IgorOn 7/18/06, Eelco Hillenius [EMAIL PROTECTED] wrote: On 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: Thanks for the quick response. Do you know if there's a way to tell Javawhich parts of an object are vital during serialization and which can be ignored.yep, the transient keyword. Transient fields will not be serialized(and thus null after serialization). Useful for lazy init fields. Am I correct in assuming that if I do not correct this my app will continue to work in a single JVM environment but it will probably not work in a clustered environment?Correct, if you use the default serialization mechanism. Fix is easyusually. Just let those classes implement Serializable. Eelco-Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cashhttp://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
not really sure what you mean or why you would have to do that. what is the usecase for having something that is not serializable in session? As I trace this issue through my code it's becoming apparent that since pages are added to the session any properties that is in a page that isn't serializable causes the error. So it's not that I want to store non-serializable things in the session necessarily. Many of my pages use third-party libraries that are not serializable and these seem to cause the issue. I'll admit I'm a new comer so I may be missing something or violating a Wicket principle as I build out my app. the debug feature serializes immediately so you get the error now instead of whenever the servlet container tries to replicate your session for you - at which point you will get a very similar error. Thank you for this! -S2 -- Steve Moitozo II - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] java.io.NotSerializableException on my session object
well, now that you are aware of this going should get better.in case you are storing beans from other framework that are not serializable i really dont see an easy way. the creators of those projects should make sure their objects are serializable. the only thing i see that you can do is to create a serializable bean yourself that has the necessary logic to translate to and from the other bean. or subclass it, override writeReplace/readReplace and do the same thing. in case you are talking about stateless objects from other frameworks you have a lot more options:use a pure getteruse a null-check-getter in conjunection with a transient field if lookups are expensive and you want to cache them for a while use a wicket-spring type of proxy that is serializable and knows how to look up the dependency - kinda like a middleman between your dependency and serialization-Igor On 7/18/06, Steve Moitozo [EMAIL PROTECTED] wrote: not really sure what you mean or why you would have to do that. what is the usecase for having something that is not serializable in session?As I trace this issue through my code it's becoming apparent that since pages are added to the session any properties that is in a page thatisn't serializable causes the error. So it's not that I want to storenon-serializable things in the session necessarily. Many of my pages use third-party libraries that are not serializable and these seem to causethe issue.I'll admit I'm a new comer so I may be missing something or violating aWicket principle as I build out my app. the debug feature serializes immediately so you get the error now instead of whenever the servlet container tries to replicate your session for you - at which point you will get a very similar error.Thank you for this!-S2--Steve Moitozo II -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] set static values on DropDownChoice
This seems like a lame question but I'm struggling again w/ the DropDownChoice control (using 1.2). I simply want to set static values to a DropDownChoice control so they can be drawn out later in the form's input class when it's submitted. I thought I had done this before but can't find that I have - how can I set, say, a Map of name/value pairs of Strings? In this case I'm not providing a ListT of values to the dropdown but rather a MapString, String of static values - unless of course there's an easier way. This control still feels cumbersome to work worthperhaps it's just me? Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] More examples of sorting?
Is there something smaller simpler out there I could refer to for sorting? I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me. I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on the table. I think if I just had a couple real-world examples I'd pick it up faster. How's that book coming along? :D Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] More examples of sorting?
what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider.class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() { return mydao.countcontacts(); } model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); }}and that gets you paging, sorting is like thismydataprovider extends sortabledataprovider { // ditto from above iterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount(); }}if you have more specific questions i will be happy to help you -IgorOn 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to forsorting?I've glanced at the DataView example a few times and once Istart digging in it just seems unwieldly to me.I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examplesis a bit complicated to try and pick through.I gave paging a shot yesterday but quickly figured out it wouldn't bea snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on thetable.I think if I just had a couple real-world examples I'd pick it up faster.How's that book coming along? :DThanks! -Take Surveys. Earn Cash. Influence the Future of ITJoin SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] More examples of sorting?
Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in a ListViewbut it appears now that I'm browsing through I'm going to have to create one and implement some of the methods like you have in order to get paging/sorting. I'll play w/ it...it was just a little more than I expected once I started digging into it. On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider. class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() { return mydao.countcontacts(); } model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); } } and that gets you paging, sorting is like this mydataprovider extends sortabledataprovider { // ditto from above iterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount(); } } if you have more specific questions i will be happy to help you -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to for sorting? I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me. I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on the table. I think if I just had a couple real-world examples I'd pick it up faster. How's that book coming along? :D Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
Re: [Wicket-user] More examples of sorting?
yep, you have to code your daos with paging and sorting in mind, it cannot be slapped on as an afterthought.let me give you some cluessee the attached QueryParam class, all my finder dao methods take it so that they can page/sort accordingly. hope it gets you started-IgorOn 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote:Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in aListViewbut it appears now that I'm browsing through I'm going tohave to create one and implement some of the methods like you have inorder to get paging/sorting. I'll play w/ it...it was just a little more than I expected once Istarted digging into it.On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider. class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator();} int size() {return mydao.countcontacts();} model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); } } and that gets you paging, sorting is like this mydataprovider extends sortabledataprovider {// ditto from aboveiterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount();} } if you have more specific questions i will be happy to help you -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to for sorting?I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me.I'm simply trying tosort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on the table. I think if I just had a couple real-world examples I'd pick it up faster. How's that book coming along? :D Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user-Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share youropinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___Wicket-user mailing listWicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user package ptabs.webapp.support; import java.util.ArrayList; import java.util.List; import ptabs.util.AssertUtils; public class QueryParam { int first; int count; ListSortState sort = new ArrayListSortState(1); public QueryParam(int first, int count) { this.first = first; this.count = count; } public QueryParam(int first, int count, SortState sortState) { this(first, count); AssertUtils.argNotNull(sortState); addSortState(sortState); } /** * Returns first * * @return the first */ public int getFirst() { return first; } /** * Sets first * * @param first the first to set */ public void setFirst(int first) { this.first = first; } /** * Returns count * * @return the count */ public int getCount() { return count; } /** * Sets count * * @param count the count to set */ public void setCount(int last) { this.count = last; } /** * Returns list of sort states * * @return list of sort states */ public ListSortState getSort() { return sort; } public void addSortState(SortState state) { AssertUtils.argNotNull(state); sort.add(state); } public void prependSortState(SortState state) { AssertUtils.argNotNull(state);
Re: [Wicket-user] More examples of sorting?
Well, I don't have DAOs in this particular project - it's an EJB3 project where I'm simply using SLSBs as DAOsso I have the EntityManager to work from and I should be able to bring the two together to facilitate this... This may be easier than I thought On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yep, you have to code your daos with paging and sorting in mind, it cannot be slapped on as an afterthought. let me give you some clues see the attached QueryParam class, all my finder dao methods take it so that they can page/sort accordingly. hope it gets you started -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in a ListViewbut it appears now that I'm browsing through I'm going to have to create one and implement some of the methods like you have in order to get paging/sorting. I'll play w/ it...it was just a little more than I expected once I started digging into it. On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider. class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() { return mydao.countcontacts(); } model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); } } and that gets you paging, sorting is like this mydataprovider extends sortabledataprovider { // ditto from above iterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount(); } } if you have more specific questions i will be happy to help you -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to for sorting? I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me. I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on the table. I think if I just had a couple real-world examples I'd pick it up faster. How's that book coming along? :D Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
Re: [Wicket-user] More examples of sorting?
then the only semidifficult part is the sorting - you need to come up with some utils that append the sort for you.as far as paging it would translate directly tosession.setFirstResult(queryparam.getFirst()).setMaxResults( queryparam.getCount());-IgorOn 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Well, I don't have DAOs in this particular project - it's an EJB3project where I'm simply using SLSBs as DAOsso I have the EntityManager to work from and I should be able to bring the twotogether to facilitate this...This may be easier than I thoughtOn 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yep, you have to code your daos with paging and sorting in mind, it cannot be slapped on as an afterthought. let me give you some clues see the attached QueryParam class, all my finder dao methods take it so that they can page/sort accordingly. hope it gets you started -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in a ListViewbut it appears now that I'm browsing through I'm going to have to create one and implement some of the methods like you have in order to get paging/sorting. I'll play w/ it...it was just a little more than I expected once I started digging into it. On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider. class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() { return mydao.countcontacts(); } model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); } } and that gets you paging, sorting is like this mydataprovider extends sortabledataprovider { // ditto from above iterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount(); } } if you have more specific questions i will be happy to help you -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to for sorting?I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me.I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on the table. I think if I just had a couple real-world examples I'd pick it up faster. How's that book coming along? :D Thanks! - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user
Re: [Wicket-user] More examples of sorting?
Wow...ok...I'm making a total disaster of this. I can't help but think there's an easier way. :( I've got this method in what we could call a dao: public ListIncident getFiltered(int first, int count, String orderBy) { String query = select i from Incident i order by :orderBy; Query q = this.em.createQuery(query); q.setParameter(orderBy, orderBy); q.setFirstResult(first); q.setMaxResults(count); return q.getResultList(); } And I've got started what might someday become a provider class: public class IncidentsProvider extends SortableDataProvider implements IDetachable { private transient ListIncident incidents; /** * default ctor */ public IncidentsProvider(Integer first, Integer count, String orderBy) { this.incidents = myDao.getFiltered(first, count, orderBy); setSort(openDate, true); } public Iterator iterator(int first, int count) { return this.incidents.listIterator(first); // - what do do? } public int size() { return this.incidents.size(); } public IModel model(Object object) { return new Model((Serializable)object); } public void detach() { this.incidents = null; } } As you can see, I'm trying to marry my provider to my DAO as closely as possible...I'm not worried about elegance and cleanliness right now - just trying to take it one step at a time and get it *working*. I can make some sort of 'if asc then make desc' and vice/versa afterward Sorry, it's been a long day...maybe I need a breaktwo or three weeks ought to do it. On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: then the only semidifficult part is the sorting - you need to come up with some utils that append the sort for you. as far as paging it would translate directly to session.setFirstResult(queryparam.getFirst()).setMaxResults( queryparam.getCount()); -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Well, I don't have DAOs in this particular project - it's an EJB3 project where I'm simply using SLSBs as DAOsso I have the EntityManager to work from and I should be able to bring the two together to facilitate this... This may be easier than I thought On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yep, you have to code your daos with paging and sorting in mind, it cannot be slapped on as an afterthought. let me give you some clues see the attached QueryParam class, all my finder dao methods take it so that they can page/sort accordingly. hope it gets you started -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in a ListViewbut it appears now that I'm browsing through I'm going to have to create one and implement some of the methods like you have in order to get paging/sorting. I'll play w/ it...it was just a little more than I expected once I started digging into it. On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider. class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() { return mydao.countcontacts(); } model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); } } and that gets you paging, sorting is like this mydataprovider extends sortabledataprovider { // ditto from above iterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount(); } } if you have more specific questions i will be happy to help you -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to for sorting? I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me. I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap
Re: [Wicket-user] More examples of sorting?
I appreciate it Frank, however I'm not familiar w/ DataTable or the SortableDataProvider - this is my first run. Really what I need is to see sorting working and I haven't even gotten that far. I'd be willing to take a lookit might be easier to see it working w/ plain JDBC to get a view of this w/ a different perspective, if anything. Thanks! On 7/18/06, Frank Silbermann [EMAIL PROTECTED] wrote: If your SLSBs were not coded with paging and sorting in mind, you'll probably have to implement a layer that understands sorting and paging to stand between your SortableDataProvider and your SLSBs. To do that in an ad-hoc way relevant to one specific set of data is probably time consuming at worst, but a general approach doesn't sound very easy to me. Is your data set too large to keep in the WebPage on the server while your user plays with it, sorting it this way and that? Must you throw away the data between postbacks, re-querying each time? If not, why don't you take a look at the classes I posted to the group last week (and sent you in private e-mail as well)? Even if you're not interested in getting your data via vanilla JDBC SQL SELECT queries, I'm sure my approach can be adapted. My code is not difficult to read if you are at all familiar with DataTable and SortableDataProvider. I'd be happy to answer any questions. /Frank -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vincent Jenks Sent: Tuesday, July 18, 2006 4:50 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] More examples of sorting? Well, I don't have DAOs in this particular project - it's an EJB3 project where I'm simply using SLSBs as DAOsso I have the EntityManager to work from and I should be able to bring the two together to facilitate this... This may be easier than I thought On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: yep, you have to code your daos with paging and sorting in mind, it cannot be slapped on as an afterthought. let me give you some clues see the attached QueryParam class, all my finder dao methods take it so that they can page/sort accordingly. hope it gets you started -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Currently I don't have anything like the ContactsDatabase class in 'examples' - I'm just pulling a list of data and displaying in a ListViewbut it appears now that I'm browsing through I'm going to have to create one and implement some of the methods like you have in order to get paging/sorting. I'll play w/ it...it was just a little more than I expected once I started digging into it. On 7/18/06, Igor Vaynberg [EMAIL PROTECTED] wrote: what could be simpler then the dataview? its just like a listview only instead of being fed off the list it is fed from the idataprovider. class mydataprovider implements idataprovider() { iterator iterator(int first, int count) { return mydao.findcontacts(first, count).iterator(); } int size() { return mydao.countcontacts(); } model model(object o) { Contact contact=(Contact)o; return new ContactDetachableModel(contact); //or return new Model(contact); } } and that gets you paging, sorting is like this mydataprovider extends sortabledataprovider { // ditto from above iterator iterator(int first, int last) { return mydao.findcontacts(first, last, getsort().getproperty(), getsort().getcount(); } } if you have more specific questions i will be happy to help you -Igor On 7/18/06, Vincent Jenks [EMAIL PROTECTED] wrote: Is there something smaller simpler out there I could refer to for sorting? I've glanced at the DataView example a few times and once I start digging in it just seems unwieldly to me. I'm simply trying to sort a List of entities and the getContactsDB() stuff in the examples is a bit complicated to try and pick through. I gave paging a shot yesterday but quickly figured out it wouldn't be a snap to throw together like most wicket stuff I've done so farI'm in a crunch or I'd spend more time banging my head on the table. I think if I just had a couple real-world examples I'd pick it up faster. How's that book coming along? :D Thanks! -- --- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEV DEV