[Wicket-user] Spring integration using AspectJ
Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3 onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896. So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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
[Wicket-user] ajax errors handling
Is there any way to control ajax errors handling? For example, if the session is expired wicket returns empty response for ajax requests (WebRequestCycleProcessor.resolve() returns an EmptyRequestTarget instance). -- Andrew Klochkov - 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] Spring integration using AspectJ
I think Igor and the others who have been working on Spring integration can answer this better, but Wicket's special sauce is that it provides proxies in order to make serialization for clustering and backbutton support as cheap as possible. Eelco On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3 onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896 . So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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] Spring integration using AspectJ
On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. Maybe it's a silly question, but how did you find that page about Spring? I see nothing from the main wiki page that would lead to that page. Robert - 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] Hibernate/Spring and Wicket architecture request for validation (was Wicket's questions)
My favorite way is to use the domain objects directly, but let updates (to the database) always go through services/ daos and *not* have transactions per request. I'll still use value objects every now and then because sometimes it's just easier to work with a 'flat' object that is focussed on a particular case. A small question in between. How do you actually control the sessions and especially reattaching the domain objects to the session without breaking the application layers (eg reattaching in the view layer)? I've tried using a writable OpenSessionInViewFilter (Spring) but that ends in a lot of LazyInitializationException stuff. I'n now using an Aspect that catches this and reattaches the object, but this can cause a lot of nasty exception logging :) tnx 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 -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - 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] DropDown comes on top of ModalWindow
Can you please be more specific? This issue is supposed to be taken care of. Did you put panel modal window inside of iframe modal window? What version of wicket are you using? -Matej On 3/23/07, vsubedar [EMAIL PROTECTED] wrote: When using panels or pages, in a Modal dialog all the DropDownChoices shine through the dialog and places themselves on top of everything in IE.Problem arises when there is a modalWindow inside a modalWindow. View this message in context: DropDown comes on top of ModalWindow 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
[Wicket-user] Problem with ajax tree and listView
Hi, This is my first time asking questions here. Hope I can make my question clear. I'v tried to extend the ajax tree in the wicket extension. The only modification I made is the output value, which is a customized panel instead of a label. Following are my html and source. MyTree.html : span wicket:id=indent/spana wicket:id=linkspan wicket:id=image//a a wicket:id=nodeLinkspan class=icon wicket:id=icon/spanspan wicket:id=myPanel / To simplify the problem, I strip most markups of MyPanel.html to what I think causing the problem. MyPanel.html : span wicket:id=outputListspan wicket:id=outputNamename/span/span MyPanel.java : public MyPanel extends Panel { public MyPanel(String id) { super(id); ArrayListString list = new ArrayListString(); list.add(name1); add(new ListView(outputList, list) { public void populateItem(final ListItem item) { final String name = (String) item.getModelObject(); item.add(new Label(outputName, name)); } }); } } The problem is while I click the junction link, ListView.renderItem() throws a NullPointerException. After some digging, I found that the ListItem is null. Then I use getList(), and it successfully return the list I passed in and the values in that list are also correct, however the ListItem is null which I don't know why. Thanks for reading my question. I will appreciate any suggestions. Isaac - 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] Spring integration using AspectJ
it provides proxies in order to make serialization for clustering and backbutton support as cheap as possible. Yep, that's why I suggested to keed dependencies transient (as the targets of the wicket-spring proxies are). So you don't even need to serialize a thin proxy. . So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be Cheers, Carlos Eelco On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3 onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896 done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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] Spring integration using AspectJ
Maybe it's a silly question, but how did you find that page about Spring? I see nothing from the main wiki page that would lead to that page. I arrived there from a link in the wicket-spring demo applications :). Cheers, Carlos Robert - 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] Problem with ajax tree and listView
hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej On 3/23/07, Isaac Weng [EMAIL PROTECTED] wrote: Hi, This is my first time asking questions here. Hope I can make my question clear. I'v tried to extend the ajax tree in the wicket extension. The only modification I made is the output value, which is a customized panel instead of a label. Following are my html and source. MyTree.html : span wicket:id=indent/spana wicket:id=linkspan wicket:id=image//a a wicket:id=nodeLinkspan class=icon wicket:id=icon/spanspan wicket:id=myPanel / To simplify the problem, I strip most markups of MyPanel.html to what I think causing the problem. MyPanel.html : span wicket:id=outputListspan wicket:id=outputNamename/span/span MyPanel.java : public MyPanel extends Panel { public MyPanel(String id) { super(id); ArrayListString list = new ArrayListString(); list.add(name1); add(new ListView(outputList, list) { public void populateItem(final ListItem item) { final String name = (String) item.getModelObject(); item.add(new Label(outputName, name)); } }); } } The problem is while I click the junction link, ListView.renderItem() throws a NullPointerException. After some digging, I found that the ListItem is null. Then I use getList(), and it successfully return the list I passed in and the values in that list are also correct, however the ListItem is null which I don't know why. Thanks for reading my question. I will appreciate any suggestions. Isaac - 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] Using SpringWebApplication with wicket-auth-roles
Hi I am using wicket-spring and retrieve the application bean from the spring context. So I subclass SpringWebApplication. No I would like to take advantage of wicket-auth-roles project but now I am supposed to subclass AuthenticatedWebApplication. How can I use both of them without doing copy-paste code 'reuse'? May be it can be refactored in way that would allow wicket-auth-roles to be used like in wicket-spring-annot: without having to subclass from AnnotSpringWebApplication, just by adding a component instantiation listener etc. - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.- 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] Spring integration using AspectJ
On 23/03/07, Carlos Pita [EMAIL PROTECTED] wrote: Maybe it's a silly question, but how did you find that page about Spring? I see nothing from the main wiki page that would lead to that page. I arrived there from a link in the wicket-spring demo applications :). Hmm - I'll have to see if I can redirect it, then, as that's a superceded wiki - The active is http://cwiki.apache.org/WICKET/spring.html /Gwyn -- Download Wicket 1.2.5 now! - http://wicketframework.org - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
[Wicket-user] AjaxSelfUpdatingTimer, AjaxSubmitButton and ListView
Hi, I have following case: - There is form including IndicatingAjaxSubmitButton - When button is pressed vector is filled - Vector is shown in a listView - ListView contains AjaxSelfUpdatingTimer Using this combination selfUpdatingTimers are not working. If I have understood correct, something should be added on head or body onload=..., but this is not done. Simplified example case can be found on: https://download.syncrontech.com/public/wicket-ajaxTimerExample.zip - Juha - 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] DropDown comes on top of ModalWindow
I see. This is probably bug in modal window when it's not hiding dropdowns from it's parent. On 3/23/07, Stefan Lindner [EMAIL PROTECTED] wrote: I have the same problem too with wicket 2. A Model window containing a panel with drop down choice lists. Whe I open a model window on top of thi smodel window, the dropdowns are always displayed in fornt of the second model window. I noticed that the first model window hides any dropdowns in the basic window and re-displays them on window close. So I use a workaround whre the second modal window hides the dropdowns of the first and after closing if (Onclosecallback) redisplay them agian (just set visible(false)) and add the component to the request target. But I have another problem here. The invisibility workd well (set each dropdown to invisible, target.addCompoent(dropdown)). But to make them visible again, it is not sufficient to set visible(true) and target.addComponent(dropdown). The whole surronding panel must be added to the target's compionents too. stefan Lindner - 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] Using SpringWebApplication with wicket-auth-roles
On Friday, 23 March 2007 08:04 am, Julian Vassev escreveu: Hi I am using wicket-spring and retrieve the application bean from the spring context. So I subclass SpringWebApplication. No I would like to take advantage of wicket-auth-roles project but now I am supposed to subclass AuthenticatedWebApplication. How can I use both of them without doing copy-paste code 'reuse'? I think that later versions of wicket make this very easy. For earlier versions of wicket, I just used the AuthenticatedWebApplication with sprinklings of ideas from the spring integration project. It's not as nice as having it all done for you, but it's really easy and I know that it'll go away when we upgrade. And this is really a minor thing. And wicket is just so darn cool I'm grateful that I can even do this much. May be it can be refactored in way that would allow wicket-auth-roles to be used like in wicket-spring-annot: without having to subclass from AnnotSpringWebApplication, just by adding a component instantiation listener etc. It is in a later version. - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. - 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] Using SpringWebApplication with wicket-auth-roles
I believe that in 1.2.5 it is possible to extend WebApplication, and just add the following to the init method: addComponentInstantiationListener(new SpringComponentInjector(this)); At that point in time, you can still work with the auth stuff. (I asked a similar question a few days ago.) Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Thomas R. Corbin Sent: March 23, 2007 10:55 AM To: wicket-user@lists.sourceforge.net Subject: Re: [Wicket-user] Using SpringWebApplication with wicket-auth-roles On Friday, 23 March 2007 08:04 am, Julian Vassev escreveu: Hi I am using wicket-spring and retrieve the application bean from the spring context. So I subclass SpringWebApplication. No I would like to take advantage of wicket-auth-roles project but now I am supposed to subclass AuthenticatedWebApplication. How can I use both of them without doing copy-paste code 'reuse'? I think that later versions of wicket make this very easy. For earlier versions of wicket, I just used the AuthenticatedWebApplication with sprinklings of ideas from the spring integration project. It's not as nice as having it all done for you, but it's really easy and I know that it'll go away when we upgrade. And this is really a minor thing. And wicket is just so darn cool I'm grateful that I can even do this much. May be it can be refactored in way that would allow wicket-auth-roles to be used like in wicket-spring-annot: without having to subclass from AnnotSpringWebApplication, just by adding a component instantiation listener etc. It is in a later version. - Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. - 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] Inner classes question
I was wondering if it is unwise to prevent the use of inner classes for models. For example a page creates a model for CheckBox that depends on a list stored in the page. In Wicket examples the list is accessed from the inner model class directly. I do not like having many inner classes in a class. What if I create a seperate model class and pass the list with it in the constructor. The final modifiers will ensure that the reference to the list cannot be changed. Will this cause the list to be serialized twice? Or will it be noticed that it is the same list. Will it cause any other problems, and if so isn't there another way to prevent the use of inner classes? Robert - 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] Hibernate/Spring and Wicket architecture request for validation (was Wicket's questions)
the answer is simple: do not reattach objects. do not keep them across requests unless you have a session that is open across requests. use a detachable model that loads the objects at the beginning of the request and discards them at the end. most times these are load-by-id operations which are very well cached by hibernate so there is no performance hit on loading them every request. if you use the detached object as a formbean then use merge() to apply the changes. -igor On 3/23/07, Ivo van Dongen [EMAIL PROTECTED] wrote: My favorite way is to use the domain objects directly, but let updates (to the database) always go through services/ daos and *not* have transactions per request. I'll still use value objects every now and then because sometimes it's just easier to work with a 'flat' object that is focussed on a particular case. A small question in between. How do you actually control the sessions and especially reattaching the domain objects to the session without breaking the application layers (eg reattaching in the view layer)? I've tried using a writable OpenSessionInViewFilter (Spring) but that ends in a lot of LazyInitializationException stuff. I'n now using an Aspect that catches this and reattaches the object, but this can cause a lot of nasty exception logging :) tnx 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 -- Ivo van Dongen Func. Internet Integration W http://www.func.nl T +31 20 423 F +31 20 4223500 - 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] AjaxSelfUpdatingTimer, AjaxSubmitButton and ListView
From a quick glance, it looks like you missed a setOutputMarkupId: (apologies for formatting) ListView lw = new ListView(listView, new PropertyModel(this, rows)){ @Override protected void populateItem(ListItem item) { WebMarkupContainer updatingPanel = new WebMarkupContainer(updatingPanel); updatingPanel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); //=== updatePanel.setOutputMarkupId(true); //== Label label = new Label(value, new PropertyModel(WicketTestingAjaxQuery.this, random)); label.setRenderBodyOnly(true); updatingPanel.add(label); item.add(updatingPanel); } }; best, jim On 3/23/07, Juha Alatalo [EMAIL PROTECTED] wrote: Hi, I have following case: - There is form including IndicatingAjaxSubmitButton - When button is pressed vector is filled - Vector is shown in a listView - ListView contains AjaxSelfUpdatingTimer Using this combination selfUpdatingTimers are not working. If I have understood correct, something should be added on head or body onload=..., but this is not done. Simplified example case can be found on: https://download.syncrontech.com/public/wicket-ajaxTimerExample.zip - Juha - 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] Spring integration using AspectJ
there are a couple of things i personally dont like about it 1) @Configurable is a type-level annotation. so if you want any control over what is injected you have to declare it in the applicationcontext. i have a ton of pages and components that get injected and i would really hate to have to maintain that in xml if i dont have to. relying on autowiring doesnt always work because you often have two things of the same type in the context or the fieldname doesnt match the bean name for readability purposes. 2) you have to make the deps transient. the nice thing about wicket-spring proxies is that you can pass injected services as if they were regular java objects, so other components/objects can safely keep a reference to them in any way possible. eg you can have constructs like this: class UsersDataProvider extends SortableDataProvider { private UserService us; public UsersDataProvider(UserService us) { this.us=us;} public int count() { return us.countusers(); } ... } just my 2c, at the end its whatever works best for you -igor On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3 onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896 . So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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] Inner classes question
no there wont be two copies of the list.serialization caches objects and if it finds another instance it stores a pointer rather then a copy -igor On 3/23/07, Robert . [EMAIL PROTECTED] wrote: I was wondering if it is unwise to prevent the use of inner classes for models. For example a page creates a model for CheckBox that depends on a list stored in the page. In Wicket examples the list is accessed from the inner model class directly. I do not like having many inner classes in a class. What if I create a seperate model class and pass the list with it in the constructor. The final modifiers will ensure that the reference to the list cannot be changed. Will this cause the list to be serialized twice? Or will it be noticed that it is the same list. Will it cause any other problems, and if so isn't there another way to prevent the use of inner classes? Robert - 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] AjaxSelfUpdatingTimer, AjaxSubmitButton and ListView
yes looks like it. if you look at the output in wicket ajax debug console you can easily diagnose problems like these -igor On 3/23/07, James McLaughlin [EMAIL PROTECTED] wrote: From a quick glance, it looks like you missed a setOutputMarkupId: (apologies for formatting) ListView lw = new ListView(listView, new PropertyModel(this, rows)){ @Override protected void populateItem(ListItem item) { WebMarkupContainer updatingPanel = new WebMarkupContainer(updatingPanel); updatingPanel.add(new AjaxSelfUpdatingTimerBehavior(Duration.seconds(5))); //=== updatePanel.setOutputMarkupId(true); //== Label label = new Label(value, new PropertyModel(WicketTestingAjaxQuery.this, random)); label.setRenderBodyOnly(true); updatingPanel.add(label); item.add(updatingPanel); } }; best, jim On 3/23/07, Juha Alatalo [EMAIL PROTECTED] wrote: Hi, I have following case: - There is form including IndicatingAjaxSubmitButton - When button is pressed vector is filled - Vector is shown in a listView - ListView contains AjaxSelfUpdatingTimer Using this combination selfUpdatingTimers are not working. If I have understood correct, something should be added on head or body onload=..., but this is not done. Simplified example case can be found on: https://download.syncrontech.com/public/wicket-ajaxTimerExample.zip - Juha - 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] DropDown comes on top of ModalWindow
Opening a modal dialog in a modal dialog? Crazy users! ;) Eelco On 3/23/07, Stefan Lindner [EMAIL PROTECTED] wrote: I have the same problem too with wicket 2. A Model window containing a panel with drop down choice lists. Whe I open a model window on top of thi smodel window, the dropdowns are always displayed in fornt of the second model window. I noticed that the first model window hides any dropdowns in the basic window and re-displays them on window close. So I use a workaround whre the second modal window hides the dropdowns of the first and after closing if (Onclosecallback) redisplay them agian (just set visible(false)) and add the component to the request target. But I have another problem here. The invisibility workd well (set each dropdown to invisible, target.addCompoent(dropdown)). But to make them visible again, it is not sufficient to set visible(true) and target.addComponent(dropdown). The whole surronding panel must be added to the target's compionents too. stefan Lindner - 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] Ajax error handling: deployment vs development mode
Hey all, I understand that if my app is in deployment mode then all run time exceptions, including anything which happens during an Ajax request will be caught by my RequestCycle.onRuntimeException, and this is working fine. But how can I replicate this behavior during development mode? During development mode my ajax runtime exceptions merely show up in my Tomcat console, and do not forward to the error page. Also, how can I conceivably handle these errors on the client side, say for instance I experience an ajax runtime error during some request and I would like to display a friendly message in my window, instead of forwarding to the error page, how can this be done? Thanks for any help on these questions! -Par - 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] Spring integration using AspectJ
Hi Igor, I see your points. Here's what I think about them. 1) @Configurable is a type-level annotation. so if you want any control over what is injected you have to declare it in the applicationcontext. i have a ton of pages and components that get injected and i would really hate to have to maintain that in xml if i dont have to. relying on Yes, you need one prototype bean definition for each injected page and/or component. That's the spring way after all. You get all the power of XmlApplicationContext (with which you can do more that vanilla injection) at the expense of dealing with xmls. 2) you have to make the deps transient. the nice thing about wicket-spring proxies is that you can pass injected services as if they were regular java objects, so other components/objects can safely keep a reference to them in any way possible. eg you can have constructs like But I have to be aware of the serializable nature of components anyway, so it's not that bad to flag as transient the heavy dependencies or collaborators that would interfere with effective session management. This observation doesn't exclusively apply to injected dependencies but to any serialization-reluctant associate of your component, although admittedly spring-managed services and repositories will probably be the only ones in this category. Regarding freely passing references, I recognize I don't understand your point. If your component exposes a property for a dependency it will get it injected at instantiation-time and deserialization-time, so it won't need the dependency to be handled down to it later. And if instead the component get the dependency as an argument, it can safely use it in the context of method execution. Anyway I'm still not sure whether my proposal is technically correct or not. just my 2c, at the end its whatever works best for you Ditto :). Cheers, Carlos -igor On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3 onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896 . So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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] Spring integration using AspectJ
Yes, you need one prototype bean definition for each injected page and/or component. That's the spring way after all. You get all the power of XmlApplicationContext (with which you can do more that vanilla injection) at the expense of dealing with xmls. in my apps i use a lot of panels, not just pages. so that would mean having something like 300 bean defs in xml. that is a big no thank you. I won't argue, yours is an absolutely valid point. Still there is the spring-annotations subproject that allows you to inject dependencies by simply annotating your components, besides a lot of other facilities. i wouldnt be able to do this with @Configurable because since my genericdataprovider is not @Configurable and there is no way to make it so it cannot restore its, what would have to be a transient, reference to the genericfinder. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat lost in the way. As a newbie I would ask: is your example an every day case or a contrived degenerate case or somewhere in the middle? Cheers, Carlos -igor Anyway I'm still not sure whether my proposal is technically correct or not. just my 2c, at the end its whatever works best for you Ditto :). Cheers, Carlos -igor On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896 . So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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 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
Re: [Wicket-user] Spring integration using AspectJ
On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: i wouldnt be able to do this with @Configurable because since my genericdataprovider is not @Configurable and there is no way to make it so it cannot restore its, what would have to be a transient, reference to the genericfinder. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat lost in the way. As a newbie I would ask: is your example an every day case or a contrived degenerate case or somewhere in the middle? i dont have a genericfinder interface, but i do use the pattern where i pass in a service down into a model or a dataprovider all the time. eg new UsersInRoleDataProvider(userservice,role) so it is a little bit contrived, but mostly an every-day usecase in my app -igor Cheers, Carlos -igor Anyway I'm still not sure whether my proposal is technically correct or not. just my 2c, at the end its whatever works best for you Ditto :). Cheers, Carlos -igor On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I'm very new to Wicket (with no more than a few hours of fly). I would like to integrate it with the spring AplicationContext/BeanFactory so I've been reading the solutions described in http://www.wicket-wiki.org.uk/wiki/index.php/Spring. I've nothing to object to them but I think it would be possible to get the integration by means of the @Configurable annotation that spring 2 offers too. This annotation injects dependencies upon bean instantiation (ie. with new) based on a prototype scope bean definition. Also from version 2.0.3onwards this annotation would inject dependencies after deserialization as described in this jira: http://opensource.atlassian.com/projects/spring/browse/SPR-2896 . So you can declare your dependencies as transient and expect them to be injected at instantiation-time and at deserialization-time. Weaving can be done at compile-time and at loading-time. If you are already using aspectj with spring, for example for domain object dependency injection, you won't need extra stuff to make it inject Wicket pages' properties. I have written a toy example of this approach and it seems to work fine. What do you think? Maybe I'm missing something. 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 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
[Wicket-user] Summer of Code
Hi guys, as mentioned some time ago I'd be really up for the idea of having a Summer of Code. I personally would really be interested in creating an email utility library, even though that might only be a small thing. Any ideas? -- View this message in context: http://www.nabble.com/Summer-of-Code-tf3455770.html#a9641337 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] Spring integration using AspectJ
Here is an example of using @Configurable to integrate spring with wicket as some people has asked me for one. To launch it just: 1) set MAVEN_OPTS=-javaagent:path-to-aspectwaver.jar/aspectjweaver.jar in the env. 2) run 'mvn jetty:run' Notice that dependencies are injected *after* constructor execution, so for this simple toy page that just get a text message from its only dependency, it could seem a little contrived to setup a read only Model just for feeding that message. More realistic scenarios generally will put a dao behind a model so the dependency won't be directly needed at construction time but instead when model callbacks are called. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat I've been done a little research and find out that the class AbstractBeanConfigurerAspect is provided just for this need. See for example http://forum.springframework.org/showthread.php?t=30993. Cheers, Carlos wicket-spring.tgz Description: GNU Zip compressed data - 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] mount question
Hi, I'm trying to mount some pages so the URL is more user friendly. Now, what I have to do for resources like images and css?. I have a images directory in the root of webapp and the css file is in the root to. One thing is move all at the same level of a java class and mount there. Other can be use a wicket resource and replace the path to the file in the html template. Is any other more simple that not implies modify the html templates?. Thanks in advice. PS: the wiki show examples of mountSharedResource but I don't known if this is what I need. - 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] Today's wicket1.X breaks GridView + Dynamic Resource
Igor just committed a fix, so all should be good now again. Eelco On 3/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: There are two failing unit tests currently that seem to be the same issue. Eelco On 3/23/07, NickCanada [EMAIL PROTECTED] wrote: Hi Guys, Thanks for all your Wicket work. Using the latest Wicket1.X (23rdMarch) from SVN, my code which puts RenderedDynamicImageResource objects in a GridView no longer works (prior versions ran fine). The instead of displaying the dynamic resource images in each cell, I get the following error message: wicket.WicketRuntimeException: Loop item is null. Probably the number of loop iterations were changed between onBeginRequest and render time. at wicket.markup.html.list.Loop.onRender(Loop.java:169) The following code replicates the error (I am using the CircleDynamicImageResource from the examples): public class TestGridViewResRef extends WebPage { /** Creates a new instance of TestGridViewResRef */ public TestGridViewResRef() { IDataProvider dataProvider = new ImageDataProvider(); GridView gridView = new GridView(rows, dataProvider) { protected void populateItem(Item item) { item.add(new ImagePanel(images)); } protected void populateEmptyItem(Item item) { item.add(new Label(firstName, *empty*)); } }; gridView.setRows(3); gridView.setColumns(3); add(gridView); add(new PagingNavigator(navigator, gridView)); } private class ImagePanel extends Panel{ public ImagePanel(String id){ super(id); // Dynamically created buffered image add(new Image(image, new CircleDynamicImageResource(100, 100))); } } Is anything amiss? I can't get to the root of the cause. Thanks for any help. Nick -- View this message in context: http://www.nabble.com/Today%27s-wicket1.X-breaks-GridView-%2B-Dynamic-Resource-tf3456149.html#a9642591 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] Spring integration using AspectJ
heh, the biggest advantage of @SpringBean is that it is done _before_ the constructor. i use services in the constructor all the time. maybe you can tweak the aspectj aspect to also do it before as well. (But do you explicitly invoke these services from inside the constructor or just delay execution inside populateItem-like callbacks? Sorry if the question is silly but I'm still making my way into wicket.) Regarding tweaking the aspect, the off-the-shelf pointcut is an initialization one and the advice is an after one. Initialization pointcut will encompass the period from the return from the super constructor call to the return of the first-called constructor. So the advice will in fact be called after the constructor returns. But redefining the advice to before-initialization (or before-call or before-execution) is trivial: @Aspect public class ConfigurerAspect extends BeanConfigurerSupport { public ConfigurerAspect() { setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver()); } @Before(initialization((@ org.springframework.beans.factory.annotation.Configurable *).new(..)) this(bean)) public void beanCreation(Object bean) { configureBean(bean); } } Then you will need to replace aop:spring-configured for bean class= toy.ConfigurerAspect factory-method=aspectOf/ in your application context. The same can be done for matching your generic data providers but using ClassNameBeanWiringInfoResolver and a different pointcut instead. I've attached the example modified with the custom aspect. Cheers, Carlos On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Here is an example of using @Configurable to integrate spring with wicket as some people has asked me for one. To launch it just: 1) set MAVEN_OPTS=-javaagent:path-to-aspectwaver.jar/aspectjweaver.jar in the env. 2) run 'mvn jetty:run' Notice that dependencies are injected *after* constructor execution, so for this simple toy page that just get a text message from its only dependency, it could seem a little contrived to setup a read only Model just for feeding that message. More realistic scenarios generally will put a dao behind a model so the dependency won't be directly needed at construction time but instead when model callbacks are called. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat I've been done a little research and find out that the class AbstractBeanConfigurerAspect is provided just for this need. See for example http://forum.springframework.org/showthread.php?t=30993. 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-spring.tgz Description: GNU Zip compressed data - 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] Spring integration using AspectJ
On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: heh, the biggest advantage of @SpringBean is that it is done _before_ the constructor. i use services in the constructor all the time. maybe you can tweak the aspectj aspect to also do it before as well. (But do you explicitly invoke these services from inside the constructor or just delay execution inside populateItem-like callbacks? Sorry if the question is silly but I'm still making my way into wicket.) yes, sometimes i do, otherwise i wouldnt've mentioned it -igor Regarding tweaking the aspect, the off-the-shelf pointcut is an initialization one and the advice is an after one. Initialization pointcut will encompass the period from the return from the super constructor call to the return of the first-called constructor. So the advice will in fact be called after the constructor returns. But redefining the advice to before-initialization (or before-call or before-execution) is trivial: @Aspect public class ConfigurerAspect extends BeanConfigurerSupport { public ConfigurerAspect() { setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver()); } @Before(initialization((@ org.springframework.beans.factory.annotation.Configurable *).new(..)) this(bean)) public void beanCreation(Object bean) { configureBean(bean); } } Then you will need to replace aop:spring-configured for bean class= toy.ConfigurerAspect factory-method=aspectOf/ in your application context. The same can be done for matching your generic data providers but using ClassNameBeanWiringInfoResolver and a different pointcut instead. I've attached the example modified with the custom aspect. Cheers, Carlos On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Here is an example of using @Configurable to integrate spring with wicket as some people has asked me for one. To launch it just: 1) set MAVEN_OPTS=-javaagent:path-to-aspectwaver.jar/aspectjweaver.jar in the env. 2) run 'mvn jetty:run' Notice that dependencies are injected *after* constructor execution, so for this simple toy page that just get a text message from its only dependency, it could seem a little contrived to setup a read only Model just for feeding that message. More realistic scenarios generally will put a dao behind a model so the dependency won't be directly needed at construction time but instead when model callbacks are called. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat I've been done a little research and find out that the class AbstractBeanConfigurerAspect is provided just for this need. See for example http://forum.springframework.org/showthread.php?t=30993. 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 http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Wicket-user mailing list Wicket-user@lists.sourceforge.net
[Wicket-user] General Java/OO/Pattern Question
As the subject indicates, this isn't a question specific to Wicket (although it WILL eventually involve Wicket to display these objects), so if you feel I should post this elsewhere, feel free to tell me so, however it seemed like a pretty bright bunch of Java guys hang around here so I'm hoping for some insight. I've been tasked with implementing a rather curious (to me anyway) hierarchical object structure. Most of the objects in this structure serve no other purpose than to group the objects below them; it's only at the final leaf levels that there are some significant behavioral difference in the objects. For lack of a better example, I'll call these objects Grouper1, Grouper2, Grouper3, and Leaf. So I might have a structure that looks like: Grouper1 --Grouper2 Grouper3 --Leaf --Leaf --Leaf Grouper3 --Leaf --Leaf --Leaf It can also look like this: Grouper1 --Grouper3 Leaf Leaf Leaf --Grouper3 Leaf Leaf Leaf Or like this: Grouper1 --Leaf --Leaf --Grouper2 Grouper3 --Leaf --Leaf --Leaf Grouper3 --Leaf --Leaf --Leaf Or even like this: Grouper3 --Leaf --Leaf --Leaf Although I'm willing to exclude that last example (with something other than a Grouper1 at the top) if it helps simplify things any. As you can see almost all objects in the hierarchy can exist at any level. Only the leaf node has any properties beyond those shared by all of the other objects. And before you ask, despite the fact that the branch items are so similar, they do have different labels that are important to the people using the hierarchy. I'm just trying to determine if those labels are important to the domain model. I started to model this using simple inheritance. Something like the following: public abstract class MyHierarchyObject{ private String commonAttribute1; private boolean commonAttribute2 = false; private ListMyHierarchyObject children = new ArrayListMyHierarchyObject; private MyHierarchyObject parent; //the association needs to be bidirectional for up and down navigation ... } public class Grouper1 extends MyHierarchyObject{ } etc. etc. Of course, I realized after just a few seconds that this seemed a little silly since I was going to end up with at least three classes with either no behavior or properties or only extremely minor changes to the abstract class's properties like setting commonAttribute2 to true by default. So does using inheritance like this still make sense or should I do something like make the MyHierarchyObject not abstract and add a Type property that can be populated from an enum with elements like Grouper1, Grouper2, and Grouper3? What about the leaf node. It's not allowed to have children but because it can be a child of any of the Groupers, it seems like it needs to extend MyHierarchyObject in order to fit into the child parent model. Should I put the children related methods into an interface that only the Grouper classes implement? Of course that only works if I use the inheritance model; maybe that's a good reason to use it? Or is there a design pattern I'm missing in all of this that might help me. I've been thinking about this for so long now that I'm afraid I'm too deep into it and not thinking clearly about the best approaches. That's why I'm posting here. Unfortunately, the hierarchy is quite a bit more complex than this example, but I think if I can solve this level of complexity, I can apply similar logic to the rest of the hierarchy that I didn't represent here. Thanks for reading such a long post. Matt - 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] Spring integration using AspectJ
It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they like) of this would be... Whereas wicket-spring works right out of the box now, in your case users would have to do something extra (set up AspectJ). Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Eelco On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: heh, the biggest advantage of @SpringBean is that it is done _before_ the constructor. i use services in the constructor all the time. maybe you can tweak the aspectj aspect to also do it before as well. (But do you explicitly invoke these services from inside the constructor or just delay execution inside populateItem-like callbacks? Sorry if the question is silly but I'm still making my way into wicket.) Regarding tweaking the aspect, the off-the-shelf pointcut is an initialization one and the advice is an after one. Initialization pointcut will encompass the period from the return from the super constructor call to the return of the first-called constructor. So the advice will in fact be called after the constructor returns. But redefining the advice to before-initialization (or before-call or before-execution) is trivial: @Aspect public class ConfigurerAspect extends BeanConfigurerSupport { public ConfigurerAspect() { setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver()); } @Before(initialization((@org.springframework.beans.factory.annotation.Configurable *).new(..)) this(bean)) public void beanCreation(Object bean) { configureBean(bean); } } Then you will need to replace aop:spring-configured for bean class=toy.ConfigurerAspect factory-method=aspectOf/ in your application context. The same can be done for matching your generic data providers but using ClassNameBeanWiringInfoResolver and a different pointcut instead. I've attached the example modified with the custom aspect. Cheers, Carlos On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Here is an example of using @Configurable to integrate spring with wicket as some people has asked me for one. To launch it just: 1) set MAVEN_OPTS=-javaagent:path-to-aspectwaver.jar/aspectjweaver.jar in the env. 2) run 'mvn jetty:run' Notice that dependencies are injected *after* constructor execution, so for this simple toy page that just get a text message from its only dependency, it could seem a little contrived to setup a read only Model just for feeding that message. More realistic scenarios generally will put a dao behind a model so the dependency won't be directly needed at construction time but instead when model callbacks are called. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat I've been done a little research and find out that the class AbstractBeanConfigurerAspect is provided just for this need. See for example http://forum.springframework.org/showthread.php?t=30993. 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
Re: [Wicket-user] Spring integration using AspectJ
thats why you use the aspectj weaver/loader, it weaves a deserialization handler into the object to reinject the dependencies. -igor On 3/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they like) of this would be... Whereas wicket-spring works right out of the box now, in your case users would have to do something extra (set up AspectJ). Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Eelco On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: heh, the biggest advantage of @SpringBean is that it is done _before_ the constructor. i use services in the constructor all the time. maybe you can tweak the aspectj aspect to also do it before as well. (But do you explicitly invoke these services from inside the constructor or just delay execution inside populateItem-like callbacks? Sorry if the question is silly but I'm still making my way into wicket.) Regarding tweaking the aspect, the off-the-shelf pointcut is an initialization one and the advice is an after one. Initialization pointcut will encompass the period from the return from the super constructor call to the return of the first-called constructor. So the advice will in fact be called after the constructor returns. But redefining the advice to before-initialization (or before-call or before-execution) is trivial: @Aspect public class ConfigurerAspect extends BeanConfigurerSupport { public ConfigurerAspect() { setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver()); } @Before(initialization((@ org.springframework.beans.factory.annotation.Configurable *).new(..)) this(bean)) public void beanCreation(Object bean) { configureBean(bean); } } Then you will need to replace aop:spring-configured for bean class=toy.ConfigurerAspect factory-method=aspectOf/ in your application context. The same can be done for matching your generic data providers but using ClassNameBeanWiringInfoResolver and a different pointcut instead. I've attached the example modified with the custom aspect. Cheers, Carlos On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Here is an example of using @Configurable to integrate spring with wicket as some people has asked me for one. To launch it just: 1) set MAVEN_OPTS=-javaagent:path-to-aspectwaver.jar /aspectjweaver.jar in the env. 2) run 'mvn jetty:run' Notice that dependencies are injected *after* constructor execution, so for this simple toy page that just get a text message from its only dependency, it could seem a little contrived to setup a read only Model just for feeding that message. More realistic scenarios generally will put a dao behind a model so the dependency won't be directly needed at construction time but instead when model callbacks are called. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat I've been done a little research and find out that the class AbstractBeanConfigurerAspect is provided just for this need. See for example http://forum.springframework.org/showthread.php?t=30993. 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
Re: [Wicket-user] Spring integration using AspectJ
It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they It isn't clear to me either. But as I know of some people (including myself) that i's using @Configurable to inject their domain objects (this is the spring 2 recommended way to go with that kind of wizardry), they may prefer to reutilize the same general technique for their presentation layer. Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Take a look at http://opensource.atlassian.com/projects/spring/browse/SPR-2896. The toy aspect I have defined before won't take care of dependency injecting upon deserialization, but it's a matter of advicing readResolve too as have been done for the spring 2.0.3 AnnotationBeanConfigurerAspect; it's pretty easy, I'll post the updated aspect later. Cheers, Carlos Eelco On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: heh, the biggest advantage of @SpringBean is that it is done _before_ the constructor. i use services in the constructor all the time. maybe you can tweak the aspectj aspect to also do it before as well. (But do you explicitly invoke these services from inside the constructor or just delay execution inside populateItem-like callbacks? Sorry if the question is silly but I'm still making my way into wicket.) Regarding tweaking the aspect, the off-the-shelf pointcut is an initialization one and the advice is an after one. Initialization pointcut will encompass the period from the return from the super constructor call to the return of the first-called constructor. So the advice will in fact be called after the constructor returns. But redefining the advice to before-initialization (or before-call or before-execution) is trivial: @Aspect public class ConfigurerAspect extends BeanConfigurerSupport { public ConfigurerAspect() { setBeanWiringInfoResolver(new AnnotationBeanWiringInfoResolver()); } @Before(initialization((@ org.springframework.beans.factory.annotation.Configurable *).new(..)) this(bean)) public void beanCreation(Object bean) { configureBean(bean); } } Then you will need to replace aop:spring-configured for bean class=toy.ConfigurerAspect factory-method=aspectOf/ in your application context. The same can be done for matching your generic data providers but using ClassNameBeanWiringInfoResolver and a different pointcut instead. I've attached the example modified with the custom aspect. Cheers, Carlos On 3/23/07, Carlos Pita [EMAIL PROTECTED] wrote: Here is an example of using @Configurable to integrate spring with wicket as some people has asked me for one. To launch it just: 1) set MAVEN_OPTS=-javaagent:path-to-aspectwaver.jar /aspectjweaver.jar in the env. 2) run 'mvn jetty:run' Notice that dependencies are injected *after* constructor execution, so for this simple toy page that just get a text message from its only dependency, it could seem a little contrived to setup a read only Model just for feeding that message. More realistic scenarios generally will put a dao behind a model so the dependency won't be directly needed at construction time but instead when model callbacks are called. I clearly see what you mean now. Maybe you can define another pointcut for the ConfigurerAspect that is not annotation based so you can advice classes which you are not able to modify. But anyway the simplicity that appealed me at first about my suggestion was somewhat I've been done a little research and find out that the class AbstractBeanConfigurerAspect is provided just for this need. See for example http://forum.springframework.org/showthread.php?t=30993. 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] Wicket and Flash not playing well together ?
Hello ! I'm working on a site that will integrate some cool flash multimedia stuff. My flash component actually consists in : one html page one swf script one mp3 file, contained in a Sound folder. one xml file (settings.xml) If i put all of these directly under webroot, it works great. But if i integrate the html in a Wicket page, only the static content of the flash app is displayed, and Wicket generates errors : 2007-03-23 22:24:18,832 [http--Processor24] ERROR wicket.RequestCycle - Unable to load class with name: eu.kwark.main.settings.xml wicket.WicketRuntimeException: Unable to load class with name: eu.kwark.main.settings.xml at wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:66) at wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy.decode(PackageRequestTargetUrlCodingStrategy.java:82) at wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:331) at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:83) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48) at wicket.RequestCycle.step(RequestCycle.java:992) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) (eu.kwark.main is the package where i stored all the flash related files) Can someone show me the way, please ? - 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] General Java/OO/Pattern Question
You need an interface like javax.swing.tree.TreeNode that all your nested objects implement. This is what wicket uses for its tree implementation (take a look in wicket-extensions for 1.x). The wicket tree impl rocks, so you can do no better than look there for inspiration. Also, take a look at DefaultMutableTreeNode for ideas on how to implement. best, jim On 3/23/07, Matt Welch [EMAIL PROTECTED] wrote: As the subject indicates, this isn't a question specific to Wicket (although it WILL eventually involve Wicket to display these objects), so if you feel I should post this elsewhere, feel free to tell me so, however it seemed like a pretty bright bunch of Java guys hang around here so I'm hoping for some insight. I've been tasked with implementing a rather curious (to me anyway) hierarchical object structure. Most of the objects in this structure serve no other purpose than to group the objects below them; it's only at the final leaf levels that there are some significant behavioral difference in the objects. For lack of a better example, I'll call these objects Grouper1, Grouper2, Grouper3, and Leaf. So I might have a structure that looks like: Grouper1 --Grouper2 Grouper3 --Leaf --Leaf --Leaf Grouper3 --Leaf --Leaf --Leaf It can also look like this: Grouper1 --Grouper3 Leaf Leaf Leaf --Grouper3 Leaf Leaf Leaf Or like this: Grouper1 --Leaf --Leaf --Grouper2 Grouper3 --Leaf --Leaf --Leaf Grouper3 --Leaf --Leaf --Leaf Or even like this: Grouper3 --Leaf --Leaf --Leaf Although I'm willing to exclude that last example (with something other than a Grouper1 at the top) if it helps simplify things any. As you can see almost all objects in the hierarchy can exist at any level. Only the leaf node has any properties beyond those shared by all of the other objects. And before you ask, despite the fact that the branch items are so similar, they do have different labels that are important to the people using the hierarchy. I'm just trying to determine if those labels are important to the domain model. I started to model this using simple inheritance. Something like the following: public abstract class MyHierarchyObject{ private String commonAttribute1; private boolean commonAttribute2 = false; private ListMyHierarchyObject children = new ArrayListMyHierarchyObject; private MyHierarchyObject parent; //the association needs to be bidirectional for up and down navigation ... } public class Grouper1 extends MyHierarchyObject{ } etc. etc. Of course, I realized after just a few seconds that this seemed a little silly since I was going to end up with at least three classes with either no behavior or properties or only extremely minor changes to the abstract class's properties like setting commonAttribute2 to true by default. So does using inheritance like this still make sense or should I do something like make the MyHierarchyObject not abstract and add a Type property that can be populated from an enum with elements like Grouper1, Grouper2, and Grouper3? What about the leaf node. It's not allowed to have children but because it can be a child of any of the Groupers, it seems like it needs to extend MyHierarchyObject in order to fit into the child parent model. Should I put the children related methods into an interface that only the Grouper classes implement? Of course that only works if I use the inheritance model; maybe that's a good reason to use it? Or is there a design pattern I'm missing in all of this that might help me. I've been thinking about this for so long now that I'm afraid I'm too deep into it and not thinking clearly about the best approaches. That's why I'm posting here. Unfortunately, the hierarchy is quite a bit more complex than this example, but I think if I can solve this level of complexity, I can apply similar logic to the rest of the hierarchy that I didn't represent here. Thanks for reading such a long post. Matt - 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] Spring integration using AspectJ
It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they It isn't clear to me either. But as I know of some people (including myself) that i's using @Configurable to inject their domain objects (this is the spring 2 recommended way to go with that kind of wizardry), they may prefer to reutilize the same general technique for their presentation layer. Yeah, that's a good point. Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Take a look at http://opensource.atlassian.com/projects/spring/browse/SPR-2896. The toy aspect I have defined before won't take care of dependency injecting upon deserialization, but it's a matter of advicing readResolve too as have been done for the spring 2.0.3 AnnotationBeanConfigurerAspect; it's pretty easy, I'll post the updated aspect later. Cool. It would also be cool if this would work with Terracotta somehow, but I guess that's a bit out of scope for this particular thread. What do you have in mind with this Carlos? You want to start a Wicket-stuff project for this, or do you want to propose this to live in the wicket-spring project (*if* everyone would agree, so currently hypothetical only)? 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] Spring integration using AspectJ
a project for what? there is nothing to do but to configure spring in the context xml file, put @Configurable on your page/component, and configure the aspectj agent in your launch config. -igor On 3/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they It isn't clear to me either. But as I know of some people (including myself) that i's using @Configurable to inject their domain objects (this is the spring 2 recommended way to go with that kind of wizardry), they may prefer to reutilize the same general technique for their presentation layer. Yeah, that's a good point. Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Take a look at http://opensource.atlassian.com/projects/spring/browse/SPR-2896. The toy aspect I have defined before won't take care of dependency injecting upon deserialization, but it's a matter of advicing readResolve too as have been done for the spring 2.0.3 AnnotationBeanConfigurerAspect; it's pretty easy, I'll post the updated aspect later. Cool. It would also be cool if this would work with Terracotta somehow, but I guess that's a bit out of scope for this particular thread. What do you have in mind with this Carlos? You want to start a Wicket-stuff project for this, or do you want to propose this to live in the wicket-spring project (*if* everyone would agree, so currently hypothetical only)? 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] Wicket and Flash not playing well together ?
what does the code/markup of your page look like? -igor On 3/23/07, Landry Soules [EMAIL PROTECTED] wrote: Hello ! I'm working on a site that will integrate some cool flash multimedia stuff. My flash component actually consists in : one html page one swf script one mp3 file, contained in a Sound folder. one xml file (settings.xml) If i put all of these directly under webroot, it works great. But if i integrate the html in a Wicket page, only the static content of the flash app is displayed, and Wicket generates errors : 2007-03-23 22:24:18,832 [http--Processor24] ERROR wicket.RequestCycle - Unable to load class with name: eu.kwark.main.settings.xml wicket.WicketRuntimeException: Unable to load class with name: eu.kwark.main.settings.xml at wicket.application.DefaultClassResolver.resolveClass( DefaultClassResolver.java:66) at wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy.decode( PackageRequestTargetUrlCodingStrategy.java:82) at wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest( WebRequestCodingStrategy.java:331) at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve( DefaultRequestTargetResolverStrategy.java:83) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve( AbstractCompoundRequestCycleProcessor.java:48) at wicket.RequestCycle.step(RequestCycle.java:992) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java :126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java :148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) (eu.kwark.main is the package where i stored all the flash related files) Can someone show me the way, please ? - 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] Spring integration using AspectJ
Right. Eelco On 3/23/07, Igor Vaynberg [EMAIL PROTECTED] wrote: a project for what? there is nothing to do but to configure spring in the context xml file, put @Configurable on your page/component, and configure the aspectj agent in your launch config. -igor On 3/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they It isn't clear to me either. But as I know of some people (including myself) that i's using @Configurable to inject their domain objects (this is the spring 2 recommended way to go with that kind of wizardry), they may prefer to reutilize the same general technique for their presentation layer. Yeah, that's a good point. Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Take a look at http://opensource.atlassian.com/projects/spring/browse/SPR-2896. The toy aspect I have defined before won't take care of dependency injecting upon deserialization, but it's a matter of advicing readResolve too as have been done for the spring 2.0.3 AnnotationBeanConfigurerAspect; it's pretty easy, I'll post the updated aspect later. Cool. It would also be cool if this would work with Terracotta somehow, but I guess that's a bit out of scope for this particular thread. What do you have in mind with this Carlos? You want to start a Wicket-stuff project for this, or do you want to propose this to live in the wicket-spring project (*if* everyone would agree, so currently hypothetical only)? 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 - 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] Spring integration using AspectJ
a project for what? there is nothing to do but to configure spring in the context xml file, put @Configurable on your page/component, and configure the aspectj agent in your launch config. :) . Yep, that's everything . -igor On 3/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: It's cool that it can be done like that. However, it's still not clear to me what the advantage (besides giving people more choice if they It isn't clear to me either. But as I know of some people (including myself) that i's using @Configurable to inject their domain objects (this is the spring 2 recommended way to go with that kind of wizardry), they may prefer to reutilize the same general technique for their presentation layer. Yeah, that's a good point. Also, forgive me if I missed something, but if those dependencies are defined as transients and the components would be serialized and deserialized, who/ where/ what would be in charge of re-injecting the dependencies? Take a look at http://opensource.atlassian.com/projects/spring/browse/SPR-2896. The toy aspect I have defined before won't take care of dependency injecting upon deserialization, but it's a matter of advicing readResolve too as have been done for the spring 2.0.3 AnnotationBeanConfigurerAspect; it's pretty easy, I'll post the updated aspect later. Cool. It would also be cool if this would work with Terracotta somehow, but I guess that's a bit out of scope for this particular thread. What do you have in mind with this Carlos? You want to start a Wicket-stuff project for this, or do you want to propose this to live in the wicket-spring project (*if* everyone would agree, so currently hypothetical only)? 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 - 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] Spring integration using AspectJ
Well, to be precise, there is this minor complication of redefining the advice to configure the bean before constructor execution. And you can take advantage of spring-annotations to avoid cluttering your xml app context (that's if you are reluctant to autowiring). What I can do is to update the example project so anyone who is interested could use it as reference. And after that I will take a time to learn what wicket is about :). That'll be nice, thanks for the effort. 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] Today's wicket1.X breaks GridView + Dynamic Resource
Thanks, very speedy! - you guys are ninjas Eelco Hillenius wrote: Igor just committed a fix, so all should be good now again. Eelco On 3/23/07, Eelco Hillenius [EMAIL PROTECTED] wrote: There are two failing unit tests currently that seem to be the same issue. Eelco On 3/23/07, NickCanada [EMAIL PROTECTED] wrote: Hi Guys, Thanks for all your Wicket work. Using the latest Wicket1.X (23rdMarch) from SVN, my code which puts RenderedDynamicImageResource objects in a GridView no longer works (prior versions ran fine). The instead of displaying the dynamic resource images in each cell, I get the following error message: wicket.WicketRuntimeException: Loop item is null. Probably the number of loop iterations were changed between onBeginRequest and render time. at wicket.markup.html.list.Loop.onRender(Loop.java:169) The following code replicates the error (I am using the CircleDynamicImageResource from the examples): public class TestGridViewResRef extends WebPage { /** Creates a new instance of TestGridViewResRef */ public TestGridViewResRef() { IDataProvider dataProvider = new ImageDataProvider(); GridView gridView = new GridView(rows, dataProvider) { protected void populateItem(Item item) { item.add(new ImagePanel(images)); } protected void populateEmptyItem(Item item) { item.add(new Label(firstName, *empty*)); } }; gridView.setRows(3); gridView.setColumns(3); add(gridView); add(new PagingNavigator(navigator, gridView)); } private class ImagePanel extends Panel{ public ImagePanel(String id){ super(id); // Dynamically created buffered image add(new Image(image, new CircleDynamicImageResource(100, 100))); } } Is anything amiss? I can't get to the root of the cause. Thanks for any help. Nick -- View this message in context: http://www.nabble.com/Today%27s-wicket1.X-breaks-GridView-%2B-Dynamic-Resource-tf3456149.html#a9642591 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 -- View this message in context: http://www.nabble.com/Today%27s-wicket1.X-breaks-GridView-%2B-Dynamic-Resource-tf3456149.html#a9644818 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] Wicket and Flash not playing well together ?
i dont see you reference settings.xml anywhere, but the error says you are trying to load it. so where is the reference? -igor On 3/23/07, Landry Soules [EMAIL PROTECTED] wrote: Sorry, my post was quite incomplete. Here is the markup : ?xml version=1.0 encoding=UTF-8? html xmlns=http://www.w3.org/1999/xhtml; body bgcolor=#ff wicket:extend object classid=clsid:d27cdd6e-ae6d-22cf-96b8-44455754 codebase= http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0 width=640 height=520 id=camchat align=middle param name=allowScriptAccess value=sameDomain / param name=movie value=camchat.swf /param name=quality value=high /param name=bgcolor value=#ff /embed src=camchat.swf quality=high bgcolor=#ff width=640 height=520 name=camchat align=middle allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer; / /object /wicket:extend /body /html - - - - - - - - - - public class Page1 extends CustomPage { static Logger logger = Logger.getLogger(Page1.class); public Page1() { super(); setPageTitle(new StringResourceModel(site.name, this, null) .getString() + , page 1); } } Igor Vaynberg a écrit : what does the code/markup of your page look like? -igor On 3/23/07, *Landry Soules* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hello ! I'm working on a site that will integrate some cool flash multimedia stuff. My flash component actually consists in : one html page one swf script one mp3 file, contained in a Sound folder. one xml file (settings.xml) If i put all of these directly under webroot, it works great. But if i integrate the html in a Wicket page, only the static content of the flash app is displayed, and Wicket generates errors : 2007-03-23 22:24:18,832 [http--Processor24] ERROR wicket.RequestCycle - Unable to load class with name: eu.kwark.main.settings.xml wicket.WicketRuntimeException: Unable to load class with name: eu.kwark.main.settings.xml at wicket.application.DefaultClassResolver.resolveClass (DefaultClassResolver.java:66) at wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy.decode( PackageRequestTargetUrlCodingStrategy.java:82) at wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest (WebRequestCodingStrategy.java:331) at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve (DefaultRequestTargetResolverStrategy.java:83) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve (AbstractCompoundRequestCycleProcessor.java:48) at wicket.RequestCycle.step(RequestCycle.java:992) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java :454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java :80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) (eu.kwark.main is the package where i stored all the flash related files) Can someone show me the way, please ? - 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
Re: [Wicket-user] ajax errors handling
* Andrew Klochkov: Is there any way to control ajax errors handling? For example, if the session is expired wicket returns empty response for ajax requests (WebRequestCycleProcessor.resolve() returns an EmptyRequestTarget instance). This is fixed already, see: Use an uniform behavior for the expiration page http://issues.apache.org/jira/browse/WICKET-364 -- 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
[Wicket-user] sos, ajax refresh chaos
last time ,I mentioned the table cannot be update after the ajax modal window closed. now it can work when i set the outputmarkid to true, but,... it's strange. it will add the content of table at the top of original table ps. the ajax don't refresh the main window every one, is there any one have the same experience? table tr it generate the update datatable content here after close the modal window /tr /table span wicket:id=listContainer table tr wicket:id=dataList here is my data table. /tr /table /span - 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] How to catch the error in custome error page?
I want to create a custom page to catch all error , log these into db and only show some clear infomation into user. i know set something in the application, but how can i catch these error in my page? - 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] sos, ajax refresh chaos
can you provide a quickstart example that demonstrates this problem? -Matej On 3/24/07, tooy li(Gmail) [EMAIL PROTECTED] wrote: last time ,I mentioned the table cannot be update after the ajax modal window closed. now it can work when i set the outputmarkid to true, but,... it's strange. it will add the content of table at the top of original table ps. the ajax don't refresh the main window every one, is there any one have the same experience? table tr it generate the update datatable content here after close the modal window /tr /table span wicket:id=listContainer table tr wicket:id=dataList here is my data table. /tr /table /span - 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] How to catch the error in custome error page?
* tooy li(Gmail): I want to create a custom page to catch all error , log these into db and only show some clear infomation into user. i know set something in the application, but how can i catch these error in my page? So you want to handle the exception yourself? Try this in your Application: @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected Page onRuntimeException(Page page, RuntimeException e) { logErrorInDataBase(e); return new MyExceptionPage(); } }; } You don't indicate which version of Wicket you're using, I assume the latest in this code snippet. -- 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] Wicket and Flash not playing well together ?
Unable to load class with name: eu.kwark.main.settings.xml ? It really looks like you're trying to reference packaged resource that's not there. -Matej On 3/23/07, Landry Soules [EMAIL PROTECTED] wrote: Hello ! I'm working on a site that will integrate some cool flash multimedia stuff. My flash component actually consists in : one html page one swf script one mp3 file, contained in a Sound folder. one xml file (settings.xml) If i put all of these directly under webroot, it works great. But if i integrate the html in a Wicket page, only the static content of the flash app is displayed, and Wicket generates errors : 2007-03-23 22:24:18,832 [http--Processor24] ERROR wicket.RequestCycle - Unable to load class with name: eu.kwark.main.settings.xml wicket.WicketRuntimeException: Unable to load class with name: eu.kwark.main.settings.xml at wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:66) at wicket.request.target.coding.PackageRequestTargetUrlCodingStrategy.decode(PackageRequestTargetUrlCodingStrategy.java:82) at wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:331) at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:83) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48) at wicket.RequestCycle.step(RequestCycle.java:992) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) (eu.kwark.main is the package where i stored all the flash related files) Can someone show me the way, please ? - 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] How to catch the error in custome error page?
Yes. For others who don't want to log the exception, you can show error pages for different categories of exceptions by setting these methods on ApplicationSettings: - getAccessDeniedPage() - getInternalErrorPage() - getPageExpiredPage() Unfortunately, you don't get the exception object there. Perhaps in some near-future version, we can have an error page factory. I think that would be good because then you don't need to get involved in the guts of Wicket to do something pretty simple. How about this: public interface IErrorPageFactory { Page newAccessDeniedPage(AuthorizationException e); Page newPageExpiredPage(PageExpiredException e); Page newExceptionErrorPage(RuntimeException e); Page newInternalErrorPage(RuntimeException e); } then make a default implementation so people can override just the pages they want to customize: public class AbstractErrorPageFactory implements IErrorPageFactory { ... } This would give users the ability to customize without the need to know details like what's in AbstractRequestCycleProcessor.respond(RuntimeException e, RequestCycle requestCycle) most of which really is necessary to do handle exceptions right. Maybe some developer on the core team would like to handle this? If so, we could remove a number of annoyingly non-general settings from ApplicationSettings in favor of just getErrorPageFactory() Jean-Baptiste Quenot-3 wrote: * tooy li(Gmail): I want to create a custom page to catch all error , log these into db and only show some clear infomation into user. i know set something in the application, but how can i catch these error in my page? So you want to handle the exception yourself? Try this in your Application: @Override protected IRequestCycleProcessor newRequestCycleProcessor() { return new WebRequestCycleProcessor() { @Override protected Page onRuntimeException(Page page, RuntimeException e) { logErrorInDataBase(e); return new MyExceptionPage(); } }; } You don't indicate which version of Wicket you're using, I assume the latest in this code snippet. -- 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 -- View this message in context: http://www.nabble.com/How-to-catch-the-error-in-custome-error-page--tf3456980.html#a9646011 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] Problem with ajax tree and listView
Sorry, don't know why my message didn't send, probably because gmail and attachement. I've made a quick start files for the problem. The problem is If using a ListView to display the tree node value, after I collapse the node, I can never expand it again, and the ListItem becomes null. No problem with a Label. Could you give me some directions ? Thanks. Sincerely, Isaac Matej Knopp wrote: hi, this really is weird. Can you post a quick start project that demonstrates the behavior? -Matej On 3/23/07, Isaac Weng [EMAIL PROTECTED] wrote: Hi, This is my first time asking questions here. Hope I can make my question clear. I'v tried to extend the ajax tree in the wicket extension. The only modification I made is the output value, which is a customized panel instead of a label. Following are my html and source. MyTree.html : span wicket:id=indent/spana wicket:id=linkspan wicket:id=image//a a wicket:id=nodeLinkspan class=icon wicket:id=icon/spanspan wicket:id=myPanel / To simplify the problem, I strip most markups of MyPanel.html to what I think causing the problem. MyPanel.html : span wicket:id=outputListspan wicket:id=outputNamename/span/span MyPanel.java : public MyPanel extends Panel { public MyPanel(String id) { super(id); ArrayListString list = new ArrayListString(); list.add(name1); add(new ListView(outputList, list) { public void populateItem(final ListItem item) { final String name = (String) item.getModelObject(); item.add(new Label(outputName, name)); } }); } } The problem is while I click the junction link, ListView.renderItem() throws a NullPointerException. After some digging, I found that the ListItem is null. Then I use getList(), and it successfully return the list I passed in and the values in that list are also correct, however the ListItem is null which I don't know why. Thanks for reading my question. I will appreciate any suggestions. Isaac tree-quickstart.IamAzip Description: Binary data - 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