Re: wicket scalability
On 9/19/07, Lowell Kirsh [EMAIL PROTECTED] wrote: For work I'm trying to use wicket, but my boss wants to be reassured that it will scale well. Can anyone point me to any sources (not anecdotes) about how well wicket scales? And yes, I know my question is vague, but right now, so are our requirements. The best way to go is to not take our word for it, but test for yourself. Take wicket-examples, create a test project at it (e.g. using JMeter) and see what you got. Please feel free to post your results. Matej, if you still have some of those JMeter results lying around, maybe that would be interesting. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket and Searching with Solr
That looks very interesting. I'ĺl look into that and see if i can get it to work. Thanks Igor. Igor Vaynberg wrote: an easy way to do this is to key both repeaters off the same model: class mypage extends webpage { class resultsmodel extends loadabledetachablemodel { load() { return solr.search(...); } } mypage() { setmodel(new resultsmodel()); add(new listview(a, getmodel())); add(new listview(b, getmodel())); } } that way both repeaters are reusing the same cached result. -igor On 9/18/07, Nicky Bulthuis [EMAIL PROTECTED] wrote: Dear Wicket Users, I have a slight problem, although problem might not be the correct word. I'll explain. I'm developing an application which allows the searching of metadata from scanned documents. For searching i'm using Solr and for the frontend i'm using Wicket. Both are new technologies to me and i'm having a lot of fun learning both. However, my implementation of the search page just doesn't feel exactly right. I was hoping to get some advice here about how to proceed. Solr has the ability to give me facets, which you can use to refine a search. That is a feature i want, but it also adds a problem. You search once, but get two different results. The first is the series of documents matching the search criteria, the second a list of facets about the documents in the search results. So, how do i only search once, and populate two different repeaters. Sofar i've done this in three different ways, but i'm not happy with either. 1. I've used a DataView for both the document list and the facet list. Both with a DataProvider doing the search and returning a subset. Where the facet list always returning the complete list. Eventhough this is easy to implement, it also makes me search twice for the same query, which is something i try to avoid. However my experience with solr is still very limited, so i'm not sure if this is that much of a problem in the end. But sofar i've been trying to avoid the double search. 2. My second try was by doing the search in the onBeforeRender method. Creating a new Pageable list for the documents and a normal ListView for the facets and then using addOrReplace to get them on the page. This is working just fine and i'm only doing one search. Except i've got this feeling that i'm not supposed to alter the components in the 'onBeforeRender' method. I could be wrong, but it just doesn't feel right. 3. I create a new page for every request with a different Query Object. So the page does the search, fills the list and displays it. Rewrite every link to construct a new SearchPage and show that one. The problem i'm having with this one is the constant contruct of new SearchPages. I should be reusing them. Due to my inexperience with Wicket i'm kind of at a loss on how to proceed and hope i can get some advice. So i guess my question comes down to, what is the proper way to populate two lists from one source, while still being able to modify the search criteria. I hope someone can give me some advice. Regards, Nicky -- Nicky Bulthuis ValueCare BV Oudlaan 4 3515 GA Utrecht Mob: 06-41341545 E-mail: [EMAIL PROTECTED] Web: www.valuecare.nl Indien dit bericht niet voor u is bedoeld dan verzoeken wij u vriendelijk ons te informeren via een retour bericht en dient u deze mail direct te vernietigen. ValueCare gebruikt virus scanners maar accepteert geen aansprakelijkheid voor virussen die de email mogelijk bevat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nicky Bulthuis ValueCare BV Oudlaan 4 3515 GA Utrecht Mob: 06-41341545 E-mail: [EMAIL PROTECTED] Web: www.valuecare.nl Indien dit bericht niet voor u is bedoeld dan verzoeken wij u vriendelijk ons te informeren via een retour bericht en dient u deze mail direct te vernietigen. ValueCare gebruikt virus scanners maar accepteert geen aansprakelijkheid voor virussen die de email mogelijk bevat. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: threading issues - continued
Bit more information is that the bean property that is causing the problem is being set to null by my html form via a wicket ajax update... Could it be that although wicket is doing everything correctly the DOM in (firefox 2) has not settled after the elmt.innerHTML= ... from the previous ajax response so the next click sends an update that I wouldn't expect? Any options in wicket to block the UI till the DOM has settled? Or shall I point my html monkey at it? Sam Hough wrote: Must be me then. I'll try and pin it down more. Hmmm. Johan Compagner wrote: the nullpointer comes from outside of wicket (criterion class) but you say if you click quickly you only get it? all pages are blocked by a barrier that is build around the pagemap. its in Session.get page method. only 1 request can pass that at the same time. but what is suddenly null that you dont expect to be null? On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: That is pretty much it. Except that: Caused by: java.lang.NullPointerException at com.namechangedtoprotectguilty.search.Criterion.getHelper(Criterion.java:200) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1030) Blows up in our code in a way that really looks like a multithreading issue to me. If I click slowly no problems, if I click quickly on a slow page it reliably blows up. Guess I could put in a sync filter to double check that it is a sync error. We don't create any threads so apart from threading issue I can't see what else it could be... igor.vaynberg wrote: show us the full stack trace -igor On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: Which bit of code does the blocking on the server? I'm getting what looks very much like a threading issue. I've looked at all the methods below and can't see any obvious sync code... I'm using 1.3-beta3 at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1034) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:247) at org.apache.wicket.util.lang.PropertyResolver.getValue( PropertyResolver.java:89) at org.apache.wicket.model.AbstractPropertyModel.getObject( AbstractPropertyModel.java:110) at org.apache.wicket.Component.getModelObject(Component.java:1293) at org.apache.wicket.Component$2.compare(Component.java:540) at org.apache.wicket.Component.setModelObject(Component.java:2522) at org.apache.wicket.markup.html.form.FormComponent.updateModel( FormComponent.java:1002) at org.apache.wicket.markup.html.form.Form$14.validate(Form.java :1642) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent( Form.java:160) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:403) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrder (FormComponent.java:368) at org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder( Form.java:1004) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels( Form.java:1637) at org.apache.wicket.markup.html.form.Form.process(Form.java:834) at org.apache.wicket.markup.html.form.Form.onFormSubmitted( Form.java:783) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent( AjaxFormSubmitBehavior.java:126) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java :163) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest( AbstractDefaultAjaxBehavior.java:268) at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents (BehaviorRequestTarget.java:100) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents( AbstractRequestCycleProcessor.java:90) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java :1032) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1108)
Context-sensitive roles
I'm making a forum project to learn about Wicket, Hibernate Spring. It has been interesting, but now I am kinda stuck for a while on authentication/authorization. The difficulty I am having is that the roles a user can have is based on the forum he is on. Each forum is owned by a different user. So a user can be a forum administator on forum A, but be a registered user on forum B. All examples I see seem to determine the roles context-free. Is it still possible to use Wasp/Swarm with such a use case. And if so could someone explain the basics for how to do this on a conceptual level? When and where do I determine the roles and store them? Kinda off-topic... when searching for more information about Java and security I found this book: Core Security Patterns: Best Practices and Strategies for J2EE http://www.amazon.com/Core-Security-Patterns-Strategies-Management/dp/0131463071/ref=pd_bbs_sr_1/002-9886411-4978452?ie=UTF8s=booksqid=1190190555sr=1-1 I was curious if someone here read this book and if the information in this book is still useful when working with Wicket. Thanks for any help.
Re: Acegi (Spring Security)
The fix I came up with was to get the Authentication from my session class. Ian - Original Message From: Thies Edeling [EMAIL PROTECTED] To: users@wicket.apache.org Sent: Tuesday, 18 September, 2007 11:19:20 PM Subject: Re: Acegi (Spring Security) Did you manage to fix this ? I have the exact same symptom, user authenticates fine (org.acegisecurity.event.authentication.LoggerListener - Authentication event AuthenticationSuccessEvent: thies; details: null) but authentication is not set in the context. Thies Ian Godman wrote: Hi I am have a bit of a problem with Wicket and Acegi. I am not getting an exception so there is no trace. What is happening is that once logged in the Authentication is sometimes not set. I get it as follows: AuthenticationToken tkn = SecurityContextHolder.getContext().getAuthentication() ; If I log in and I dont get the Authentication I can close the browser and revisit the URL and I have the Authentication at the point the Index page writes the user name but latter its only there some of the time. It appears to me that it is ether a session issue with Wicket or that some where the thread local used by Acegi is not being updated by the listener (not had that problem before) or that a different thread is calling my code. Because of the size and complexity of the application I can not post source code. Does anyone have any experience with Wicket/Acegi or know how Wicket deals with Acegi integration? I need ideas of where to look. Many thanks Ian ___ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/
onNewBrowserWindow is not called
Hi, when a new Browser-Window is opened, I want to start a new Session for this window. I implemented the method onNewBrowserWindow() in my HomePage.class, but it is never called. I tried opening a new Browser, a new Browser-Window and new Tab, but nothing. Is there any other way to determine if a new Window is opened? Benjamin
PropertyResolverConverter and non-String values
Hi everyone! I have a form which needs to select a Class from a list, so I added a DropDownChoice loaded with a list of beans like: public class ClassDescriptionBean{ private String description; private Class type; [getters and setters omissis] } so that the form shows nice descriptions.. The form has a CompoundPropertyModel with a back bean like public class BackBean{ Class type; [getters and setters omissis] } But when I try to submit the form I have the following exception: org.apache.wicket.util.convert.ConversionException: Can't convert value: [EMAIL PROTECTED] to class: class java.lang.Class for setting it on [EMAIL PROTECTED] Obviously PropertyResolverConverter doesn't know how to map a ClassDescriptionBean to the corresponding Class, but how am I supposed to do it? I already have a custom ConverterLocator in place, but it looks like it gets called only when the source (or the destination) class of the conversion is a String.. If I change BackBean.type to a ClassDescriptionBean everything works, but I'd like to add the conversion.. Am I missing something? Many thanks for your attention! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: onNewBrowserWindow is not called
You need to turn on multi window support. But this is not really user overridable callback. Also, what do you mean by start new session? -Matej On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote: Hi, when a new Browser-Window is opened, I want to start a new Session for this window. I implemented the method onNewBrowserWindow() in my HomePage.class, but it is never called. I tried opening a new Browser, a new Browser-Window and new Tab, but nothing. Is there any other way to determine if a new Window is opened? Benjamin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: serving images from db - direct url access
Johan Compagner wrote: setCached causes wicket to send http cache headers. Resources it self are cached in SharedResources. The resource itself is responsable what is cached internally what does it mean that Resource is cached in SharedResources? In my case: getSharedResources().add( snapshot, new CameraSnapshotResource() ); mountSharedResource(snapshot, new ResourceReference( snapshot ).getSharedResourceKey() ); there is a single resources but it produces different content basing on request parameters. -- Leszek Gawron - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: onNewBrowserWindow is not called
Hi I store some context-information in the session. When a new window is opened it has a new context, so I want to have a new Session for this context. But the old window should stay with the old context. Benjamin 2007/9/19, Matej Knopp [EMAIL PROTECTED]: You need to turn on multi window support. But this is not really user overridable callback. Also, what do you mean by start new session? -Matej On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote: Hi, when a new Browser-Window is opened, I want to start a new Session for this window. I implemented the method onNewBrowserWindow() in my HomePage.class, but it is never called. I tried opening a new Browser, a new Browser-Window and new Tab, but nothing. Is there any other way to determine if a new Window is opened? Benjamin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket scalability
What do you mean with Scaling? Wicket scales pretty well. because we fully support clustering out of the box. So you can add just add new servers. Wicket it self is fast, the database would be much more of a bottleneck. johan On 9/19/07, Lowell Kirsh [EMAIL PROTECTED] wrote: For work I'm trying to use wicket, but my boss wants to be reassured that it will scale well. Can anyone point me to any sources (not anecdotes) about how well wicket scales? And yes, I know my question is vague, but right now, so are our requirements. Thanks, Lowell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertyResolverConverter and non-String values
thats final you could try to do something with: protected Object convertChoiceIdToChoice(String id) But that is an id and how is that id converted to what? Is that the ClassDescriptionBean? And that Again must be converted to something else? johan On 9/19/07, Federico Fanton [EMAIL PROTECTED] wrote: On Wed, 19 Sep 2007 12:11:10 +0200 Federico Fanton [EMAIL PROTECTED] wrote: Obviously PropertyResolverConverter doesn't know how to map a ClassDescriptionBean to the corresponding Class, but how am I supposed to do it? I already have a custom ConverterLocator in place, but it looks like it gets called only when the source (or the destination) class of the conversion is a String.. Should I override AbstractSingleSelectChoice.convertValue() ? ^^; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: PropertyResolverConverter and non-String values
On Wed, 19 Sep 2007 12:11:10 +0200 Federico Fanton [EMAIL PROTECTED] wrote: Obviously PropertyResolverConverter doesn't know how to map a ClassDescriptionBean to the corresponding Class, but how am I supposed to do it? I already have a custom ConverterLocator in place, but it looks like it gets called only when the source (or the destination) class of the conversion is a String.. Should I override AbstractSingleSelectChoice.convertValue() ? ^^; - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: threading issues - continued
but you get null pointers in the serverside. So what should that have to do with busy parsing on the client side That second submit is being done again (with the OLD dom) and that maybe doesn't map correctly any more? The problem is that the ajax request and waiting for the response and updating the dom should be done then completely synchronously Because it could be a problem yes when you click fast on things that will be replaced.. johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Yes. Click A updates part of the form. Click B (very soon after A) also submits that form. So my suspicion is that the browser is still busy parsing the last update and click B sends a form in an intermediate state. Does that sound likely? I've seen it in the past that after innerHTML you have to wait a while to access the DOM. Johan Compagner wrote: do you click fast on a dom portion that is being replaced by the previous request? johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Bit more information is that the bean property that is causing the problem is being set to null by my html form via a wicket ajax update... Could it be that although wicket is doing everything correctly the DOM in (firefox 2) has not settled after the elmt.innerHTML= ... from the previous ajax response so the next click sends an update that I wouldn't expect? Any options in wicket to block the UI till the DOM has settled? Or shall I point my html monkey at it? Sam Hough wrote: Must be me then. I'll try and pin it down more. Hmmm. Johan Compagner wrote: the nullpointer comes from outside of wicket (criterion class) but you say if you click quickly you only get it? all pages are blocked by a barrier that is build around the pagemap. its in Session.get page method. only 1 request can pass that at the same time. but what is suddenly null that you dont expect to be null? On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: That is pretty much it. Except that: Caused by: java.lang.NullPointerException at com.namechangedtoprotectguilty.search.Criterion.getHelper( Criterion.java:200) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1030) Blows up in our code in a way that really looks like a multithreading issue to me. If I click slowly no problems, if I click quickly on a slow page it reliably blows up. Guess I could put in a sync filter to double check that it is a sync error. We don't create any threads so apart from threading issue I can't see what else it could be... igor.vaynberg wrote: show us the full stack trace -igor On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: Which bit of code does the blocking on the server? I'm getting what looks very much like a threading issue. I've looked at all the methods below and can't see any obvious sync code... I'm using 1.3-beta3 at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1034) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:247) at org.apache.wicket.util.lang.PropertyResolver.getValue( PropertyResolver.java:89) at org.apache.wicket.model.AbstractPropertyModel.getObject( AbstractPropertyModel.java:110) at org.apache.wicket.Component.getModelObject(Component.java:1293) at org.apache.wicket.Component$2.compare(Component.java :540) at org.apache.wicket.Component.setModelObject(Component.java:2522) at org.apache.wicket.markup.html.form.FormComponent.updateModel( FormComponent.java:1002) at org.apache.wicket.markup.html.form.Form$14.validate(Form.java :1642) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent ( Form.java:160) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:403) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390) at
Re: onNewBrowserWindow is not called
You can use pagemap metadata for it, providing you have recent enough wicket version. And, of course, you have to turn on the multiwindow support. -Matej On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote: Hi I store some context-information in the session. When a new window is opened it has a new context, so I want to have a new Session for this context. But the old window should stay with the old context. You should try to bend this in a separate data structure within the session, probably keyed on page map id. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: threading issues - continued
But shouldn't that be a validation error? -Matej On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: I'm getting null pointers on the server side because the form _values_ seem not do have been set by the client yet so in the http request someParameter= which would otherwise not be the case. Doesn't seem like something I want to handle on the server... If somebody is hacking, has broken browser I'd rather the server threw an error. Johan Compagner wrote: but you get null pointers in the serverside. So what should that have to do with busy parsing on the client side That second submit is being done again (with the OLD dom) and that maybe doesn't map correctly any more? The problem is that the ajax request and waiting for the response and updating the dom should be done then completely synchronously Because it could be a problem yes when you click fast on things that will be replaced.. johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Yes. Click A updates part of the form. Click B (very soon after A) also submits that form. So my suspicion is that the browser is still busy parsing the last update and click B sends a form in an intermediate state. Does that sound likely? I've seen it in the past that after innerHTML you have to wait a while to access the DOM. Johan Compagner wrote: do you click fast on a dom portion that is being replaced by the previous request? johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Bit more information is that the bean property that is causing the problem is being set to null by my html form via a wicket ajax update... Could it be that although wicket is doing everything correctly the DOM in (firefox 2) has not settled after the elmt.innerHTML= ... from the previous ajax response so the next click sends an update that I wouldn't expect? Any options in wicket to block the UI till the DOM has settled? Or shall I point my html monkey at it? Sam Hough wrote: Must be me then. I'll try and pin it down more. Hmmm. Johan Compagner wrote: the nullpointer comes from outside of wicket (criterion class) but you say if you click quickly you only get it? all pages are blocked by a barrier that is build around the pagemap. its in Session.get page method. only 1 request can pass that at the same time. but what is suddenly null that you dont expect to be null? On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: That is pretty much it. Except that: Caused by: java.lang.NullPointerException at com.namechangedtoprotectguilty.search.Criterion.getHelper( Criterion.java:200) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1030) Blows up in our code in a way that really looks like a multithreading issue to me. If I click slowly no problems, if I click quickly on a slow page it reliably blows up. Guess I could put in a sync filter to double check that it is a sync error. We don't create any threads so apart from threading issue I can't see what else it could be... igor.vaynberg wrote: show us the full stack trace -igor On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: Which bit of code does the blocking on the server? I'm getting what looks very much like a threading issue. I've looked at all the methods below and can't see any obvious sync code... I'm using 1.3-beta3 at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1034) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:247) at org.apache.wicket.util.lang.PropertyResolver.getValue( PropertyResolver.java:89) at org.apache.wicket.model.AbstractPropertyModel.getObject( AbstractPropertyModel.java:110) at org.apache.wicket.Component.getModelObject(Component.java:1293) at org.apache.wicket.Component$2.compare(Component.java :540) at org.apache.wicket.Component.setModelObject(Component.java:2522) at org.apache.wicket.markup.html.form.FormComponent.updateModel( FormComponent.java:1002) at org.apache.wicket.markup.html.form.Form$14.validate(Form.java :1642) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent ( Form.java:160) at
Re: threading issues - continued
While the repaint is somewhat asynchronous, this shouldn't affect the actual form serialization. Can you provide a quickstart that can be used to reproduce this problem? -Matej On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: I'm using 1.3-beta3 I think as far as the wicket js is concerned it has finished (as it has done elmt.innerHTML='something') but the problem is that the browser does the re-rendering in a different thread to the java script engine. So when I click the second time the HTML is only partially finished... Maybe I'll have a look at how selenium waits for the browser to settle. Think this is a common problem for browser based robot testing. Matej Knopp-2 wrote: What exact wicket version are you using? With the current trunk the client side form serialization waits until the previous ajax request finished even if you submit the form during previous request processing. But I'm not really sure that this is your issue. -Matej On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Yes. Click A updates part of the form. Click B (very soon after A) also submits that form. So my suspicion is that the browser is still busy parsing the last update and click B sends a form in an intermediate state. Does that sound likely? I've seen it in the past that after innerHTML you have to wait a while to access the DOM. Johan Compagner wrote: do you click fast on a dom portion that is being replaced by the previous request? johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Bit more information is that the bean property that is causing the problem is being set to null by my html form via a wicket ajax update... Could it be that although wicket is doing everything correctly the DOM in (firefox 2) has not settled after the elmt.innerHTML= ... from the previous ajax response so the next click sends an update that I wouldn't expect? Any options in wicket to block the UI till the DOM has settled? Or shall I point my html monkey at it? Sam Hough wrote: Must be me then. I'll try and pin it down more. Hmmm. Johan Compagner wrote: the nullpointer comes from outside of wicket (criterion class) but you say if you click quickly you only get it? all pages are blocked by a barrier that is build around the pagemap. its in Session.get page method. only 1 request can pass that at the same time. but what is suddenly null that you dont expect to be null? On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: That is pretty much it. Except that: Caused by: java.lang.NullPointerException at com.namechangedtoprotectguilty.search.Criterion.getHelper( Criterion.java:200) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1030) Blows up in our code in a way that really looks like a multithreading issue to me. If I click slowly no problems, if I click quickly on a slow page it reliably blows up. Guess I could put in a sync filter to double check that it is a sync error. We don't create any threads so apart from threading issue I can't see what else it could be... igor.vaynberg wrote: show us the full stack trace -igor On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: Which bit of code does the blocking on the server? I'm getting what looks very much like a threading issue. I've looked at all the methods below and can't see any obvious sync code... I'm using 1.3-beta3 at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1034) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:247) at org.apache.wicket.util.lang.PropertyResolver.getValue( PropertyResolver.java:89) at org.apache.wicket.model.AbstractPropertyModel.getObject( AbstractPropertyModel.java:110) at org.apache.wicket.Component.getModelObject(Component.java:1293) at org.apache.wicket.Component$2.compare(Component.java :540) at org.apache.wicket.Component.setModelObject(Component.java:2522) at org.apache.wicket.markup.html.form.FormComponent.updateModel( FormComponent.java:1002) at org.apache.wicket.markup.html.form.Form$14.validate(Form.java :1642) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent( Form.java:160)
Re: threading issues - continued
I'm getting null pointers on the server side because the form _values_ seem not do have been set by the client yet so in the http request someParameter= which would otherwise not be the case. Doesn't seem like something I want to handle on the server... If somebody is hacking, has broken browser I'd rather the server threw an error. Johan Compagner wrote: but you get null pointers in the serverside. So what should that have to do with busy parsing on the client side That second submit is being done again (with the OLD dom) and that maybe doesn't map correctly any more? The problem is that the ajax request and waiting for the response and updating the dom should be done then completely synchronously Because it could be a problem yes when you click fast on things that will be replaced.. johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Yes. Click A updates part of the form. Click B (very soon after A) also submits that form. So my suspicion is that the browser is still busy parsing the last update and click B sends a form in an intermediate state. Does that sound likely? I've seen it in the past that after innerHTML you have to wait a while to access the DOM. Johan Compagner wrote: do you click fast on a dom portion that is being replaced by the previous request? johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Bit more information is that the bean property that is causing the problem is being set to null by my html form via a wicket ajax update... Could it be that although wicket is doing everything correctly the DOM in (firefox 2) has not settled after the elmt.innerHTML= ... from the previous ajax response so the next click sends an update that I wouldn't expect? Any options in wicket to block the UI till the DOM has settled? Or shall I point my html monkey at it? Sam Hough wrote: Must be me then. I'll try and pin it down more. Hmmm. Johan Compagner wrote: the nullpointer comes from outside of wicket (criterion class) but you say if you click quickly you only get it? all pages are blocked by a barrier that is build around the pagemap. its in Session.get page method. only 1 request can pass that at the same time. but what is suddenly null that you dont expect to be null? On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: That is pretty much it. Except that: Caused by: java.lang.NullPointerException at com.namechangedtoprotectguilty.search.Criterion.getHelper( Criterion.java:200) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1030) Blows up in our code in a way that really looks like a multithreading issue to me. If I click slowly no problems, if I click quickly on a slow page it reliably blows up. Guess I could put in a sync filter to double check that it is a sync error. We don't create any threads so apart from threading issue I can't see what else it could be... igor.vaynberg wrote: show us the full stack trace -igor On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: Which bit of code does the blocking on the server? I'm getting what looks very much like a threading issue. I've looked at all the methods below and can't see any obvious sync code... I'm using 1.3-beta3 at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1034) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:247) at org.apache.wicket.util.lang.PropertyResolver.getValue( PropertyResolver.java:89) at org.apache.wicket.model.AbstractPropertyModel.getObject( AbstractPropertyModel.java:110) at org.apache.wicket.Component.getModelObject(Component.java:1293) at org.apache.wicket.Component$2.compare(Component.java :540) at org.apache.wicket.Component.setModelObject(Component.java:2522) at org.apache.wicket.markup.html.form.FormComponent.updateModel( FormComponent.java:1002) at org.apache.wicket.markup.html.form.Form$14.validate(Form.java :1642) at org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent ( Form.java:160) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:403) at org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPostOrderHelper (FormComponent.java:390)
Re: wicket scalability
On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 9/19/07, Lowell Kirsh [EMAIL PROTECTED] wrote: For work I'm trying to use wicket, but my boss wants to be reassured that it will scale well. Can anyone point me to any sources (not anecdotes) about how well wicket scales? And yes, I know my question is vague, but right now, so are our requirements. The best way to go is to not take our word for it, but test for yourself. Take wicket-examples, create a test project at it (e.g. using JMeter) and see what you got. Please feel free to post your results. Matej, if you still have some of those JMeter results lying around, maybe that would be interesting. Some results of testing for memory consumption I just ran on the app I'm working on (Wicket 1.3): Run 1: 3,000 sessions - ~ 200 MB Run 2: 10,000 sessions - ~ 950 MB Run 3: 10,000 sessions - ~ 110 MB (very light page) Run 4: 10,000 sessions - ~ 650 MB It depends on what your current page is (when you use the SecondLevelCacheSessionStore which is Wicket 1.3's default) and of course what is in your session object. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context-sensitive roles
Robert ... wrote: I'm making a forum project to learn about Wicket, Hibernate Spring. It has been interesting, but now I am kinda stuck for a while on authentication/authorization. The difficulty I am having is that the roles a user can have is based on the forum he is on. Each forum is owned by a different user. So a user can be a forum administator on forum A, but be a registered user on forum B. All examples I see seem to determine the roles context-free. See this thread for a description of how I do context (or data) sensitive roles. http://www.nabble.com/Best-Practices-for-accessing-repainting-sibling-cousin-components--tf3841514.html#a10895313 -- View this message in context: http://www.nabble.com/Context-sensitive-roles-tf4479548.html#a12775716 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: onNewBrowserWindow is not called
Hi, thanks for your help. I will try that, but I have one last question (hopefully): How do I turn on the multiwindow support? Benjamin 2007/9/19, Matej Knopp [EMAIL PROTECTED]: You can use pagemap metadata for it, providing you have recent enough wicket version. And, of course, you have to turn on the multiwindow support. -Matej On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote: Hi I store some context-information in the session. When a new window is opened it has a new context, so I want to have a new Session for this context. But the old window should stay with the old context. You should try to bend this in a separate data structure within the session, probably keyed on page map id. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stripping Javascript comments breaks application
Just curious how I can get these changes. are there 1.3.0-SNAPSHOTS being published or do I need to wait for beta4/rc1 to be published? On 9/19/07, Matej Knopp [EMAIL PROTECTED] wrote: Hi, should be fixed in trunk. -Matej On 9/19/07, Ryan Sonnek [EMAIL PROTECTED] wrote: It's been a while since this topic was brought up, but I've been able to verify that wicket 1.3 *breaks* applications using the prototype javascript library. Anytime I enable strip javascript comments and whitespace, or configure my app in DEPLOYMENT mode, I get tons of javascript errors. I've filed an issue in JIRA and attached a sample project that exhibits the issue. https://issues.apache.org/jira/browse/WICKET-987 My recommendation would be to use an official javascript minification library, but whatever it takes to get this fixed ASAP would be awesome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Testing wicket 1.3
Hi Kent hmm, while this could be okay. I just fear the possibility that tests may succeed if other components contains foo. This test does not take hierarchy into account.. For the simple Bbcodecomponent, it will work as I will be testing it isolated. However if others that are using the component wants to test that the out come are correct, this could be a potential pitfall. regards Nino Kent Tong wrote: Nino.Martinez wrote: I was wondering how I should be testing with wicket. I've created the bbcodecomponent, I have a bbcodeLabel. And I would like to write a test for that. I can see that I can't use the assertLabel as that just gets modelObjectToString, in the bbcodeLabel some formatting are done during onComponentTagBody. Is this completely wrong, how should testing be done? I can see that the dateLabel uses an approach with converters, although im not sure how this are done. But are this more propper? try something like: WicketTester tester = new WicketTester(); tester.startPage(Home.class); tester.assertContains(foo); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Context-sensitive roles
Also custom actions will help. For example all and forum to indicate if a user has permissions on all forums or just on those forums he is a registered user / administrator etc. Combined with my previous mail you can optimize your security check a bit. We actually use both of these techniques in our own application to determine for what departments a user has certain rights. Maurice On 9/19/07, Maurice Marrink [EMAIL PROTECTED] wrote: Swarm will work just fine for what you want. You should create a new ISecurityCheck that will wrap another build in check (probably a ComponentSecurityCheck) and if the wrapped check says it is ok, then your check needs to validate if the user is actually administrator / owner whatever you want. You could do this in a single custom check but i like the code reuse you get from wrapping :). I haven't read the book, maybe i should ... :) Maurice On 9/19/07, ChuckDeal [EMAIL PROTECTED] wrote: Robert ... wrote: I'm making a forum project to learn about Wicket, Hibernate Spring. It has been interesting, but now I am kinda stuck for a while on authentication/authorization. The difficulty I am having is that the roles a user can have is based on the forum he is on. Each forum is owned by a different user. So a user can be a forum administator on forum A, but be a registered user on forum B. All examples I see seem to determine the roles context-free. See this thread for a description of how I do context (or data) sensitive roles. http://www.nabble.com/Best-Practices-for-accessing-repainting-sibling-cousin-components--tf3841514.html#a10895313 -- View this message in context: http://www.nabble.com/Context-sensitive-roles-tf4479548.html#a12775716 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Stripping Javascript comments breaks application
http://wicketstuff.org/maven/repository Also documented on the website: http://wicket.apache.org/getting-wicket.html Martijn On 9/19/07, Ryan Sonnek [EMAIL PROTECTED] wrote: Just curious how I can get these changes. are there 1.3.0-SNAPSHOTS being published or do I need to wait for beta4/rc1 to be published? On 9/19/07, Matej Knopp [EMAIL PROTECTED] wrote: Hi, should be fixed in trunk. -Matej On 9/19/07, Ryan Sonnek [EMAIL PROTECTED] wrote: It's been a while since this topic was brought up, but I've been able to verify that wicket 1.3 *breaks* applications using the prototype javascript library. Anytime I enable strip javascript comments and whitespace, or configure my app in DEPLOYMENT mode, I get tons of javascript errors. I've filed an issue in JIRA and attached a sample project that exhibits the issue. https://issues.apache.org/jira/browse/WICKET-987 My recommendation would be to use an official javascript minification library, but whatever it takes to get this fixed ASAP would be awesome. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Question about best approach using Spring
On 9/18/07, John Krasnay [EMAIL PROTECTED] wrote: public class MyPage extends WebPage { @SpringBean public SomeService someService; public MyPage() { someService.doSomething(); } } Using an annotation instead of calling createSpringBeanProxy directly allows me to manually inject test instances of my services/business delegates to do unit tests. Yea, I'd like to use the annotation but I believe that's only working when running under Java5? (sadly, this app has to run on an old websever that is using Java4.) (The annotation is in the wicket-contrib-spring-jdk5 so I just figured it required Java5 - but I'm not positive of that requirement - can someone confirm ? ) Also, where you mention allows me to manually inject test instances of my services/business delegates to do unit tests. - I get the same benefit with the proxy approach which is why I'm using Spring in the first place:) - it's just slightly more verbose, although if I use the 'createSpringBeanProxy' from my Base application class it's really only one line so it's not 'that' bad - unless there is something else that annotation approach gives me that I'm missing?
Re: Question about best approach using Spring
On Wed, Sep 19, 2007 at 09:05:48AM -0400, Rick Reumann wrote: Yea, I'd like to use the annotation but I believe that's only working when running under Java5? (sadly, this app has to run on an old websever that is using Java4.) (The annotation is in the wicket-contrib-spring-jdk5 so I just figured it required Java5 - but I'm not positive of that requirement - can someone confirm ? ) Yup, Java5 is required for annotations. Also, where you mention allows me to manually inject test instances of my services/business delegates to do unit tests. - I get the same benefit with the proxy approach which is why I'm using Spring in the first place:) - it's just slightly more verbose, although if I use the 'createSpringBeanProxy' from my Base application class it's really only one line so it's not 'that' bad - unless there is something else that annotation approach gives me that I'm missing? Sounds like you still need a Spring context for your unit tests, to give createSpringBeanProxy something to work with. Not a huge deal but still a minor complication. With the annotation approach, I can just ignore the annotation and inject a stub using the setter. But if you can't use Java5 it's kinda moot. jk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
TinyMCE : multiple textarea's with TinyMCEBehaviour
Hello, I have 2 textfields who each have the TinyMCEBehaviour, but the first one is simple and the other advanced (so they each have a different TinyMCESettings in constructor). This results in getting 4 tinyMCE editing boxes on my page, and the problem is because the same 'editor_selector' is used. 1/ Can this be changed in the WicketStuff, so that each one gets a different editor_selector? 2/ Afterwards i want to change the contents in one of the editors. I found that you could do that with the following statement : tinyMCE.execCommand('mceSetContent', false,'new text'); but how can you tell tinyMCE which one of the 2 editor you want to change the text for? Thanks for any help or hints ! -- View this message in context: http://www.nabble.com/TinyMCE-%3A-multiple-textarea%27s-with-TinyMCEBehaviour-tf4481015.html#a12777490 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: onNewBrowserWindow is not called
Application.getPageSettings().setAutomaticMultiWindowSupport(true); -Matej On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote: Hi, thanks for your help. I will try that, but I have one last question (hopefully): How do I turn on the multiwindow support? Benjamin 2007/9/19, Matej Knopp [EMAIL PROTECTED]: You can use pagemap metadata for it, providing you have recent enough wicket version. And, of course, you have to turn on the multiwindow support. -Matej On 9/19/07, Eelco Hillenius [EMAIL PROTECTED] wrote: On 9/19/07, Benjamin Ernst [EMAIL PROTECTED] wrote: Hi I store some context-information in the session. When a new window is opened it has a new context, so I want to have a new Session for this context. But the old window should stay with the old context. You should try to bend this in a separate data structure within the session, probably keyed on page map id. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
WebSession shutdown
Hi folks, In our WebSession subclass we manage some resources which need to be cleaned up when the session goes away (because of timeout, etc). Is there a recommended way to call a shutdown() method on our session class? I have seen WebApplication.sessionDestroyed(String), but I'm not sure how to get the wicket session from there (since we don't necessarily have an active request at that time). Of course, I could implement my own session store or something like that, but that approach seems to be a bit hackish. Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: threading issues - continued
So is the form sent using wicket JS from the DOM? Anyway, I'm afraid I need to get the OK from my project manager before spending more time on this :( Sucks that he is happy for you to work for free on our problem but that I'm not even allowed to help you in this effort :( Thanks for your time till then, so I can bother you again. Matej Knopp-2 wrote: While the repaint is somewhat asynchronous, this shouldn't affect the actual form serialization. Can you provide a quickstart that can be used to reproduce this problem? -Matej On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: I'm using 1.3-beta3 I think as far as the wicket js is concerned it has finished (as it has done elmt.innerHTML='something') but the problem is that the browser does the re-rendering in a different thread to the java script engine. So when I click the second time the HTML is only partially finished... Maybe I'll have a look at how selenium waits for the browser to settle. Think this is a common problem for browser based robot testing. Matej Knopp-2 wrote: What exact wicket version are you using? With the current trunk the client side form serialization waits until the previous ajax request finished even if you submit the form during previous request processing. But I'm not really sure that this is your issue. -Matej On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Yes. Click A updates part of the form. Click B (very soon after A) also submits that form. So my suspicion is that the browser is still busy parsing the last update and click B sends a form in an intermediate state. Does that sound likely? I've seen it in the past that after innerHTML you have to wait a while to access the DOM. Johan Compagner wrote: do you click fast on a dom portion that is being replaced by the previous request? johan On 9/19/07, Sam Hough [EMAIL PROTECTED] wrote: Bit more information is that the bean property that is causing the problem is being set to null by my html form via a wicket ajax update... Could it be that although wicket is doing everything correctly the DOM in (firefox 2) has not settled after the elmt.innerHTML= ... from the previous ajax response so the next click sends an update that I wouldn't expect? Any options in wicket to block the UI till the DOM has settled? Or shall I point my html monkey at it? Sam Hough wrote: Must be me then. I'll try and pin it down more. Hmmm. Johan Compagner wrote: the nullpointer comes from outside of wicket (criterion class) but you say if you click quickly you only get it? all pages are blocked by a barrier that is build around the pagemap. its in Session.get page method. only 1 request can pass that at the same time. but what is suddenly null that you dont expect to be null? On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: That is pretty much it. Except that: Caused by: java.lang.NullPointerException at com.namechangedtoprotectguilty.search.Criterion.getHelper( Criterion.java:200) at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1030) Blows up in our code in a way that really looks like a multithreading issue to me. If I click slowly no problems, if I click quickly on a slow page it reliably blows up. Guess I could put in a sync filter to double check that it is a sync error. We don't create any threads so apart from threading issue I can't see what else it could be... igor.vaynberg wrote: show us the full stack trace -igor On 9/18/07, Sam Hough [EMAIL PROTECTED] wrote: Which bit of code does the blocking on the server? I'm getting what looks very much like a threading issue. I've looked at all the methods below and can't see any obvious sync code... I'm using 1.3-beta3 at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.getValue( PropertyResolver.java:1034) at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter( PropertyResolver.java:247) at org.apache.wicket.util.lang.PropertyResolver.getValue( PropertyResolver.java:89) at org.apache.wicket.model.AbstractPropertyModel.getObject( AbstractPropertyModel.java:110) at org.apache.wicket.Component.getModelObject(Component.java:1293) at org.apache.wicket.Component$2.compare(Component.java :540) at
Re: Question about best approach using Spring
On 9/19/07, John Krasnay [EMAIL PROTECTED] wrote: Sounds like you still need a Spring context for your unit tests, to give createSpringBeanProxy something to work with. Not a huge deal but still a minor complication. With the annotation approach, I can just ignore the annotation and inject a stub using the setter. But if you can't use Java5 it's kinda moot. Thanks John, excellent point. Actually I think this really throws a wrench into my testing. I'm not sure what SpringWebApplication class has going on behind the scenes that I'm relying on for Spring injection. Those that have used this proxy approach before with SpringWebApplication, are there some examples how to run your unit tests with this in place? - Rick
Enums and DropDownChoices in Web Beans
Hi ! I want to make an Enum field in a bean to fire an event. With plain Wicket I can do something like: DropDownChoice ddc = new DropDownChoice(person, options) { public void onSelectionChanged(java.lang.Object newSelection) { info(Changed!); } protected boolean wantOnSelectionChangedNotifications() { return true; } } How can I do this in Web Beans, is there any beanprops that I can use ? Thanks ! Daniel -- View this message in context: http://www.nabble.com/Enums-and-DropDownChoices-in-Web-Beans-tf4481885.html#a12780572 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Passing Parameters to Bookmarkable Page
It seems like in: parameters.put(filter, filter); the filter object is the instance of com.foo.bar.Filter class, I guess if you implement toString() correctly within this object that might help, also instead of com.foo.bar.Filter object, try supplying a String as an alternate, Good luck. Flavius wrote: I have two pages, a list page and a detail. The list page can take a filter parameter, or has a default one if one is not passed (making it bookmarkable). When the user clicks to go to the detail page, I want to pass that filter along, so that when an edit is complete, the page can redirect back to the list page with the same filter intact. I also want the detail page to be bookmarkable. If the detail page gets the filter, it simply passes it back. If not, that's fine too. I can accomplish this easily by creating a PageParameters: PageParameters parameters = new PageParameters(); parameters.put(filter, filter); BookmarkablePageLink link = new BookmarkablePageLink(name, MyDetailPage.class, parameters); And this works fine. But I don't like the way the URL is created like this: http://localhost/pages/MyDetailPage/item/20/filter/com.foo.bar.Filter%401ae6456/ If the page is bookmarked, the Filter obj doesn't matter anyway. I understand why it's there, I'm just trying to figure out a prettier URL, like when I pass a parameter on the requestCycle, setting the response page and passing the parameters obj in there. I've thought of overriding the onClick event for BookmarkablePageLink, but it's final. Another option was to pass it on the request or the session. That would be the last option. Any insight would be appreciated. -- View this message in context: http://www.nabble.com/Passing-Parameters-to-Bookmarkable-Page-tf4478593.html#a12780685 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DatePicker NaN
ivana wrote: Hi I have a problem with the DatePicker. It works fine if the input is a valid date or if the input is very wrong, for example: ''xxx. But when the input consists of numbers and but is not a valid date, the calendar is rendered with NaN in every field. I ran into the exact same problem today. Is there any work-around for this? Is there anything I can do from the Java side to get a hook when parsing the input fails? Best Philip -- View this message in context: http://www.nabble.com/DatePicker-NaN-tf4475178.html#a12780712 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Dojo floating panel
yeah, we totally forgot that the dojo popup is actually closed via javascript on the client and passing references around only on the server doesn't help at all. with some javascript foo, the actual call to close the popup form inside the iframe would have to look something like that: window.parent.dojo.widget.byId(popup2).hide(); you could achieve this by still passing the reference to Page2 and doing this in the onEvent method: protected void onEvent(AjaxRequestTarget target) { target.prependJavascript(window.parent.dojo.widget.byId(\ + dojoPane.getMarkupId() + \);); } hope it works this time ;) Gerolf On 9/19/07, Federico Fanton [EMAIL PROTECTED] wrote: On Tue, 18 Sep 2007 16:19:59 +0200 Gerolf Seitz [EMAIL PROTECTED] wrote: you could pass a reference to the dojofloatingpane to Page2 I tried that, using it from a button inside Page2 like button.add(new AjaxEventBehavior(onclick){ protected void onEvent(AjaxRequestTarget target) { getCallingPopup().close(target); } }); but when I press the button I get an error in Wicket Ajax debug: INFO:?xml version=1.0 encoding=UTF-8?ajax-responseevaluate![CDATA[dojo.widget.byId('popup2').hide()]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... ERROR: Exception evaluating javascript: ReferenceError: dojo is not defined So I figured I was missing Dojo's resources and I added: button.add(new AbstractDefaultDojoBehavior(){ protected void respond(AjaxRequestTarget target) {} }); but now I get the error INFO:?xml version=1.0 encoding=UTF-8?ajax-responseevaluate![CDATA[ dojo.widget.byId ('popup2').hide()]]/evaluate/ajax-response INFO: Response parsed. Now invoking steps... ERROR: Exception evaluating javascript: TypeError: dojo.widget.byId(popup2) has no properties So, maybe it's impossible? :/ Or am I missing something? Thanks for your time again! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wicket shopping cart?
Martijn, Great to hear! I haven't bought the MEAP yet, but that's another great reason to! Perhaps it would make a good starting point. But still, if anyone has developed a more full featured solution and are interested in open sourcing it, I'd like to talk. Tauren On 9/19/07, Martijn Dashorst [EMAIL PROTECTED] wrote: It seems that Wicket in Action has a basic shopping cart described. :-) Martijn On 9/19/07, Tauren Mills [EMAIL PROTECTED] wrote: I'm looking for an open source shopping cart built in wicket, but haven't found such a thing yet. Does anyone know of something out there? I've noticed in several posts that people have been working on shopping solutions. Are any of you willing to open source your solution? Ultimately, I'd like to make an open source shopping cart available to the wicket community, but would rather not duplicate efforts if others would be interested in contributing any existing codebase. Thanks! Tauren - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Buy Wicket in Action: http://manning.com/dashorst Apache Wicket 1.3.0-beta3 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WebSession shutdown
In our WebSession subclass we manage some resources which need to be cleaned up when the session goes away (because of timeout, etc). Is there a recommended way to call a shutdown() method on our session class? I have seen WebApplication.sessionDestroyed(String), but I'm not sure how to get the wicket session from there (since we don't necessarily have an active request at that time). Of course, I could implement my own session store or something like that, but that approach seems to be a bit hackish. As long as you are putting the Wicket Session object in your HttpSession (like the default session stores do) I think you should be able to just let your session class inplement HttpSessionBindingListener and react on valueUnbound. Can you try that and let the list know whether that worked for you? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Images Example Question!
Referring to Imge examples if I drop a few images into folder: src\main\webapp\images e.g. src\main\webapp\images\cat.gif src\main\webapp\images\dog.gif src\main\webapp\images\snake.gif Then how do I show these imges into the: src\main\java\org\apache\wicket\examples\images\HomePge.java src\main\java\org\apache\wicket\examples\images\HomePage.html Image example serves the image from the same package, which is: src\main\java\org\apache\wicket\examples\images\Image2.gif and i like to know how to serve the external image into the webpage if you know the url e.g. ( images\cat.gif, images\dog.gif etc). Thanks. -- View this message in context: http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12789363 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
Referring to Imge examples if I drop a few images into folder: src\main\webapp\images e.g. src\main\webapp\images\cat.gif src\main\webapp\images\dog.gif src\main\webapp\images\snake.gif Then how do I show these imges into the: src\main\java\org\apache\wicket\examples\images\HomePge.java src\main\java\org\apache\wicket\examples\images\HomePage.html Just like you would normally do: img src=images/cat.gif / etc. Like image1 in that example. Image example serves the image from the same package, which is: src\main\java\org\apache\wicket\examples\images\Image2.gif Not all, again see Image1. and i like to know how to serve the external image into the webpage if you know the url e.g. ( images\cat.gif, images\dog.gif etc). Relative paths will be prepended by Wicket with the context path (and that's what you want), and absolute URLs are left just like that. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
Thanks Eelco for the prompt response, here is what I have. Image url woring fine in the browser: https://lilo:8443/whisky/images/mlogo/Merchant.gif Then in my class this is what i have: item.add( new Image(merchantLogo, https://lilo:8443/whisky/images/mlogo/Merchant.gif;) ); And my html looks like: td width=20%i-m-g wicket:id=merchantLogo//td Note: i-m-g actually is img, i added dashes so that the browser does not interpret it when u see the email. And this is the error I am getting: WARN - PackageResource- Unable to find package resource [path = com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif, style = null, locale = en_US] I am trying to figure out what is wrong here, please take a look and let me know what is missing, I tried relative paths as well, but same problem. It looks like Wicket expects the Image to be in the same package where the class is located. Thanks, Eelco Hillenius wrote: Referring to Imge examples if I drop a few images into folder: src\main\webapp\images e.g. src\main\webapp\images\cat.gif src\main\webapp\images\dog.gif src\main\webapp\images\snake.gif Then how do I show these imges into the: src\main\java\org\apache\wicket\examples\images\HomePge.java src\main\java\org\apache\wicket\examples\images\HomePage.html Just like you would normally do: images/cat.gif etc. Like image1 in that example. Image example serves the image from the same package, which is: src\main\java\org\apache\wicket\examples\images\Image2.gif Not all, again see Image1. and i like to know how to serve the external image into the webpage if you know the url e.g. ( images\cat.gif, images\dog.gif etc). Relative paths will be prepended by Wicket with the context path (and that's what you want), and absolute URLs are left just like that. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790116 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
Thanks Eelco, This is working now with ContextImage, as you suggested, Now how do I use this image to create one external link, I tried: td width=20% /td but it fails miserably after complaining about hierarchy, i can't really find any method like: ExternalLink(java.lang.String id, java.lang.String href, java.lang.ContextImage image), any idea how can i achieve this, Thanks!! Eelco Hillenius wrote: Image url woring fine in the browser: https://lilo:8443/whisky/images/mlogo/Merchant.gif Then in my class this is what i have: item.add( new Image(merchantLogo, https://lilo:8443/whisky/images/mlogo/Merchant.gif;) ); And my html looks like: td width=20%i-m-g wicket:id=merchantLogo//td Note: i-m-g actually is img, i added dashes so that the browser does not interpret it when u see the email. And this is the error I am getting: WARN - PackageResource- Unable to find package resource [path = com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif, style = null, locale = en_US] I am trying to figure out what is wrong here, please take a look and let me know what is missing, I tried relative paths as well, but same problem. It looks like Wicket expects the Image to be in the same package where the class is located. Yes, the image component is meant for dynamic images and packaged images. You typically don't need a Wicket component to display images from the web app dir or outside the app. But if you do (e.g. because you determine this image dynamically) you can use ContextImage. Take a look at the source too, a component like that is very easy to do yourself. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790440 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
Sorry, Posting again with image tag, and anchor hack--- Thanks Eelco, This is working now with ContextImage, as you suggested, Now how do I use this image to create one external link, I tried: td width=20%-a- wicket:id=merchantLink i-m-g wicket:id=merchantLogo/ /td but it fails miserably after complaining about hierarchy, i can't really find any method like: ExternalLink(java.lang.String id, java.lang.String href, java.lang.ContextImage image), any idea how can i achieve this, Thanks!! Eelco Hillenius wrote: Image url woring fine in the browser: https://lilo:8443/whisky/images/mlogo/Merchant.gif Then in my class this is what i have: item.add( new Image(merchantLogo, https://lilo:8443/whisky/images/mlogo/Merchant.gif;) ); And my html looks like: td width=20%i-m-g wicket:id=merchantLogo//td Note: i-m-g actually is img, i added dashes so that the browser does not interpret it when u see the email. And this is the error I am getting: WARN - PackageResource- Unable to find package resource [path = com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif, style = null, locale = en_US] I am trying to figure out what is wrong here, please take a look and let me know what is missing, I tried relative paths as well, but same problem. It looks like Wicket expects the Image to be in the same package where the class is located. Yes, the image component is meant for dynamic images and packaged images. You typically don't need a Wicket component to display images from the web app dir or outside the app. But if you do (e.g. because you determine this image dynamically) you can use ContextImage. Take a look at the source too, a component like that is very easy to do yourself. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790443 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
You need to close your a tag. On 9/19/07, chickabee [EMAIL PROTECTED] wrote: Sorry, Posting again with image tag, and anchor hack--- Thanks Eelco, This is working now with ContextImage, as you suggested, Now how do I use this image to create one external link, I tried: td width=20%-a- wicket:id=merchantLink i-m-g wicket:id=merchantLogo/ /td but it fails miserably after complaining about hierarchy, i can't really find any method like: ExternalLink(java.lang.String id, java.lang.String href, java.lang.ContextImage image), any idea how can i achieve this, Thanks!! Eelco Hillenius wrote: Image url woring fine in the browser: https://lilo:8443/whisky/images/mlogo/Merchant.gif Then in my class this is what i have: item.add( new Image(merchantLogo, https://lilo:8443/whisky/images/mlogo/Merchant.gif;) ); And my html looks like: td width=20%i-m-g wicket:id=merchantLogo//td Note: i-m-g actually is img, i added dashes so that the browser does not interpret it when u see the email. And this is the error I am getting: WARN - PackageResource- Unable to find package resource [path = com/ezfizz/whisky/https:/lilo:8443/whisky/images/mlogo/Merchant.gif, style = null, locale = en_US] I am trying to figure out what is wrong here, please take a look and let me know what is missing, I tried relative paths as well, but same problem. It looks like Wicket expects the Image to be in the same package where the class is located. Yes, the image component is meant for dynamic images and packaged images. You typically don't need a Wicket component to display images from the web app dir or outside the app. But if you do (e.g. because you determine this image dynamically) you can use ContextImage. Take a look at the source too, a component like that is very easy to do yourself. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Images-Example-Question%21-tf4484804.html#a12790443 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
On 9/19/07, chickabee [EMAIL PROTECTED] wrote: Oh, Sorry, this is alreay closed I just forgot to hack it so you can see it correctly in your browser, here it is the way I have it: td width=20%-a- wicket:id=merchantLink i-m-g wicket:id=merchantLogo/ /-a-/td Note : -a- = a and i-m-g = img Bit it fails at run time. So did you add the image component to the link component? Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Images Example Question!
On 9/19/07, chickabee [EMAIL PROTECTED] wrote: Nope! I don't know how to add image component to external link component? Igor suggested something but that went over my head. Like I said: ExternalLink link = new ExternalLink(link, http://foo.bar;); link.add(new ContextImage(img, images/foo.gif)); a wicket:id=linkimg wicket:id=img //a Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]