[Wicket-user] IAjaxIndicatorAware and AbstractDefaultAjaxBehavior's findIndicatorId() feature request
In wicket 1.2.5, is not possible (at least I didn't manage to find a way) to add AjaxIndicator image to a page for all Ajax requests made by its child components. Currently, the AbstractDefaultAjaxBehavior has a findIndicatorId() method which is responsible to find the component id which should be Ajax indicator. [code] private String findIndicatorId() { if (getComponent() instanceof IAjaxIndicatorAware) { return ((IAjaxIndicatorAware)getComponent()).getAjaxIndicatorMarkupId(); } if (this instanceof IAjaxIndicatorAware) { return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId(); } return null; } [code] Wouldn't it be better if instead of checking only if : - the getComponent is instance of the IAjaxIndicatorAware interface, the check would be made up in hierarchy to find the first parent which implements the IAjaxIndicatorAware interface? Thus, if my page implements the IAjaxIndicatorAware interface, it will indicate any ajax requests of its components... exact what I need right now. What do you think about it? Thank you! -- View this message in context: http://www.nabble.com/IAjaxIndicatorAware-and-AbstractDefaultAjaxBehavior%27s-findIndicatorId%28%29-feature-request-tf3535594.html#a9868905 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] onSelectionChanged and session-in-view
It's not a good idea to use LoadableDetachableModel for entities that you edit. Because they are detached after every request. LoadableDetachableModel is best for View scenarios, when you need fresh data on every request. In case you are editing entities, like you do, load the entity only once, e.g. when creating the page and set it as page property. Without using LoadableDetachableModel. -Matej On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Same can be said for ajax update behaviour. See for example: TextField password = new TextField(password); AjaxFormComponentUpdatingBehavior ajaxBehaviour = new AjaxFormComponentUpdatingBehavior(onblur) { protected void onUpdate(AjaxRequestTarget target) { System.out.println(ajaxUpdated); } }; password.add(ajaxBehaviour); The output: - getPassword setPassword --- here ajaxUpdated Should I avoid directly using persistent objects for models? What do you suggest? I could serialize an (hibernate)detached object as a form field and then re-attach it on form submission. Or I could load and (hibernate)detach the object on every request (same as I'm doing now, but detaching from session immediately after loading). Or I could use a plain dto. Cheers, Carlos On 4/5/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm a bit concerned about onSelectionChanged event effectively binding my model. Suppose my model is a LoadableDetachableModel that is loaded from the repository every time. Normally (upon form submission) nothing will be bound after successfully passing validation; then additional logic will run inside a transactional service and a rollback thrown if something goes wrong (take into account that I'm using session-in-view). But if a property of my model object is bound outside this controlled scenario, the change will be persisted upon session correct finalization, even if the object is invalid. I observed that during onSelectionChanged execution the changed property is effectively bound, so how should I deal with this? Here is an example with a simple User that has a sex property allowing the usual two values, note how setSex is called during execution of onSelectionChanged: The ouput for onSelectionChanged -- loadSexModel getSex setSex --- here getSex selectionChanged getSex The user domain entity. -- public class User implements Serializable { [...] private String sex; [...] public String getSex() { System.out.println(getSex); return sex; } public void setSex(String sex) { System.out.println(setSex); this.sex = sex; } } The sex choice. -- DropDownChoice sex = new DropDownChoice(sex, getSexModel()) { protected void onSelectionChanged(Object newSelection) { System.out.println(selectionChanged); } protected boolean wantOnSelectionChangedNotifications() { return true; } }; The sex model. - private IModel getSexModel() { return new LoadableDetachableModel() { protected Object load() { System.out.println(loadSexModel); return Arrays.asList(Masculine, Feminine); } }; } Cheers, Carlos - 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
[Wicket-user] JavaScript Hijacking
Hi! How protected is Wicket against JavaScript Hijacking, as described in this paper? http://www.fortifysoftware.com/servlet/downloads/public/JavaScript_Hijacking.pdf http://www.fortifysoftware.com/servlet/downloads/public/JavaScript_Hijacking.pdf Best Regards Niels Bo -- View this message in context: http://www.nabble.com/JavaScript-Hijacking-tf3536320.html#a9870835 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] onSelectionChanged and session-in-view
Hi Matej, what about entities with lazy loaded associations that are not easily detachable/re-attachable from/to their hibernate session? I was never sure on how to do this, maybe dto is a healthier alternative despite introducing a lot of duplication. Anyway, I've done little tests with spring OpenSessionInViewFilter and things DO work as I desire. I mean changes are committed only when a @Transactional method is invoked, not during events that simply update the model without submitting. I'm still not sure about how this behaviour is implemented. Perhaps a read-only transaction is started with the session, then the @Transactional method updates it to read-write (if this can be done, if not I guess it starts a new one instead) and commit it upon returning (or rollback it when an exception is thrown), finally a new read-only transaction is started (or maybe the old one is resumed...). Well, as you can see, I'm lost here. This belongs to springforum but anyway: anyone here is aware of what is happening behind the scenes with OpenSessionInViewFilter and @Transactional services (defaults for @Transactional: read-write, propagation-required...)? I mean, which is the transaction before and after the service method invocation? Would changes occurred during these before/after transactions be flushed (from my experiments, the answer is no)? Best regards, Carlos On 4/6/07, Matej Knopp [EMAIL PROTECTED] wrote: It's not a good idea to use LoadableDetachableModel for entities that you edit. Because they are detached after every request. LoadableDetachableModel is best for View scenarios, when you need fresh data on every request. In case you are editing entities, like you do, load the entity only once, e.g. when creating the page and set it as page property. Without using LoadableDetachableModel. -Matej On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Same can be said for ajax update behaviour. See for example: TextField password = new TextField(password); AjaxFormComponentUpdatingBehavior ajaxBehaviour = new AjaxFormComponentUpdatingBehavior(onblur) { protected void onUpdate(AjaxRequestTarget target) { System.out.println(ajaxUpdated); } }; password.add(ajaxBehaviour); The output: - getPassword setPassword --- here ajaxUpdated Should I avoid directly using persistent objects for models? What do you suggest? I could serialize an (hibernate)detached object as a form field and then re-attach it on form submission. Or I could load and (hibernate)detach the object on every request (same as I'm doing now, but detaching from session immediately after loading). Or I could use a plain dto. Cheers, Carlos On 4/5/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm a bit concerned about onSelectionChanged event effectively binding my model. Suppose my model is a LoadableDetachableModel that is loaded from the repository every time. Normally (upon form submission) nothing will be bound after successfully passing validation; then additional logic will run inside a transactional service and a rollback thrown if something goes wrong (take into account that I'm using session-in-view). But if a property of my model object is bound outside this controlled scenario, the change will be persisted upon session correct finalization, even if the object is invalid. I observed that during onSelectionChanged execution the changed property is effectively bound, so how should I deal with this? Here is an example with a simple User that has a sex property allowing the usual two values, note how setSex is called during execution of onSelectionChanged: The ouput for onSelectionChanged -- loadSexModel getSex setSex --- here getSex selectionChanged getSex The user domain entity. -- public class User implements Serializable { [...] private String sex; [...] public String getSex() { System.out.println(getSex); return sex; } public void setSex(String sex) { System.out.println(setSex); this.sex = sex; } } The sex choice. -- DropDownChoice sex = new DropDownChoice(sex, getSexModel()) { protected void onSelectionChanged(Object newSelection) { System.out.println(selectionChanged); } protected boolean wantOnSelectionChangedNotifications() { return true; } }; The sex model. - private IModel getSexModel() { return new LoadableDetachableModel() { protected Object load() { System.out.println(loadSexModel); return Arrays.asList(Masculine, Feminine); } }; } Cheers, Carlos
Re: [Wicket-user] JavaScript Hijacking
Hi Wicket applications shouldn't be affected by javascript hijacking. To be able to use this kind of hijacking, ajax response has to be directly executable javascript. Wicket's Ajax response is a xml file, which can not be directly evaluated, thus loading it from remote site using the script tag will not work. And Wicket's urls are dynamic, so there is not an easy way for the malicious site to guess the URL. There is one thing to be careful about though. But this is not specific to Wicket, this is specific to all kind of web application. If you have e.g. blog application that allows users to enter comment that other users can see, always escape the script tags, so that user can't post script tag in a comment, as this can be used to steal other user's confidential informations. -Matej On 4/6/07, Niels Bo [EMAIL PROTECTED] wrote: Hi! How protected is Wicket against JavaScript Hijacking, as described in this paper? http://www.fortifysoftware.com/servlet/downloads/public/JavaScript_Hijacking.pdf http://www.fortifysoftware.com/servlet/downloads/public/JavaScript_Hijacking.pdf Best Regards Niels Bo -- View this message in context: http://www.nabble.com/JavaScript-Hijacking-tf3536320.html#a9870835 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] Framework Evaluation
I am definitely going to check out 1.3. Any idea when it will become less of a moving target? -scott -Original Message- From: [EMAIL PROTECTED] [mailto:wicket-user- [EMAIL PROTECTED] On Behalf Of Matej Knopp Sent: Thursday, April 05, 2007 6:14 PM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Framework Evaluation Right, it should, but if you are not using sticky sessions, the path where serialized pages are stored must be accessible from all nodes. -Matej On 4/5/07, Eelco Hillenius [EMAIL PROTECTED] wrote: I would love nothing more than to have Wicket as the de facto where I work. Unfortunately, the application server admin is somewhat worried about the amount of heap space my app uses. I am working at profiling the app to see where the real issue lies. Unfortunately, it has been almost impossible to get any hard numbers from him on how big a slice he has had to a lot my app. The funny thing is we have multiple apps in production (non-Wicket) whose sessions' are so big that they can't be clustered in Weblogic. My Wicket app clusters just fine so I am not sure why he has such trepidation about using Wicket in more places. It's the unfortunate knee-jerk reaction people have when they hear Wicket uses server side memory. Only thing you can say to those people is 'measure before you make conclusions'. You've heard of the root of all evil: 'premature optmization'. Java EE has a lot of that unfortunately. Anyway, if you upgrade to 1.3 and use SecondLevelCacheSessionStore (the default for 1.3) you'll find that memory usage dropped quite a bit. 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=DEVDE V ___ 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=DEVDE V ___ 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] Framework Evaluation
I am definitely going to check out 1.3. Any idea when it will become less of a moving target? In a couple of weeks. Basically when all the items listed here http://cwiki.apache.org/confluence/display/WICKET/Backporting+features+from+trunk are backported. We'll announce it on the list when that is done. 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] onSelectionChanged and session-in-view
It's not a good idea to use LoadableDetachableModel for entities that you edit. Because they are detached after every request. Sorry, but I don't agree with that :) LDMs are my favorite models for such use. The only thing you have to keep in mind is to persist any changes coming in with a request you are interested in, or you'll lose them. But if you do that, it'll work fine. 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] IAjaxIndicatorAware and AbstractDefaultAjaxBehavior's findIndicatorId() feature request
i think that can work, please add an rfe. we do have global js hooks that you can use to create a global indicator. -igor On 4/6/07, Alex Objelean [EMAIL PROTECTED] wrote: In wicket 1.2.5, is not possible (at least I didn't manage to find a way) to add AjaxIndicator image to a page for all Ajax requests made by its child components. Currently, the AbstractDefaultAjaxBehavior has a findIndicatorId() method which is responsible to find the component id which should be Ajax indicator. [code] private String findIndicatorId() { if (getComponent() instanceof IAjaxIndicatorAware) { return ((IAjaxIndicatorAware)getComponent()).getAjaxIndicatorMarkupId(); } if (this instanceof IAjaxIndicatorAware) { return ((IAjaxIndicatorAware)this).getAjaxIndicatorMarkupId(); } return null; } [code] Wouldn't it be better if instead of checking only if : - the getComponent is instance of the IAjaxIndicatorAware interface, the check would be made up in hierarchy to find the first parent which implements the IAjaxIndicatorAware interface? Thus, if my page implements the IAjaxIndicatorAware interface, it will indicate any ajax requests of its components... exact what I need right now. What do you think about it? Thank you! -- View this message in context: http://www.nabble.com/IAjaxIndicatorAware-and-AbstractDefaultAjaxBehavior%27s-findIndicatorId%28%29-feature-request-tf3535594.html#a9868905 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] onSelectionChanged and session-in-view
On 4/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's not a good idea to use LoadableDetachableModel for entities that you edit. Because they are detached after every request. Sorry, but I don't agree with that :) LDMs are my favorite models for such use. The only thing you have to keep in mind is to persist any changes coming in with a request you are interested in, or you'll lose them. But if you do that, it'll work fine. I used to thought like that too (a couple of hours ago :) ), but I find the approach clumsy when a lot of ajax round-trips are involved; the object is reloaded just for setting a property and discarded again; also, depending on how you configure your transactions, you could end up persisting partial non-validated changes (although I should say that from my observations this doesn't happen inside a vanilla OpenSessionInViewFilter spring setting). I've been coding some examples with convoluted entity lazy-loaded associations and, despite my previous fears, detaching/re-attaching it from/to the hibernate session works like a charm. I think I will tag all my editable entities as Serializable and embrace this approach. Cheers, Carlos 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 - 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] Framework Evaluation
Eelco Hillenius wrote: I've never worked with T myself, but read a book on it and browsed through the source code. The funny thing is that I was about to start a proof of concept in it for the company I worked for three years ago. But Johan just got out of a project that used it, and explained some of the problems it had (T 3). So we took a look at JSF, didn't like that either and decided to forget about proposing a new framework (though we had some serious maintenance issues with our model 2 based apps). Then Johan (again) found Wicket a couple of months later and we agreed that this was exactly what we were looking for, even though it was still in pre-pre-pre-alpha. Anyway, for T's defense, my hunch is that it is still a hell of a lot better than using model 2 frameworks. Especially now that I've been working with Wicket for a while, there is just not a single thing I find good or useful about them. Stripes provides a programming model that at least fixes some of the most annoying things that exist in the other model 2 frameworks, but still, the concept of model 2 is utterly broken imo. And T *was* one of the first Java frameworks to try to provide a better programming model. Gotta give HLS credit for that :) I've done quite a bit of coding with Tapestry 4.0 and was very impressed with the architecture and with how productive I could be. But when I had a need for javascript support, things didn't look so good. The community has been working on it for over a year, and it still hasn't stabilised, while in parallel, HLS is inventing a whole new Tapestry 5 that is not 100% backwards-compatible. To me this says that the architecture is not as extensible as Wicket's, which seems to support javascript quite effortlessly. I'm new to Wicket, so I'm still in evaluation mode, but so far so good. Julian -- View this message in context: http://www.nabble.com/Framework-Evaluation-tf3527931.html#a9874881 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] onSelectionChanged and session-in-view
If it works well, anything outside of a transaction should well... be outside the transaction :) So anything touched in a read-only (auto started) transaction should never be upgraded to a write one. I'm not a Spring expert though. But that's what you can expect from the library. This matches my own observations so it concludes the proof :). I will assume that it works this way from now on. Cheers, Carlos 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 - 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] onSelectionChanged and session-in-view
On 4/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's not a good idea to use LoadableDetachableModel for entities that you edit. Because they are detached after every request. Sorry, but I don't agree with that :) LDMs are my favorite models for such use. The only thing you have to keep in mind is to persist any changes coming in with a request you are interested in, or you'll lose them. But if you do that, it'll work fine. I used to thought like that too (a couple of hours ago :) ), but I find the approach clumsy when a lot of ajax round-trips are involved; Inefficient by default rather. Yes, you have to choose whether you want objects that are always recent and have a small memory foot print, or you want a 'working object' that can readily be edited. But if you enable a cache for the objects you are working with, it's hardly less effecient to use the LDMs. the object is reloaded just for setting a property and discarded again; also, depending on how you configure your transactions, you could end up persisting partial non-validated changes (although I should say that from my observations this doesn't happen inside a vanilla OpenSessionInViewFilter spring setting). I don't really understand what you mean here I'm afraid. If you save an object, surely you validate completely? And also, Wicket would touch only the properties it has models/ components attached to. The object you loaded from the store/ database is valid (or it wouldn't have been there in the first place, right?), so the only things that have to be validated are those extra changes. I've been coding some examples with convoluted entity lazy-loaded associations and, despite my previous fears, detaching/re-attaching it from/to the hibernate session works like a charm. I think I will tag all my editable entities as Serializable and embrace this approach. Sounds good. Can you share a code snippet? 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] onSelectionChanged and session-in-view
On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: On 4/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's not a good idea to use LoadableDetachableModel for entities that you edit. Because they are detached after every request. Sorry, but I don't agree with that :) LDMs are my favorite models for such use. The only thing you have to keep in mind is to persist any changes coming in with a request you are interested in, or you'll lose them. But if you do that, it'll work fine. find the approach clumsy when a lot of ajax round-trips are involved; the object is reloaded just for setting a property and discarded again; also, depending on how you configure your transactions, you could end up persisting partial non-validated changes Also, reloading the entity from state zero every time could be problematic when incrementally updating it using ajax. In this case just the updated property P is bound during the ajax request. Normally this is enough for chained dropdowns and the like. But in the general case, if there are other dependant properties Q1,...,Qn that should be updated as a function of the modified property P and others P1,...,Pm (whose value would be that of state zero, disregarding any previous update), you have a problem. Anyway, I don't think that this scenario would be frequent in practice. Cheers, Carlos (although I should say that from my observations this doesn't happen inside a vanilla OpenSessionInViewFilter spring setting). I've been coding some examples with convoluted entity lazy-loaded associations and, despite my previous fears, detaching/re-attaching it from/to the hibernate session works like a charm. I think I will tag all my editable entities as Serializable and embrace this approach. Cheers, Carlos 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 - 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] onSelectionChanged and session-in-view
Also, reloading the entity from state zero every time could be problematic when incrementally updating it using ajax. Not if you save it every time :) But yes, if you do an update in steps, and only want to commit changes at the end (relevant not only with Ajax, but also e.g. with a wizard) this clearly wouldn't be the way to go. Working on a detached object or even value objects would be better then. I think you can mix approaches without problems if you are just aware of what you're doing. Sounds like a good item for the WIKI btw. 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] onSelectionChanged and session-in-view
the object is reloaded just for setting a property and discarded again; also, depending on how you configure your transactions, you could end up persisting partial non-validated changes (although I should say that from my observations this doesn't happen inside a vanilla OpenSessionInViewFilter spring setting). I don't really understand what you mean here I'm afraid. If you save an object, surely you validate completely? And also, Wicket would Please refer to my first post in this thread. My concern originates because of model changes during event handler executions. This handlers (for example the onSelectionChanged of the subject) discretely change properties of the model object without validating it as a whole (including further validation that happens inside business logic, encapsulated into services from the ui viewpoint). At first I assumed a transaction-per-request behaviour, so I was afraid that this changes could be silently persisted. Then, after I experimented a bit with OpenSessionInViewFilter, I found out that these discrete changes are ignored and never flushed to the session, because they don't occur inside a @Transactional method. So it all depends on the pattern you are using to associate sessions/txs to request. Cheers, Carlos touch only the properties it has models/ components attached to. The object you loaded from the store/ database is valid (or it wouldn't have been there in the first place, right?), so the only things that have to be validated are those extra changes. I've been coding some examples with convoluted entity lazy-loaded associations and, despite my previous fears, detaching/re-attaching it from/to the hibernate session works like a charm. I think I will tag all my editable entities as Serializable and embrace this approach. Sounds good. Can you share a code snippet? 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 - 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] onSelectionChanged and session-in-view
I've been coding some examples with convoluted entity lazy-loaded associations and, despite my previous fears, detaching/re-attaching it from/to the hibernate session works like a charm. I think I will tag all my editable entities as Serializable and embrace this approach. Sounds good. Can you share a code snippet? Yes, I will post one later. Anyway, up till now it goes as simple as: The entity to update has some associations (of any cardinality), some of which are lazily-loaded and some of which are eagerly-loaded. If you need to edit some of the lazy ones, you have to invoke its getter at some point while constructing the form (this would be normally done by a form field, so you don't need to explicitly do it). If you don't want to edit some of the eager associates then (i) if it's small (so that it really makes sense to make it eager from a db viewpoint) serialize it anyway into the session (ii) if it's too big then you'd better turn it into lazy. So in fact most of the time you don't need to do anything special. Just something like: class MyForm extends Form { private Entity entity; public MyForm(String id, Integer entityId) { super(id); entity = entityRepository.findById(entityId); setModel(new CompoundPropertyModel(entity)); [] } Also with the LDMs approach my service update method will be empty, its only motivation being that of transactionality: @Transactional void update(Entity entity) {} But now it must re-attach the detached entity, so I have to change it into: @Transactional void update(Entity entity) { getHibernateTemplate().update(entity); } And of course, don't forget to make all involved entities Serializable (but don't worry about the lazy ones that aren't exposed to the user, the esoteric stuff they are made of :) will serialize just fine). That's all, I think. Cheers, Carlos 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 - 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] Classloader for selectively reload web tier
Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) and it doesn't play well with the java-centric approach of wicket, which requires more refactoring and sophisticated coding than others. Cheers, Carlos - 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] Classloader for selectively reload web tier
I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? See wicket.protocol.http.ReloadingWicketFilter. YMMV though, as Wicket is an unmanaged framework, meaning it depends more on the facilities the JDK provides. Some SDK implementations are working on improved support (I think Johan has some experience with IBM JDK: http://www-128.ibm.com/developerworks/java/jdk/eclipse/ ?) and see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812 (and vote!). Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) See that issue at SUN. :) 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
[Wicket-user] Help Me Improve Wicket Quickstart
Can anyone send me pointers for setting up quickstart manually? (scripts, build file w/ exec, etc) Who to talk to to create a generic quickstart setup document? I am interested in helping to improve the Quickstart download. I would be more pleased if the quickstart first presented a generic quickstart with NetBeans, Idea, and Eclipse as additional setups. The QuickStart should at the least illustrate how to get Wicket up and running manually (script for lauching, etc) I can set all of this up myself but help will make it quicker and more pleasing. :-) 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] Classloader for selectively reload web tier
See wicket.protocol.http.ReloadingWicketFilter. YMMV though, as Wicket I will give this filter a try. I see it's included in the trunk but not in 1.2.x releases. Is it compatible with wicket 1.2.5? the JDK provides. Some SDK implementations are working on improved support (I think Johan has some experience with IBM JDK: http://www-128.ibm.com/developerworks/java/jdk/eclipse/ ?) and see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812 (and vote!). Yes, I'm using ibm jdk too, but still get a lot of hot replacement errors, specially during preliminary instances of page development which are subject to more refactoring. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) See that issue at SUN. :) I've read http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812 before. It make me feel kinda sad. Cheers, Carlos 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 - 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] Help Me Improve Wicket Quickstart
in quickstart you can do mvn eclipse:eclipse to generate an eclipse project, or mvn idea:idea for idea. you can writeup a document on the wiki, and if we all like it we can export it into quickstart's readme or something like that -igor On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: Can anyone send me pointers for setting up quickstart manually? (scripts, build file w/ exec, etc) Who to talk to to create a generic quickstart setup document? I am interested in helping to improve the Quickstart download. I would be more pleased if the quickstart first presented a generic quickstart with NetBeans, Idea, and Eclipse as additional setups. The QuickStart should at the least illustrate how to get Wicket up and running manually (script for lauching, etc) I can set all of this up myself but help will make it quicker and more pleasing. :-) 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
Re: [Wicket-user] Classloader for selectively reload web tier
See wicket.protocol.http.ReloadingWicketFilter. YMMV though, as Wicket I will give this filter a try. I see it's included in the trunk but not in 1.2.x releases. Is it compatible with wicket 1.2.5? Nope. Not planned either, sorry. If you are starting out, 1.3 (from svn or get snapshots here http://wicketstuff.org/maven/repository/org/apache/wicket/) is a better way to go anyway imo. I've read http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812 before. It make me feel kinda sad. We can't help that I'm afraid :) To their defense: implementing something like that while still supporting hot spot can't be easy. Another alternative is start building your app (and stay with it if you like) with Groovy. See http://bigheadco.blogspot.com/2007/03/wicket-and-groovy.html and http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-groovy 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] Classloader for selectively reload web tier
this is mostly a dream anyways for early stages where you are still adding fields see http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 hls' reply here http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 my rebuttal that drives the point home http://www.theserverside.com/news/thread.tss?thread_id=44119#226922 and nothing from anyone after. -igor On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) and it doesn't play well with the java-centric approach of wicket, which requires more refactoring and sophisticated coding than others. Cheers, Carlos - 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] Classloader for selectively reload web tier
Seems there might not be a full-proof fix for this problem: http://forum.java.sun.com/thread.jspa?threadID=572396tstart=0 Gili Carlos Pita wrote: See wicket.protocol.http.ReloadingWicketFilter. YMMV though, as Wicket I will give this filter a try. I see it's included in the trunk but not in 1.2.x releases. Is it compatible with wicket 1.2.5? the JDK provides. Some SDK implementations are working on improved support (I think Johan has some experience with IBM JDK: http://www-128.ibm.com/developerworks/java/jdk/eclipse/ ?) and see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812 (and vote!). Yes, I'm using ibm jdk too, but still get a lot of hot replacement errors, specially during preliminary instances of page development which are subject to more refactoring. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) See that issue at SUN. :) I've read http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812 before. It make me feel kinda sad. Cheers, Carlos 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 - 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 signature.asc Description: OpenPGP digital 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
[Wicket-user] Problem setting selected value in DropDownChoice
I feel like I've asked this question before...but here I am again. I'm simply trying to set a selected value for a DropDownChoice when a page is loaded. I've tried pre-loading it into the input class, setting it in getDefaultChoice, and also by trying to pass a model into the control w/ the value in the getObject method. I'm sure it's a simple thing but the DropDownChoice is tricky at times...for me anyhow. Here's my control: //get calendar days (buffer by 2 days go 1 month ahead) ListString days = DateTime.getDaysListForward(2, 1, true); //create dropdown w/ days List DropDownChoice arrivalChoices = new DropDownChoice(arrivalDate, days) { protected String getDefaultChoice(final Object selected) { return ; //get rid of Choose One default } }; //override key/value in dropdown arrivalChoices.setChoiceRenderer(new IChoiceRenderer() { public String getIdValue(Object object, int index) { return object.toString(); } public String getDisplayValue(Object object) { //format differently for display, i.e. Thu, Mar 2 return DateTime.getCartDateFormatString(object.toString()); } }); It simply loads a list of strings that are converted dates, they look like Fri, Mar 6, Sat, Mar 7, etc. The form input class looks like this: public class PaymentInfoInput implements Serializable { private int expiryMonth; private int expiryYear; private String number; private String securityCode; private String giftMessage; private String arrivalDate; . } I tried pre-loading the arrivalDate into the input before passing it into the form like so: PaymentInfoInput input = new PaymentInfoInput(); input.setArrivalDate( DateTime.getCartDateFormatString(order.getEstArrivalDate().toString())); add(new PaymentInfoForm(paymentInfoForm, input)); ... ...but it doesn't seem to work. How can I make this item selected in the dropdown list when the page loads? -- View this message in context: http://www.nabble.com/Problem-setting-selected-value-in-DropDownChoice-tf3538227.html#a9876678 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] Classloader for selectively reload web tier
I'd read that thread before. I think I understand your point Igor. But I don't pretend that old instances keep somehow up to date with new incompatible reloaded classes. If I could start all again from a bookmarkable page, everything being reinstantiated again, I will be happy, even if some marginal strange behaviours remain due to old instances still flying around. It's not that different if I go through entire app reloading: everything has to be re-tested from step zero anyway, so I wait about 10-20 seconds and then re-populate my wizard form or whatever I was testing from the very beginning. If reloading can spare me that 10-20 seconds, it will be a big win, even if not perfect. The same could be said for hot code replacement. It's development-time stuff, it would be better if it gets its thing done right 80 of 100 times than the nothing or almost nothing that it provides now. That said, I'm not very savvy in classloading arcane, so I could have incurred into a fundamental misunderstanding. Cheers, Carlos On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: this is mostly a dream anyways for early stages where you are still adding fields see http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 hls' reply here http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 my rebuttal that drives the point home http://www.theserverside.com/news/thread.tss?thread_id=44119#226922 and nothing from anyone after. -igor On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) and it doesn't play well with the java-centric approach of wicket, which requires more refactoring and sophisticated coding than others. Cheers, Carlos - 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] Classloader for selectively reload web tier
Seems there might not be a full-proof fix for this problem: http://forum.java.sun.com/thread.jspa?threadID=572396tstart=0 But at least they're working on it, and any improvement would be welcome imo. 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] Classloader for selectively reload web tier
Please keep us informed when you play with the reloading filter. I think Jean-Baptiste deems it usable in it current state. But any improvements/ suggestions (especially in the form of patches!) would be welcome. Eelco On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: I'd read that thread before. I think I understand your point Igor. But I don't pretend that old instances keep somehow up to date with new incompatible reloaded classes. If I could start all again from a bookmarkable page, everything being reinstantiated again, I will be happy, even if some marginal strange behaviours remain due to old instances still flying around. It's not that different if I go through entire app reloading: everything has to be re-tested from step zero anyway, so I wait about 10-20 seconds and then re-populate my wizard form or whatever I was testing from the very beginning. If reloading can spare me that 10-20 seconds, it will be a big win, even if not perfect. The same could be said for hot code replacement. It's development-time stuff, it would be better if it gets its thing done right 80 of 100 times than the nothing or almost nothing that it provides now. That said, I'm not very savvy in classloading arcane, so I could have incurred into a fundamental misunderstanding. Cheers, Carlos On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: this is mostly a dream anyways for early stages where you are still adding fields see http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 hls' reply here http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 my rebuttal that drives the point home http://www.theserverside.com/news/thread.tss?thread_id=44119#226922 and nothing from anyone after. -igor On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) and it doesn't play well with the java-centric approach of wicket, which requires more refactoring and sophisticated coding than others. Cheers, Carlos - 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
Re: [Wicket-user] Classloader for selectively reload web tier
I'm pointing my pom repositories to http://wicketstuff.org/maven/repository just right now. I will keep you informed of my experiences along next week, toying with it at home and more seriously using it with my development team at work. Cheers, Carlos On 4/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Please keep us informed when you play with the reloading filter. I think Jean-Baptiste deems it usable in it current state. But any improvements/ suggestions (especially in the form of patches!) would be welcome. Eelco On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: I'd read that thread before. I think I understand your point Igor. But I don't pretend that old instances keep somehow up to date with new incompatible reloaded classes. If I could start all again from a bookmarkable page, everything being reinstantiated again, I will be happy, even if some marginal strange behaviours remain due to old instances still flying around. It's not that different if I go through entire app reloading: everything has to be re-tested from step zero anyway, so I wait about 10-20 seconds and then re-populate my wizard form or whatever I was testing from the very beginning. If reloading can spare me that 10-20 seconds, it will be a big win, even if not perfect. The same could be said for hot code replacement. It's development-time stuff, it would be better if it gets its thing done right 80 of 100 times than the nothing or almost nothing that it provides now. That said, I'm not very savvy in classloading arcane, so I could have incurred into a fundamental misunderstanding. Cheers, Carlos On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: this is mostly a dream anyways for early stages where you are still adding fields see http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 hls' reply here http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 my rebuttal that drives the point home http://www.theserverside.com/news/thread.tss?thread_id=44119#226922 and nothing from anyone after. -igor On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) and it doesn't play well with the java-centric approach of wicket, which requires more refactoring and sophisticated coding than others. Cheers, Carlos - 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
Re: [Wicket-user] Classloader for selectively reload web tier
Maybe I'm missing something but I can't get ReloadingWicketServlet to work. I have subclassed it and included a pattern for my web tier package as documented. The relevant code and configuration is given below. If I modify a class residing at home.web and then re-enter its page (not just refresh it), nothing new happens. I have added a couple of entries to log4j.properties in order to monitor the output from the reloading classloader, filter and servlet, but nothing is shown there either. What do you think I'm doing wrong? Thank you in advance. Regards, Carlos home.web.ReloadingServlet package home.web; import wicket.application.ReloadingClassLoader; import wicket.protocol.http.ReloadingWicketServlet; @SuppressWarnings(serial) public class ReloadingServlet extends ReloadingWicketServlet { static { ReloadingClassLoader.includePattern(home.web.*); } } web.xml servlet servlet-namewicketServlet/servlet-name servlet-classhome.web.ReloadingServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valuewicket.spring.SpringWebApplicationFactory/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namewicketServlet/servlet-name url-pattern/app/*/url-pattern /servlet-mapping On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: I'm pointing my pom repositories to http://wicketstuff.org/maven/repository just right now. I will keep you informed of my experiences along next week, toying with it at home and more seriously using it with my development team at work. Cheers, Carlos On 4/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Please keep us informed when you play with the reloading filter. I think Jean-Baptiste deems it usable in it current state. But any improvements/ suggestions (especially in the form of patches!) would be welcome. Eelco On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: I'd read that thread before. I think I understand your point Igor. But I don't pretend that old instances keep somehow up to date with new incompatible reloaded classes. If I could start all again from a bookmarkable page, everything being reinstantiated again, I will be happy, even if some marginal strange behaviours remain due to old instances still flying around. It's not that different if I go through entire app reloading: everything has to be re-tested from step zero anyway, so I wait about 10-20 seconds and then re-populate my wizard form or whatever I was testing from the very beginning. If reloading can spare me that 10-20 seconds, it will be a big win, even if not perfect. The same could be said for hot code replacement. It's development-time stuff, it would be better if it gets its thing done right 80 of 100 times than the nothing or almost nothing that it provides now. That said, I'm not very savvy in classloading arcane, so I could have incurred into a fundamental misunderstanding. Cheers, Carlos On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: this is mostly a dream anyways for early stages where you are still adding fields see http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 hls' reply here http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 my rebuttal that drives the point home http://www.theserverside.com/news/thread.tss?thread_id=44119#226922 and nothing from anyone after. -igor On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a chance to java hot-code-replacement but it's very limited (it lets you modify inside methods but do nothing that alters the class schema/interface, someone out there would say it sucks) and it doesn't play well with the java-centric approach of wicket, which requires more refactoring and sophisticated coding than others.
Re: [Wicket-user] Classloader for selectively reload web tier
Maybe this could be relevant: * I'm using jetty:run maven plugin. * I run it from the console and from apache. * I run it on top sun jdk 1.6.0 and ibm jdk 5. Carlos On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Maybe I'm missing something but I can't get ReloadingWicketServlet to work. I have subclassed it and included a pattern for my web tier package as documented. The relevant code and configuration is given below. If I modify a class residing at home.web and then re-enter its page (not just refresh it), nothing new happens. I have added a couple of entries to log4j.properties in order to monitor the output from the reloading classloader, filter and servlet, but nothing is shown there either. What do you think I'm doing wrong? Thank you in advance. Regards, Carlos home.web.ReloadingServlet package home.web; import wicket.application.ReloadingClassLoader; import wicket.protocol.http.ReloadingWicketServlet; @SuppressWarnings(serial) public class ReloadingServlet extends ReloadingWicketServlet { static { ReloadingClassLoader.includePattern(home.web.*); } } web.xml servlet servlet-namewicketServlet/servlet-name servlet-classhome.web.ReloadingServlet/servlet-class init-param param-nameapplicationFactoryClassName/param-name param-valuewicket.spring.SpringWebApplicationFactory/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-namewicketServlet/servlet-name url-pattern/app/*/url-pattern /servlet-mapping On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: I'm pointing my pom repositories to http://wicketstuff.org/maven/repository just right now. I will keep you informed of my experiences along next week, toying with it at home and more seriously using it with my development team at work. Cheers, Carlos On 4/6/07, Eelco Hillenius [EMAIL PROTECTED] wrote: Please keep us informed when you play with the reloading filter. I think Jean-Baptiste deems it usable in it current state. But any improvements/ suggestions (especially in the form of patches!) would be welcome. Eelco On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: I'd read that thread before. I think I understand your point Igor. But I don't pretend that old instances keep somehow up to date with new incompatible reloaded classes. If I could start all again from a bookmarkable page, everything being reinstantiated again, I will be happy, even if some marginal strange behaviours remain due to old instances still flying around. It's not that different if I go through entire app reloading: everything has to be re-tested from step zero anyway, so I wait about 10-20 seconds and then re-populate my wizard form or whatever I was testing from the very beginning. If reloading can spare me that 10-20 seconds, it will be a big win, even if not perfect. The same could be said for hot code replacement. It's development-time stuff, it would be better if it gets its thing done right 80 of 100 times than the nothing or almost nothing that it provides now. That said, I'm not very savvy in classloading arcane, so I could have incurred into a fundamental misunderstanding. Cheers, Carlos On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: this is mostly a dream anyways for early stages where you are still adding fields see http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 hls' reply here http://www.theserverside.com/news/thread.tss?thread_id=44119#226916 my rebuttal that drives the point home http://www.theserverside.com/news/thread.tss?thread_id=44119#226922 and nothing from anyone after. -igor On 4/6/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I find that reloading the entire app stack (wicket + spring + hibernate) every time I change a page class is somewhat overkiller. When coding simple toy examples restricted to just wicket, the jetty:run maven plugin monitors my target folder and reload the application in a matter of a second or a fraction of a second. But with the entire stack in place this number will be above 5 seconds at least and up to 20 seconds for realistic-sized applications. Have anyone worked out a classloader that would selectively reload just the web tier of the application? Is there any plan for this or a related solution? I know tapestry 5 has its own fix-and-see class loading scheme. I worked a bit with zk which gets the same effect by means of scripting. I like the wicket way a lot more than zk's or tapestry's and I think hot-reloading can be a killer feature. Btw, I gave a
Re: [Wicket-user] Classloader for selectively reload web tier
* Carlos Pita: Maybe this could be relevant: * I'm using jetty:run maven plugin. I run it from the console * and from apache. I run it on top sun jdk 1.6.0 and ibm jdk 5. Hi Carlos, You're running jetty:run so I guess your Eclipse classpath is setup with Maven as well. So classes should go to target/classes and the reloading filter or servlet should pick that change. I'm using the reloading mechanism with success in my development team, it works great. However with Spring it's sometimes tedious to maintain a clear separation between the two tiers, and you have to introduce naming conventions that the whole team respects, otherwise they get nasty ClassCastException and other funny things. But it's interesting also because such exceptions point you to badly designed code, when the two tiers are mixed. I'm looking forward to help you make it work as it does for us. Example logging below: INFO - ReloadingClassLoader - Class file /path/to/my/app/target/classes/com/company/MyApp.class has changed, reloading DEBUG - ReloadingClassLoader - clzLocation=/path/to/my/app/target/classes/com/company/MyApp.class INFO - ReloadingClassLoader - Watching changes of class /path/to/my/app/target/classes/com/company/MyApp.class INFO - Application- [DashboardApp] init: Wicket extensions initializer INFO - Application- [DashboardApp] init: Wicket core library initializer INFO - WebApplication - [DashboardApp] Started Wicket in development mode INFO - ReloadingClassLoader - Class file /path/to/my/app/target/classes/com/company/MyApp.class has changed, reloading DEBUG - ReloadingClassLoader - clzLocation=/path/to/my/app/target/classes/com/company/MyApp.class INFO - ReloadingClassLoader - Watching changes of class /path/to/my/app/target/classes/com/company/MyApp.class INFO - Application- [DashboardApp] init: Wicket extensions initializer INFO - Application- [DashboardApp] init: Wicket core library initializer INFO - WebApplication - [DashboardApp] Started Wicket in development mode -- Jean-Baptiste Quenot aka John Banana Qwerty http://caraldi.com/jbq/ - 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] Help Me Improve Wicket Quickstart
In summary, the intent of the QuickStart with a bundled Jetty is fabulous. However, I feel that it falls short by only offering means to run the project using NetBeans, IDEA, or Eclipse. And I think this is a little disappointing. I happen to use jEdit - so I think it's a little annoying that the QuickStart doesn't have generic instructions or, say, a java target immediately in the build file. Just one of the selling points of Wicket that attracts me is no XML/configuration files. This QuickStart has several and none of them are generic enough to run the QuickStart from the ant build file using java. I even consider Ant to use XML configuration files and I think Ant should die. Hehe. I'll work all of this out and will add to the wiki. Let me know if anyone can send me anything to help me out. I hate ant and I hate configuring stuff - just want to play with Wicket. Thanks, Phil On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: in quickstart you can do mvn eclipse:eclipse to generate an eclipse project, or mvn idea:idea for idea. you can writeup a document on the wiki, and if we all like it we can export it into quickstart's readme or something like that -igor On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: Can anyone send me pointers for setting up quickstart manually? (scripts, build file w/ exec, etc) Who to talk to to create a generic quickstart setup document? I am interested in helping to improve the Quickstart download. I would be more pleased if the quickstart first presented a generic quickstartwith NetBeans, Idea, and Eclipse as additional setups. The QuickStart should at the least illustrate how to get Wicket up and running manually (script for lauching, etc) I can set all of this up myself but help will make it quicker and more pleasing. :-) 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
Re: [Wicket-user] Help Me Improve Wicket Quickstart
Basically, would be nice if instructions as simple as the following were part of the build file: target name=execute java classname=wicket.quickstart.Start fork=true failonerror=true maxmemory=128m classpathref=build.classpath classpath path refid=build.classpath/path pathelement path=${build.main.classes}/pathelement /classpath /java /target I'll see if I can add something to the wiki - but I want to play now. On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: In summary, the intent of the QuickStart with a bundled Jetty is fabulous. However, I feel that it falls short by only offering means to run the project using NetBeans, IDEA, or Eclipse. And I think this is a little disappointing. I happen to use jEdit - so I think it's a little annoying that the QuickStart doesn't have generic instructions or, say, a java target immediately in the build file. Just one of the selling points of Wicket that attracts me is no XML/configuration files. This QuickStart has several and none of them are generic enough to run the QuickStart from the ant build file using java. I even consider Ant to use XML configuration files and I think Ant should die. Hehe. I'll work all of this out and will add to the wiki. Let me know if anyone can send me anything to help me out. I hate ant and I hate configuring stuff - just want to play with Wicket. Thanks, Phil On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: in quickstart you can do mvn eclipse:eclipse to generate an eclipse project, or mvn idea:idea for idea. you can writeup a document on the wiki, and if we all like it we can export it into quickstart's readme or something like that -igor On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: Can anyone send me pointers for setting up quickstart manually? (scripts, build file w/ exec, etc) Who to talk to to create a generic quickstart setup document? I am interested in helping to improve the Quickstart download. I would be more pleased if the quickstart first presented a generic quickstartwith NetBeans, Idea, and Eclipse as additional setups. The QuickStart should at the least illustrate how to get Wicket up and running manually (script for lauching, etc) I can set all of this up myself but help will make it quicker and more pleasing. :-) 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
Re: [Wicket-user] Help Me Improve Wicket Quickstart
Patches are always welcome at: https://issues.apache.org/jira/browse/WICKET Eelco On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: Basically, would be nice if instructions as simple as the following were part of the build file: target name=execute java classname=wicket.quickstart.Start fork=true failonerror=true maxmemory=128m classpathref= build.classpath classpath path refid=build.classpath/path pathelement path=${build.main.classes}/pathelement /classpath /java /target I'll see if I can add something to the wiki - but I want to play now. On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: In summary, the intent of the QuickStart with a bundled Jetty is fabulous. However, I feel that it falls short by only offering means to run the project using NetBeans, IDEA, or Eclipse. And I think this is a little disappointing. I happen to use jEdit - so I think it's a little annoying that the QuickStart doesn't have generic instructions or, say, a java target immediately in the build file. Just one of the selling points of Wicket that attracts me is no XML/configuration files. This QuickStart has several and none of them are generic enough to run the QuickStart from the ant build file using java. I even consider Ant to use XML configuration files and I think Ant should die. Hehe. I'll work all of this out and will add to the wiki. Let me know if anyone can send me anything to help me out. I hate ant and I hate configuring stuff - just want to play with Wicket. Thanks, Phil On 4/6/07, Igor Vaynberg [EMAIL PROTECTED] wrote: in quickstart you can do mvn eclipse:eclipse to generate an eclipse project, or mvn idea:idea for idea. you can writeup a document on the wiki, and if we all like it we can export it into quickstart's readme or something like that -igor On 4/6/07, Philip Weaver [EMAIL PROTECTED] wrote: Can anyone send me pointers for setting up quickstart manually? (scripts, build file w/ exec, etc) Who to talk to to create a generic quickstart setup document? I am interested in helping to improve the Quickstart download. I would be more pleased if the quickstart first presented a generic quickstart with NetBeans, Idea, and Eclipse as additional setups. The QuickStart should at the least illustrate how to get Wicket up and running manually (script for lauching, etc) I can set all of this up myself but help will make it quicker and more pleasing. :-) 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] form with listview that contains radio groups?
Thank you, that worked perfect. -kurt On Thu, 2007-04-05 at 16:23 +0200, Sven Meier wrote: You have to give the radio group a model, that is backed by your question object, not only the current value of its answer: RadioGroup answer = new RadioGroup(answer, new PropertyModel(question, answer)); Kurt R. Hoehn wrote: I never really know what to put in the subject, but here is my question. I'm putting together a series of questions that exist under one profile and they are simple yes/no radio buttons and the user clicks yes or no for the question. I put together the form and it pulls and displays the information with out error in an edit mode, but when I submit the form with changes to the questions, they don't seem to make it from the form. I have been successful with a radio group outside of a listview and the radio buttons inside the listview, but this is the reverse of that. Does Wicket allow this or is there a workaround to this? Here is my code: Environment: Wicket 1.x branch Spring Hibernate Java 1.5_8 FirebirdSql Ubuntu 6.10 (linux) Domain Objects: public class Profile { ... private String identity; private String name; ... } public class SurveyQuestion { ... private String identity; private String question; private Boolean answer; ... } Wicket Page Object: public class SurveyPage extends WebPage { ... public SurveyPage() { Questions questions = new Questions(); questions.setProfile( profileDao.findProfile() ); questions.setQuestions( questionDao.findQuestions(questions.getProfile())); CompoundPropertyModel survey = new CompoundPropertyModel(questions); add(new SurveyForm(surveyForm, questions)); } class SurveyForm extends Form { public SurveyForm(String s, final IModel iModel) { super(s, iModel); ... ListView survey = new ListView(survey) { protected void populateItem(ListItem listItem) { SurveyQuestion question = (SurveyQuestion) listItem.getModelObject(); listItem.add(new Label(question, question.getQuestion())); RadioGroup answer = new RadioGroup(answer, new Model(question.getAnswer())); answer.add(new Radio(true, new Model(true))); answer.add(new Radio(false, new Model(false))); listItem.add(answer); } }; survey.setReuseItems(true); add(survey); ... } public void onSubmit() { Profile profile = ((Questions)getModel().getObject()).getProfile(); PageParameters parameters = new PageParameters(); parameters.add(identity, center.getIdentity()); parameters.add(ro, true); setResponsePage(SurveyPage.class, parameters ); profileDao.makePersistent(profile); // Doing this to see if the domain object is being updated from the form. for(Object survey: ((Questions)getModel().getObject()).getSurvey()) { System.out.println( Answer: + ((ProfileSurvey)survey).getAnswer() ); } } } } class Questions implements Serializable { private Profile profile; private List survey; ... } SurveyPage.html form wicket:id=surveyForm ... table tr wicket:id=survey tdspan wicket:id=question/span/td tdspan wicket:id=answer input type=radio wicket:id=trueYesnbsp;input type=radio wicket:id=falseNo/span /td /tr /table ... /form TIA, -kurt - 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] Problem setting selected value in DropDownChoice
Instead of pre-loading in the input field, try pre-loading the property in your form backing object (model) - so call setArrivalDate() or just ensure that PaymentInfoInput.arrivalDate is not null On 4/7/07, V. Jenks [EMAIL PROTECTED] wrote: I feel like I've asked this question before...but here I am again. I'm simply trying to set a selected value for a DropDownChoice when a page is loaded. I've tried pre-loading it into the input class, setting it in getDefaultChoice, and also by trying to pass a model into the control w/ the value in the getObject method. I'm sure it's a simple thing but the DropDownChoice is tricky at times...for me anyhow. Here's my control: //get calendar days (buffer by 2 days go 1 month ahead) ListString days = DateTime.getDaysListForward(2, 1, true); //create dropdown w/ days List DropDownChoice arrivalChoices = new DropDownChoice(arrivalDate, days) { protected String getDefaultChoice(final Object selected) { return ; //get rid of Choose One default } }; //override key/value in dropdown arrivalChoices.setChoiceRenderer(new IChoiceRenderer() { public String getIdValue(Object object, int index) { return object.toString(); } public String getDisplayValue(Object object) { //format differently for display, i.e. Thu, Mar 2 return DateTime.getCartDateFormatString(object.toString()); } }); It simply loads a list of strings that are converted dates, they look like Fri, Mar 6, Sat, Mar 7, etc. The form input class looks like this: public class PaymentInfoInput implements Serializable { private int expiryMonth; private int expiryYear; private String number; private String securityCode; private String giftMessage; private String arrivalDate; . } I tried pre-loading the arrivalDate into the input before passing it into the form like so: PaymentInfoInput input = new PaymentInfoInput(); input.setArrivalDate( DateTime.getCartDateFormatString ( order.getEstArrivalDate().toString())); add(new PaymentInfoForm(paymentInfoForm, input)); ... ...but it doesn't seem to work. How can I make this item selected in the dropdown list when the page loads? -- View this message in context: http://www.nabble.com/Problem-setting-selected-value-in-DropDownChoice-tf3538227.html#a9876678 Sent from the Wicket - User mailing list archive at Nabble.com. - 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] Any ajax callback for when a panel is closed?
What do you use to navigate to another tab? Probably a link (ajax or not)? If so, you could put the logic in there. Eelco On 4/4/07, jamieballing [EMAIL PROTECTED] wrote: We have a modal window with several tabs. We want to validate the data on the tab after when the user navigates away from the tab. The tab is currently just a panel. Is there any callback we can when the panel is closed use to trigger validation? Thanks, Jamie -- View this message in context: http://www.nabble.com/Any-ajax-callback-for-when-a-panel-is-closed--tf3529142.html#a9848599 Sent from the Wicket - User mailing list archive at Nabble.com. - 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