WICKET-6249
Hello, we recently had trouble with LoadableDetachableModel remaining in 'attaching' state after a RuntimeException during #load. I noticed the problem is already tracked in WICKET-6249. While there seems to be a fix for wicket 7.x, the issue itself is still marked as open/unresolved. That's why I wanted to ask if it will be fixed in Wicket 7.5.0 and if there are plans to build 7.5.0 anytime soon. Thanks Jonas
Re: Refreshingview vs ListView
Have you checked that equals/hashCode of your items are implemented properly? In our application, broken equals/hashCode was the most frequent reason for item reuse not working properly. Cheers, Jonas On Wed, Jul 27, 2016 at 6:02 PM, Entropy <blmulholl...@gmail.com> wrote: > I replaced the RefreshingView with a PropertyListView again, and it fixed > the > validation message issue. All other changes were still there. > Unfortunately, it also breaks my new feature as the ListView won't update > on > Save. > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Refreshingview-vs-ListView-tp4675224p4675226.html > Sent from the Users forum mailing list archive at Nabble.com. > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > >
Re: Improve ResourceStreamResource api
Hi, here's the JIRA ticket: https://issues.apache.org/jira/browse/WICKET-6113 Thanks! Jonas On Tue, Mar 1, 2016 at 12:02 PM, Martin Grigorov <mgrigo...@apache.org> wrote: > Hi, > > I think this would be a good improvement for Wicket 8.x. > Please file a ticket in JIRA! > Thank you! > > Martin Grigorov > Wicket Training and Consulting > https://twitter.com/mtgrigorov > > On Tue, Mar 1, 2016 at 10:44 AM, Jonas <barney...@gmail.com> wrote: > > > Hi all, > > > > I'd like to propose an improvement of > > org.apache.wicket.request.resource.ResourceStreamResource: it is > currently > > quite hard to determine the IResourceStream inside the #getResourceStream > > method, as the relevant context (i.e. the Attributes object) isn't > > available. Of course it is possible to override #newResourceResponse to > get > > access to Attributes, but the resulting code feels quite clumsy. I > propose > > to pass the Attributes from #newResourceResponse into > > #internalGetResourceStream and finally into #getResourceStream. > > This of course breaks the current API, so I guess this would be something > > for Wicket 8. > > > > To put this in context, what we're doing is basically described in > > http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , > except > > we don't extend DynamicImageResource, where you would have to handle mime > > type etc. in your subclass. By extending ResourceStreamResource, mime > type > > etc. is handled by automatically. > > > > What do you think? > > > > Cheers, > > > > Jonas > > >
Improve ResourceStreamResource api
Hi all, I'd like to propose an improvement of org.apache.wicket.request.resource.ResourceStreamResource: it is currently quite hard to determine the IResourceStream inside the #getResourceStream method, as the relevant context (i.e. the Attributes object) isn't available. Of course it is possible to override #newResourceResponse to get access to Attributes, but the resulting code feels quite clumsy. I propose to pass the Attributes from #newResourceResponse into #internalGetResourceStream and finally into #getResourceStream. This of course breaks the current API, so I guess this would be something for Wicket 8. To put this in context, what we're doing is basically described in http://wicketinaction.com/2011/07/wicket-1-5-mounting-resources/ , except we don't extend DynamicImageResource, where you would have to handle mime type etc. in your subclass. By extending ResourceStreamResource, mime type etc. is handled by automatically. What do you think? Cheers, Jonas
Re: Deserialization InvalidClassException : no valid constructor
Well, you can't serialize the BufferedImage, but maybe you can serialize whatever data you've used to render BufferedImage's contents, i.e. instead of saving the image, save whatever is necessary to recreate the image? Or, you could store the BufferedImage's content to an actual image file (using ImageIO)? On Wed, May 22, 2013 at 5:39 AM, smallufo small...@gmail.com wrote: Thanks. But in my example , I cannot modify BufferedImage (to add a no-arg constructor) What should I do if I want to output a BufferedImage (and make back button work) ? 2013/5/14 Jonas barney...@gmail.com This could only work if BufferedImage itself had a no-arg constructor. It is it the first non-serializable class in the hierarchy that needs to have it, not the first serializable one, like in your example. Besides, you would still lose all data stored in the BufferedImage's fields (i.e. the image stored in it). On Mon, May 13, 2013 at 7:15 PM, smallufo small...@gmail.com wrote: Today I encountered one famous deserialization problem : InvalidClassException : no valid constructor I googled and found some solution , but all are in-vain. The solution says the first non-serializable super class should define a no-arg constructor. But I try to define a no-arg constructor to EACH class of the HIERARCHY , and EACH class implements Serializable... (which is not necessary , but I want to make it simple , to pinpoint the problem) My base class is an abstract class extends BufferedImage (java 2D) while BufferedImage is not Serializable So I make my abstract class implements Serializable and define a no-arg default constructor. The total hierarchy is : public abstract class AbstractChart extends BufferedImage implements Serializable { public AbstractChart() {// I try to remove this constructor , but in vain super(0 , 0, TYPE_INT_ARGB); } } and first child class : public class ChildChart extends AbstractChart implements Serializable { public ChildChart() { super(); // or not calling super() } } and the grandson class : public class GrandsonChart extends ChildChart implements Serializable { public GrandsonChart() { super(); // or not calling super() } } No matter I calls super() in ChildChart or GrandsonChart , Caused by: java.io.InvalidClassException: foobar.GrandsonChart; no valid constructor It happens when I click a button ,use ajax to paint this GrandsonChart , and click another page , and use browser back . The browser will be redirected to /context/wicket/page?xxx (The error page) The screen shows : Could not deserialize object using: class org.apache.wicket.serialize.java.JavaSerializer$ClassResolverObjectInputStream and in the console log , I can see this InvalidClassException is thrown. Any way to solve this problem ? (I've already added default no-arg constructor , and make each class implements Serializable , but still not working ) environment : Wicket version : 6.7 Resin 4.0.25 Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402, 64, mixed mode, Apple Inc (It happens on Linux JDK too)
Re: Deserialization InvalidClassException : no valid constructor
This could only work if BufferedImage itself had a no-arg constructor. It is it the first non-serializable class in the hierarchy that needs to have it, not the first serializable one, like in your example. Besides, you would still lose all data stored in the BufferedImage's fields (i.e. the image stored in it). On Mon, May 13, 2013 at 7:15 PM, smallufo small...@gmail.com wrote: Today I encountered one famous deserialization problem : InvalidClassException : no valid constructor I googled and found some solution , but all are in-vain. The solution says the first non-serializable super class should define a no-arg constructor. But I try to define a no-arg constructor to EACH class of the HIERARCHY , and EACH class implements Serializable... (which is not necessary , but I want to make it simple , to pinpoint the problem) My base class is an abstract class extends BufferedImage (java 2D) while BufferedImage is not Serializable So I make my abstract class implements Serializable and define a no-arg default constructor. The total hierarchy is : public abstract class AbstractChart extends BufferedImage implements Serializable { public AbstractChart() {// I try to remove this constructor , but in vain super(0 , 0, TYPE_INT_ARGB); } } and first child class : public class ChildChart extends AbstractChart implements Serializable { public ChildChart() { super(); // or not calling super() } } and the grandson class : public class GrandsonChart extends ChildChart implements Serializable { public GrandsonChart() { super(); // or not calling super() } } No matter I calls super() in ChildChart or GrandsonChart , Caused by: java.io.InvalidClassException: foobar.GrandsonChart; no valid constructor It happens when I click a button ,use ajax to paint this GrandsonChart , and click another page , and use browser back . The browser will be redirected to /context/wicket/page?xxx (The error page) The screen shows : Could not deserialize object using: class org.apache.wicket.serialize.java.JavaSerializer$ClassResolverObjectInputStream and in the console log , I can see this InvalidClassException is thrown. Any way to solve this problem ? (I've already added default no-arg constructor , and make each class implements Serializable , but still not working ) environment : Wicket version : 6.7 Resin 4.0.25 Java HotSpot(TM) 64-Bit Server VM 20.4-b02-402, 64, mixed mode, Apple Inc (It happens on Linux JDK too)
Incorrect javadoc for IPageRequestHandler.isPageInstanceCreated()?
Hello, quick question about the javadoc of org.apache.wicket.core.request.handler.IPageRequestHandler.isPageInstanceCreated() it states '@return true iff page instance is not yet created', but looking at the implementations (e.g. in RenderPageRequestHandler), the opposite seems to be correct, i.e. '@return false iff page instance is not yet created'. Am I missing something, or is the javadoc actually incorrect? cheers, Jonas ps: wicket version is 6.6.0
Updates on model of FormComponents not being displayed after Ajax call
Hello everyone, in an AjaxFormComponentUpdatingBehavior callback I make some changes to the object which is the target of the CompundPropertyModel of a form. After the changes are made, I add the FormComponents (RequiredTextFields) that are mapped to the changed properties of the model object to the AjaxRequestTarget. If I log the property values to the console, I can see that have the expected (changed) values. Unfortunately, the FormComponents do not show the updates after the Ajax call returns. Interestingly, the form validation uses the expected/changed values after the click on a submit button, even though the FormComponents still show the wrong (unchanged) values. Is there something besides the adding of the respective components to the AjaxRequestTarget that I am missing here? Any help highly appreciated, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
AW: Updates on model of FormComponents not being displayed after Ajax call
Hi Pedro, just tried that. Unfortunately it did not work. I checked the source: public final void modelChanged() { // Call user code internalOnModelChanged(); onModelChanged(); } Both internalOnModelChanged and onModelChanged are empty in their default implementation by Component (which is not overwritten by RequiredTextField or any of its superclasses). Jonas -Ursprüngliche Nachricht- Von: Pedro Santos [mailto:pedros...@gmail.com] Gesendet: Mittwoch, 31. August 2011 16:12 An: users@wicket.apache.org Betreff: Re: Updates on model of FormComponents not being displayed after Ajax call Hi Jonas, you need to notify those form components about their model value change. e.g. formComponent.modelChanged(); target.add(formComponent); 2011/8/31 Jonas Pohlandt jonas.pohla...@lbi.com Hello everyone, in an AjaxFormComponentUpdatingBehavior callback I make some changes to the object which is the target of the CompundPropertyModel of a form. After the changes are made, I add the FormComponents (RequiredTextFields) that are mapped to the changed properties of the model object to the AjaxRequestTarget. If I log the property values to the console, I can see that have the expected (changed) values. Unfortunately, the FormComponents do not show the updates after the Ajax call returns. Interestingly, the form validation uses the expected/changed values after the click on a submit button, even though the FormComponents still show the wrong (unchanged) values. Is there something besides the adding of the respective components to the AjaxRequestTarget that I am missing here? Any help highly appreciated, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Pedro Henrique Oliveira dos Santos - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application#get in WicketSessionFilter
Thanks, Erik, that code would do the trick, too. I've implemented a different workaround, though. In the next release of wicket (1.4.8), WicketSessionFilter will 'expose' both the session and the application, Igor already resolved my JIRA Issue [1]. BTW: Thanks to Igor for picking that up so quickly! cheers, Jonas [1] https://issues.apache.org/jira/browse/WICKET-2778 On Tue, Mar 16, 2010 at 9:05 PM, Erik van Oosten e.vanoos...@grons.nl wrote: Hi Jonas, Perhaps this is what you need: http://cwiki.apache.org/WICKET/springbean-outside-wicket.html Regards, Erik. Jonas wrote: Hi all, we're using WicketSessionFilter in our product to access our custom WebSession, which works fine. Now we've tried to also access the org.apache.wicket.Application (e.g. using Session#getApplication or Application#get), which doesn't seem to work, because the application isn't bound to the ThreadLocal. After searching in nabble I found some old threads ([1], [2]) suggesting this should actually work fine, but that doesn't seem to be the case. Is there any special configuration trick I have to apply to make this work, or are those old posts just (no longer) true? If anybody could confirm this is actually a bug, I'd create an issue in JIRA to have this fixed. Regards, Jonas [1] http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469 -- Sent from my SMTP compliant software Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Application#get in WicketSessionFilter
I just reviewed the code Igor for the fix Igor implemented [1], and I don't think it will be a drop-in replacement for the code in the wiki, since it only exposes the application if there's an active HttpSession. The code from the wiki on the other hand always exposes the Application. In the patch I proposed, I also always exposed the Application. Unfortunately, my patch didn't properly handle exceptions (I should have put it all into a try finally block), I guess that's why Igor didn't use it, but chose to do a different implementation. I'm not sure why the Application isn't always exposed - I don't think it should have any side effects, since the Application is already shared between multiple threads, but I'm not aware of all wicket internals. Maybe Igor can shed some light on this issue? cheers, Jonas [1] http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java?revision=922335view=markup On Wed, Mar 17, 2010 at 1:37 PM, Erik van Oosten e.vanoos...@grons.nl wrote: That sounds great. Could you update the wiki page with the specifics for Wicket 1.4.8? Regards, Erik. Op 17-03-10 08:20, Jonas schreef: Thanks, Erik, that code would do the trick, too. I've implemented a different workaround, though. In the next release of wicket (1.4.8), WicketSessionFilter will 'expose' both the session and the application, Igor already resolved my JIRA Issue [1]. BTW: Thanks to Igor for picking that up so quickly! cheers, Jonas [1] https://issues.apache.org/jira/browse/WICKET-2778 On Tue, Mar 16, 2010 at 9:05 PM, Erik van Oostene.vanoos...@grons.nl wrote: Hi Jonas, Perhaps this is what you need: http://cwiki.apache.org/WICKET/springbean-outside-wicket.html Regards, Erik. Jonas wrote: Hi all, we're using WicketSessionFilter in our product to access our custom WebSession, which works fine. Now we've tried to also access the org.apache.wicket.Application (e.g. using Session#getApplication or Application#get), which doesn't seem to work, because the application isn't bound to the ThreadLocal. After searching in nabble I found some old threads ([1], [2]) suggesting this should actually work fine, but that doesn't seem to be the case. Is there any special configuration trick I have to apply to make this work, or are those old posts just (no longer) true? If anybody could confirm this is actually a bug, I'd create an issue in JIRA to have this fixed. Regards, Jonas [1] http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469 -- Erik van Oosten http://www.day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Does AjaxSelfUpdatingBehavior simulate user actions and prevent session from expiration?
It's the servlet container that manages the HttpSessions. The servlet container cannot distinguish between 'real' user requests and ajax events - they're all plain http requests concerning a certain session. So, I don't think there's anything wicket could do about this... cheers, Jonas On Tue, Mar 16, 2010 at 2:46 PM, Martin Asenov mase...@velti.com wrote: And why is that? Shouldn't Wicket session filter such events and not consider them user interaction with the system? Thank you both for the replies, and for the link also! Great help! Regards, Martin -Original Message- From: nino martinez wael [mailto:nino.martinez.w...@gmail.com] Sent: Tuesday, March 16, 2010 3:39 PM To: users@wicket.apache.org Subject: Re: Does AjaxSelfUpdatingBehavior simulate user actions and prevent session from expiration? yes. Ajax contacts the server. And on each request the timer are reset. So your ajax behavior are also functioning as a heartbeat or keepalive feature. 2010/3/16 Martin Asenov mase...@velti.com Hello, everyone! In my webapp it looks like the session never expires, although I've set timeout of 30 seconds. But I have a digital clock in my right lower corner of the screen, that has an AjaxSelfUpdatingBehavior activated on it. Does it simulate user actions, that may cause session not to expiry? Thank you, Martin - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ClassLoader (Serialization?) error
I guess you use that panel somewhere on a page near a shared resource, maybe for an Image, have you tried debugging the rendering of that page? A side note, probably totally unrelated to your problem: having 'head' tags inside a wicket:panel will probably result in invalid html, you should consider using wicket:head instead (see: http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html) cheers, Jonas On Mon, Mar 15, 2010 at 10:11 AM, Xavier López xavil...@gmail.com wrote: I agree it's not a classloader issue, the classloader is being given a cobbled class name, so it's not its fault it cannot load it. Is it possible that due to some serialization error the class name gets messed with the html markup, so that the class name read in deserialization ends messed up ? I don't see where can this be messing with comments, here is the markup file (the only one with fi usuari in it) html xmlns:wicket wicket:panel head script src=/accesnet/js/modal-message.js type=text/javascript/script /head !-- usuari -- div id=usuari div class=caixaUser div class=userdades span class=waiwicket:message key=userpanel.nomusuari.wai//spanstrongspan wicket:id=nomUsuari/span/strongbr / span class=noPopupa href=# wicket:id=linkEditUsuari wicket:message=title:userpanel.editusuari.titlewicket:message key=userpanel.editusuari.text//a/span span class=noPopupa href=# wicket:id=linkHomeAdmin wicket:message=title:userpanel.homeadmin.titlewicket:message key=userpanel.homeadmin.text//a/span /div div class=sessio spana href=# class=botoE cancela wicket:message=title:userpanel.fisessio.title wicket:id=linkFiSessiowicket:message key=userpanel.desconnecta/span class=waiwicket:message key=userpanel.fisessio.text.wai//span/a/span /div /div /div !-- fi usuari -- /wicket:panel /html Thanks for all your responses ! Xavier 2010/3/14 Jonas barney...@gmail.com As stated in my previous mail, I really doubt this is a classloader issue, since the class name is 'mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C' which decodes to 'mypackage.MyClass- fi usuari -- ' which obviously isn't just a class name, but a class name plus some 'garbage', which will make any classloader choke. 2010/3/13 François Meillet fm...@meillet.com: sounds like a classloading effect. Have a look to the classloader hierarchy Here is a good doc: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html Especially this one : Resource Loading Order http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1097288 François Le 12 mars 2010 à 17:30, Igor Vaynberg a écrit : ive seen this once before on the list. also with weblogic i think. search the list. -igor On Fri, Mar 12, 2010 at 3:16 AM, Xavier López xavil...@gmail.com wrote: Hi, From time to time I see the following error in my deployed application's log. The application is running clustered on Weblogic 9.2 MP3. It seems to be messing up with the classloading of class mypackage.MyClass (this error comes up in many different classes). I can guess from the stack trace that something is going wrong maybe serializing that page, it can be seen that the class name is being messed with some content of the page (div tags, text displayed in the page,...). Has anyone been in this situation before ? Any tip on how to address the issue ? 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.apache.wicket.request.target.resource.SharedResourceRequestTarget 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133! 1268343057...@192.168.131.142 - unable to lazily register shared resource mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= java.lang.ClassNotFoundException: mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161) at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35) at org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103) at org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond
Re: ClassLoader (Serialization?) error
As stated in my previous mail, I really doubt this is a classloader issue, since the class name is 'mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C' which decodes to 'mypackage.MyClass- fi usuari -- ' which obviously isn't just a class name, but a class name plus some 'garbage', which will make any classloader choke. 2010/3/13 François Meillet fm...@meillet.com: sounds like a classloading effect. Have a look to the classloader hierarchy Here is a good doc: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html Especially this one : Resource Loading Order http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1097288 François Le 12 mars 2010 à 17:30, Igor Vaynberg a écrit : ive seen this once before on the list. also with weblogic i think. search the list. -igor On Fri, Mar 12, 2010 at 3:16 AM, Xavier López xavil...@gmail.com wrote: Hi, From time to time I see the following error in my deployed application's log. The application is running clustered on Weblogic 9.2 MP3. It seems to be messing up with the classloading of class mypackage.MyClass (this error comes up in many different classes). I can guess from the stack trace that something is going wrong maybe serializing that page, it can be seen that the class name is being messed with some content of the page (div tags, text displayed in the page,...). Has anyone been in this situation before ? Any tip on how to address the issue ? 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.apache.wicket.request.target.resource.SharedResourceRequestTarget 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133! 1268343057...@192.168.131.142 - unable to lazily register shared resource mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= java.lang.ClassNotFoundException: mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161) at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35) at org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103) at org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at mypacakge.MyFilter.doFilter(ANetFilter.java:37) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) 2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.apache.wicket.request.target.resource.SharedResourceRequestTarget 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133! 1268343057...@192.168.131.142 - shared resource mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not found Thanks, Xavier - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail:
Re: Application#get in WicketSessionFilter
I create a JIRA issue for this: https://issues.apache.org/jira/browse/WICKET-2778 cheers, Jonas On Thu, Mar 11, 2010 at 1:10 PM, Jonas barney...@gmail.com wrote: Hi all, we're using WicketSessionFilter in our product to access our custom WebSession, which works fine. Now we've tried to also access the org.apache.wicket.Application (e.g. using Session#getApplication or Application#get), which doesn't seem to work, because the application isn't bound to the ThreadLocal. After searching in nabble I found some old threads ([1], [2]) suggesting this should actually work fine, but that doesn't seem to be the case. Is there any special configuration trick I have to apply to make this work, or are those old posts just (no longer) true? If anybody could confirm this is actually a bug, I'd create an issue in JIRA to have this fixed. Regards, Jonas [1] http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is hashcode() called on page deserialization?
I guess you have a HashMap field in your component, which has an entry with an SMSEvent object as key. You probably shouldn't hold on to references to spring loaded objects. Instead, you should just have an accessor object, which knows how to reload that spring loaded object, e.g. LoadableDetachableModel. cheers, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is hashcode() called on page deserialization?
Yes, exactly. But the stacktrace you posted is about a HashMap that is directly referenced from one of your components - you should also use e.g. LoadableDetachableModel there, I guess. On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote: Hi, Jonas! I only have some ListView-s with ListSMSEvent passed as an argument. You mean to replace the List with LoadableDetachableModel, that returns the List? Regards, -Original Message- From: Jonas [mailto:barney...@gmail.com] Sent: Friday, March 12, 2010 3:18 PM To: users@wicket.apache.org Subject: Re: why is hashcode() called on page deserialization? I guess you have a HashMap field in your component, which has an entry with an SMSEvent object as key. You probably shouldn't hold on to references to spring loaded objects. Instead, you should just have an accessor object, which knows how to reload that spring loaded object, e.g. LoadableDetachableModel. cheers, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is hashcode() called on page deserialization?
Well, the stacktrace you posted is about a HashMap, so it must be around somewhere...? I guess you didn't post the full stacktrace, so it may be deeply hidden in something you reference from a wicket Component. Maybe you'll find it by examining the full stacktrace, or using a debugger. cheers, Jonas On Fri, Mar 12, 2010 at 2:39 PM, Martin Asenov mase...@velti.com wrote: I don't have any HashMap-s that use SMSEvent object as a key. Only List-s Regards, Martin -Original Message- From: Jonas [mailto:barney...@gmail.com] Sent: Friday, March 12, 2010 3:29 PM To: users@wicket.apache.org Subject: Re: why is hashcode() called on page deserialization? Yes, exactly. But the stacktrace you posted is about a HashMap that is directly referenced from one of your components - you should also use e.g. LoadableDetachableModel there, I guess. On Fri, Mar 12, 2010 at 2:25 PM, Martin Asenov mase...@velti.com wrote: Hi, Jonas! I only have some ListView-s with ListSMSEvent passed as an argument. You mean to replace the List with LoadableDetachableModel, that returns the List? Regards, -Original Message- From: Jonas [mailto:barney...@gmail.com] Sent: Friday, March 12, 2010 3:18 PM To: users@wicket.apache.org Subject: Re: why is hashcode() called on page deserialization? I guess you have a HashMap field in your component, which has an entry with an SMSEvent object as key. You probably shouldn't hold on to references to spring loaded objects. Instead, you should just have an accessor object, which knows how to reload that spring loaded object, e.g. LoadableDetachableModel. cheers, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: why is hashcode() called on page deserialization?
That's odd - are you sure you restarted/redeployed/etc. your webapp properly? Maybe you should also try clearing the directory where the DiskPageStore stores the serialized pages - just to make sure you won't get an old page again. From the stacktrace I can see you have a wicket component that holds on to an ArrayList (I guess that's your ListView). The ArrayList's elements hold in turn the HashMap in question. If that's correct, your problem should go away if the Component no longer directly holds on to the ArrayList (e.g. by using LoadableDetachableModel) If this still doesn't help, I suggest you try setting an Exception Breakpoint on NullPointerException in your debugger and examine the objects being serialized. You can see the Objects e.g. in as the first parameter of ObjectInputStream.readSerialData cheers, Jonas On Fri, Mar 12, 2010 at 3:36 PM, Martin Asenov mase...@velti.com wrote: Well, Jonas, here's the stacktrace: P.S. LoadableDetachableModel didn't help Regards and thanks, Martin java.lang.NullPointerException at com.company.project.event.SMSEvent.hashCode(SMSEvent.java:334) at java.util.HashMap.putForCreate(HashMap.java:413) at java.util.HashMap.readObject(HashMap.java:1031) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.HashMap.readObject(HashMap.java:1029) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at java.util.ArrayList.readObject(ArrayList.java:593) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:480) at org.apache.wicket.Component.readObject(Component.java:4465) at java.lang.reflect.Method.invoke(Method.java:597) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1849) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329) at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323
Re: ClassLoader (Serialization?) error
Looks like a resource called 'mypackage.MyClass fi usuari -- /divdiv id' was requested - that's the output after urldecoding the string from your exception message. I guess somewhere in your webapp resource url's are output incorrectly, or someone actually entered that string as url in his browser. Maybe you're trying to output html comment inside html comments, where the 'inner' comments terminate the 'outer' comments early, and leave an extra -- behind. So, I guess you don't have a ClassLoader issue here, nor a Serialization issue. cheers, Jonas On Fri, Mar 12, 2010 at 12:16 PM, Xavier López xavil...@gmail.com wrote: Hi, From time to time I see the following error in my deployed application's log. The application is running clustered on Weblogic 9.2 MP3. It seems to be messing up with the classloading of class mypackage.MyClass (this error comes up in many different classes). I can guess from the stack trace that something is going wrong maybe serializing that page, it can be seen that the class name is being messed with some content of the page (div tags, text displayed in the page,...). Has anyone been in this situation before ? Any tip on how to address the issue ? 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.apache.wicket.request.target.resource.SharedResourceRequestTarget 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133! 1268343057...@192.168.131.142 - unable to lazily register shared resource mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= java.lang.ClassNotFoundException: mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289) at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262) at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161) at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35) at org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103) at org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at mypacakge.MyFilter.doFilter(ANetFilter.java:37) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:181) 2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] org.apache.wicket.request.target.resource.SharedResourceRequestTarget 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133! 1268343057...@192.168.131.142 - shared resource mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not found Thanks, Xavier - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Application#get in WicketSessionFilter
Hi all, we're using WicketSessionFilter in our product to access our custom WebSession, which works fine. Now we've tried to also access the org.apache.wicket.Application (e.g. using Session#getApplication or Application#get), which doesn't seem to work, because the application isn't bound to the ThreadLocal. After searching in nabble I found some old threads ([1], [2]) suggesting this should actually work fine, but that doesn't seem to be the case. Is there any special configuration trick I have to apply to make this work, or are those old posts just (no longer) true? If anybody could confirm this is actually a bug, I'd create an issue in JIRA to have this fixed. Regards, Jonas [1] http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786 [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket Multi-Threading with access to the session
I guess you could safely share your IStringResourceLoaders, as they are already shared between multiple session (and thus potentially multiple threads). If you really need to share the Session object between threads, you have to roll some kind of locking. What I've done in the past is adding a ReentrantLock to the session, which every thread has to acquire before using the session. For web request threads, this can be done in WebRequestCycle. However, I would advise against sharing the whole session, but just to share what's actually needed and guard the access to that. cheers, Jonas On Wed, Feb 10, 2010 at 12:08 PM, Matthias Keller matthias.kel...@ergon.ch wrote: Hi We have a complex application which needs to calculate some very expensive things. Those could easily be parallelized so we thought about having a thread pool to do that. Unfortunately, that code needs access to the localizer and the application (for some configuration values) so we're setting the Session and the Application explicitly in that thread using Application.set() and Session.set(). But this always leads to a strange error - I suspect it has something to do with the 'duplicated' session or application? Any hints about how to do this correctly? Do we need to do something special with the session or application at the end of the thread? Thanks! Matt Here's the stacktrace: WicketMessage: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = SignupForm]] threw an exception Root cause: ExceptionConverter: java.io.IOException: No message found for the.document.has.no.pages Complete stack: org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component [MarkupContainer [Component id = SignupForm]] threw an exception at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:194) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1175) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:183) at org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1175) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: PasswordTextField not showing the value
Not sure if that is actually the problem, but have you noticed PasswordTextField#getResetPassword() ? Its default value is 'true', meaning the value is cleared on every rendering. cheers, Jonas On Wed, Jan 27, 2010 at 3:19 PM, Josh Kamau joshnet2...@gmail.com wrote: I have would like to edit an existing user's properties including the password. However, all the other properties are appearing on their corresponding fields except the password field. How do i make it appear?. here is my component for editing users public class UserPanel extends Panel { /** * */ private static final long serialVersionUID = 3819937222116190372L; �...@inject private UserDao userDao; private TextFieldString txtUsername; private PasswordTextField txtPassword; private PasswordTextField txtConfPassword; private User user; public UserPanel(String id, final User user) { super(id); this.user = user; FormUser frmCreateUser = new FormUser(frmCreateUser) { /** * */ private static final long serialVersionUID = 1L; �...@override protected void onSubmit() { if (user.getId() == null) { Long id = userDao.saveUser(this.getModelObject()); info(User # + id + has been created); } else { Long id = userDao.updateUser(this.getModelObject()); info(User # + id + has been updated); } } }; frmCreateUser.setModel(new ModelUser(user)); add(frmCreateUser); txtUsername = new TextFieldString(txtUsername, new PropertyModelString(user, username)); txtPassword = new PasswordTextField(txtPassword, new PropertyModelString(user, password)); txtConfPassword = new PasswordTextField(txtConfPassword, new PropertyModelString(user, password)); frmCreateUser.add(txtUsername); frmCreateUser.add(txtPassword); frmCreateUser.add(txtConfPassword); } the txtPassword and txtConfPassword fields display empty and so i have to provide a password every time i edit the user. Kindly help Regards Josh - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: images not under the context root directory
Have you tried the following: WebComponent image = new WebComponent(someWicketId); image.add(new SimpleAttributeModifier(src, http://.jpg;)); add(image); with markup img wicket:id=someWicketId / that should work just fine... if you cannot hardcode the image url, you can use the following instead of SimpleAttributeModifier image.add(new AttributeModifier(src, true new AbstractReadOnlyModelString() { public String getObject() { String url = ... (fetch the image url from anywhere else) // e.g. '/xxx//image893748.png' return url; } )); 2010/1/27 François Meillet fm...@meillet.com: Hi Wicketers, I have a directory, /xxx/images with uploaded images, which is not under the application context root directory. How can I serve them as static images ? I tried the StaticImage class I found in the forum (http://old.nabble.com/Plain-IMG-src-urls-td21547371.html#a21547543 ) but it doesn't work for me. It just work if the image files are under the context root directory. Thanks for your help. François - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Serialization test
You can't verify for any IModel if it has been detached, but what works fine is e.g. checking all LoadableDetachableModel subclasses. You have to rely on specific IModel implementations that have some kind of API to check if they have been detached, just like LoadableDetachableModel#isAttached() On Wed, Jan 27, 2010 at 3:51 PM, pieter claassen pie...@claassen.co.uk wrote: I want to test the following: 1. Whether I have any private members stored on my pages that are not a primitive java type, or IModel 2. If they are IModels, that I do call onDetach() on them. Reflection helps me to answer the 1st question but the second one baffles me. Any tips on how to verify that I am calling onDetach() on all privately stored IModels? I notice that Martijn has a presentation on the subject here, but there is just not enough code in there for me to get to solution myself. http://www.slideshare.net/dashorst/keep-your-wicket-application-in-production Thanks, Pieter - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Should Duration be deprecated?
java.util.concurrent.TimeUnit only covers units from nanos to seconds (in java 1.5, that is) So before wicket moves to java 1.6 we probably have a 'no go' here... On Tue, Jan 26, 2010 at 3:42 PM, Objelean Alex alex.objel...@gmail.com wrote: I was wondering why would wicket need Duration class as long as java provides a similar TimeUnit. Maybe it would be a good idea to deprecate this class encourage usage of TimeUnit? Alex Objelean - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dropdown issue
Make sure you fully understand how CompoundPropertyModel and PropertyModel work first. I suggest to study some documentation about CompoundPropertyModel (as in [1], [2] or [3]) and to do some googleing for code examples. [1] http://cwiki.apache.org/WICKET/working-with-wicket-models.html [2] http://www.javabeat.net/javabeat/wicket/tutorials/basics/4-more-on-models.php [3] http://wicketinaction.com/book/ On Thu, Jan 21, 2010 at 9:28 AM, chinedu efoagui chinedub...@gmail.com wrote: @jonas Thanks a lot for your help but could illustrate with some code please so i can get the full idea .. On 1/20/10, Jonas barney...@gmail.com wrote: with this code, you're trying to set a PersonnelrecordsDepartment Object into the field called parentId of the object referred to by the 'selected' variable that you're passing to the CompoundPropertyModel. The data types don't match, that's why wicket trys to safe the day using conversion (which obviously cannot succeed in this case...). You can either: a) change the data type of the parentId field of your 'selected' object or b) change your dropdown choice so only the id is propagated instead of the whole PersonnelrecordsDepartment Object. you could do that e.g. by setting the ids as choices, and use a custom choicerenderer which retrieves and renders the PersonnelrecordsDepartment Objects I hope that helps... On Wed, Jan 20, 2010 at 4:54 PM, chinedu efoagui chinedub...@gmail.com wrote: @jonas ignore that. i was just refactoring the code for the email. the error is runtime not compile time. I think it is a conversion problem please help The field parentid is integer but the dropdown is expecting object the form code IModel zaModel=new CompoundPropertyModel(selected); departmentform.setModel(zaModel); RequiredTextField departmentname=new RequiredTextField(departmentname); departmentname.setOutputMarkupId(true); departmentform.add(departmentname); DepartmentDropDownChoice title=new DepartmentDropDownChoice(parentid,zaModel); departmentform.add(title); departmentform.add(new AjaxFallbackLink(canceldepartmentformbutton){ �...@override public void onClick(AjaxRequestTarget target) { closeModalWindow(target); } }); feedback = new FeedbackPanel(feedback); feedback.setOutputMarkupId(true); int[] filteredErrorLevels = new int[]{FeedbackMessage.ERROR}; feedback.setFilter(new ErrorLevelsFeedbackMessageFilter(filteredErrorLevels)); departmentform.add(feedback); FeedbackLabel departmentFeedbackLabel = new FeedbackLabel(departmentfeedback, departmentname,new Model(Department is required)); departmentFeedbackLabel.setOutputMarkupId(true); departmentname.add(new ComponentVisualErrorBehavior(onblur, departmentFeedbackLabel)); departmentform.add(departmentFeedbackLabel); departmentform.add(new AjaxFallbackButton(savedepartmentbutton, departmentform) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { PersonnelrecordsDepartment pr=(PersonnelrecordsDepartment)form.getDefaultModel().getObject(); try { if(isNew){ dao.addPersonnelrecordsDepartment(pr); } else{ dao.savePersonnelrecordsDepartment(pr); } } catch (GenericBusinessException ex) { Logger.getLogger(DepartmentPanel.class.getName()).log(Level.SEVERE, null, ex); } //target.addComponent(form); setFormReponse(target); } @Override protected void onError(AjaxRequestTarget target, Form? form) { // repaint the feedback panel so errors are shown target.addComponent(feedback); } }); add(departmentform); } private void setFormReponse(AjaxRequestTarget target){ info(Save Operation was Successful); target.addComponent(feedback); } FeedbackPanel feedback; } /code On 1/20/10, Jonas barney...@gmail.com wrote: not sure if that's the problem, but shouldn't setChoices(titles); be setChoices(departments); On Wed, Jan 20, 2010 at 4:14 PM, chinedu efoagui chinedub...@gmail.com wrote: Hello , I have a class PersonnelrecordsDepartment with the following fields with corresponding getters and setters private java.lang.Integer id; private java.lang.String departmentname; private java.lang.Integer parentid; I left out the getters and setters . Any the field parentid can refer to an existing department like a recursive stuff like having a self foreign key Anyway the problem is that i have a dropdownlchoice for the form code public class DepartmentDropDownChoice extends DropDownChoice
Re: dropdown issue
not sure if that's the problem, but shouldn't setChoices(titles); be setChoices(departments); On Wed, Jan 20, 2010 at 4:14 PM, chinedu efoagui chinedub...@gmail.com wrote: Hello , I have a class PersonnelrecordsDepartment with the following fields with corresponding getters and setters private java.lang.Integer id; private java.lang.String departmentname; private java.lang.Integer parentid; I left out the getters and setters . Any the field parentid can refer to an existing department like a recursive stuff like having a self foreign key Anyway the problem is that i have a dropdownlchoice for the form code public class DepartmentDropDownChoice extends DropDownChoice { �...@springbean(name=IHRService) private IHRService dao; */ /** * * @param id * @param model */ public DepartmentDropDownChoice(String id,final IModel model){ super(id,model); final ChoiceRenderer renderer = new ChoiceRenderer(departmentname, id); setChoiceRenderer(renderer); ListPersonnelrecordsDepartment departments=Collections.EMPTY_LIST; try { departments = dao.getPersonnelrecordsDepartmentList(); } catch (GenericBusinessException ex) { Logger.getLogger(DepartmentDropDownChoice.class.getName()).log(Level.SEVERE, null, ex); } setChoices(titles); } /code and it gives this error anytime i try to save the personneldepartment object code 2010-01-20 16:12:07,745 ERROR [org.apache.wicket.RequestCycle] - Cannot format given Object as a Number java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:487) at java.text.Format.format(Format.java:140) at org.apache.wicket.util.convert.converters.AbstractNumberConverter.convertToString(AbstractNumberConverter.java:111) at org.apache.wicket.util.lang.PropertyResolverConverter.convert(PropertyResolverConverter.java:85) at org.apache.wicket.util.lang.PropertyResolver$MethodGetAndSet.setValue(PropertyResolver.java:1107) at org.apache.wicket.util.lang.PropertyResolver$ObjectAndGetSetter.setValue(PropertyResolver.java:588) at org.apache.wicket.util.lang.PropertyResolver.setValue(PropertyResolver.java:136) at org.apache.wicket.model.AbstractPropertyModel.setObject(AbstractPropertyModel.java:169) at org.apache.wicket.Component.setDefaultModelObject(Component.java:3052) at org.apache.wicket.markup.html.form.FormComponent.updateModel(FormComponent.java:1168) at org.apache.wicket.markup.html.form.Form$FormModelUpdateVisitor.component(Form.java:225) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:514) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrderHelper(FormComponent.java:493) at org.apache.wicket.markup.html.form.FormComponent.visitComponentsPostOrder(FormComponent.java:465) at org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModels(Form.java:2051) at org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.java:2019) at org.apache.wicket.markup.html.form.Form.process(Form.java:984) at org.apache.wicket.markup.html.form.Form.process(Form.java:911) at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876) at org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135) at org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177) at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:299) /code i think it has something to do with the conversion. but how do i convert it again?? How can i solve this problem??? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: dropdown issue
with this code, you're trying to set a PersonnelrecordsDepartment Object into the field called parentId of the object referred to by the 'selected' variable that you're passing to the CompoundPropertyModel. The data types don't match, that's why wicket trys to safe the day using conversion (which obviously cannot succeed in this case...). You can either: a) change the data type of the parentId field of your 'selected' object or b) change your dropdown choice so only the id is propagated instead of the whole PersonnelrecordsDepartment Object. you could do that e.g. by setting the ids as choices, and use a custom choicerenderer which retrieves and renders the PersonnelrecordsDepartment Objects I hope that helps... On Wed, Jan 20, 2010 at 4:54 PM, chinedu efoagui chinedub...@gmail.com wrote: @jonas ignore that. i was just refactoring the code for the email. the error is runtime not compile time. I think it is a conversion problem please help The field parentid is integer but the dropdown is expecting object the form code IModel zaModel=new CompoundPropertyModel(selected); departmentform.setModel(zaModel); RequiredTextField departmentname=new RequiredTextField(departmentname); departmentname.setOutputMarkupId(true); departmentform.add(departmentname); DepartmentDropDownChoice title=new DepartmentDropDownChoice(parentid,zaModel); departmentform.add(title); departmentform.add(new AjaxFallbackLink(canceldepartmentformbutton){ �...@override public void onClick(AjaxRequestTarget target) { closeModalWindow(target); } }); feedback = new FeedbackPanel(feedback); feedback.setOutputMarkupId(true); int[] filteredErrorLevels = new int[]{FeedbackMessage.ERROR}; feedback.setFilter(new ErrorLevelsFeedbackMessageFilter(filteredErrorLevels)); departmentform.add(feedback); FeedbackLabel departmentFeedbackLabel = new FeedbackLabel(departmentfeedback, departmentname,new Model(Department is required)); departmentFeedbackLabel.setOutputMarkupId(true); departmentname.add(new ComponentVisualErrorBehavior(onblur, departmentFeedbackLabel)); departmentform.add(departmentFeedbackLabel); departmentform.add(new AjaxFallbackButton(savedepartmentbutton, departmentform) { @Override protected void onSubmit(AjaxRequestTarget target, Form? form) { PersonnelrecordsDepartment pr=(PersonnelrecordsDepartment)form.getDefaultModel().getObject(); try { if(isNew){ dao.addPersonnelrecordsDepartment(pr); } else{ dao.savePersonnelrecordsDepartment(pr); } } catch (GenericBusinessException ex) { Logger.getLogger(DepartmentPanel.class.getName()).log(Level.SEVERE, null, ex); } //target.addComponent(form); setFormReponse(target); } @Override protected void onError(AjaxRequestTarget target, Form? form) { // repaint the feedback panel so errors are shown target.addComponent(feedback); } }); add(departmentform); } private void setFormReponse(AjaxRequestTarget target){ info(Save Operation was Successful); target.addComponent(feedback); } FeedbackPanel feedback; } /code On 1/20/10, Jonas barney...@gmail.com wrote: not sure if that's the problem, but shouldn't setChoices(titles); be setChoices(departments); On Wed, Jan 20, 2010 at 4:14 PM, chinedu efoagui chinedub...@gmail.com wrote: Hello , I have a class PersonnelrecordsDepartment with the following fields with corresponding getters and setters private java.lang.Integer id; private java.lang.String departmentname; private java.lang.Integer parentid; I left out the getters and setters . Any the field parentid can refer to an existing department like a recursive stuff like having a self foreign key Anyway the problem is that i have a dropdownlchoice for the form code public class DepartmentDropDownChoice extends DropDownChoice { �...@springbean(name=IHRService) private IHRService dao; */ /** * * @param id * @param model */ public DepartmentDropDownChoice(String id,final IModel model){ super(id,model); final ChoiceRenderer renderer = new ChoiceRenderer(departmentname, id); setChoiceRenderer(renderer); ListPersonnelrecordsDepartment departments=Collections.EMPTY_LIST; try { departments = dao.getPersonnelrecordsDepartmentList(); } catch (GenericBusinessException ex) { Logger.getLogger(DepartmentDropDownChoice.class.getName()).log(Level.SEVERE, null, ex); } setChoices(titles
Re: Wicket URL Encryption Key
I think the book refers to wicket 1.3. The default behaviour of Settings#getCryptFactory has changed in 1.4. I think in 1.3 the default was ClassCryptFactory with a default key as still visible in ISecuritySettings#DEFAULT_ENCRYPTION_KEY. Now in 1.4, the KeyInSessionSunJceCryptFactory with a generated key (as you mentioned) is used. On Wed, Jan 20, 2010 at 4:59 PM, mzem...@osc.state.ny.us wrote: On page 331 of Wicket In Action is the following excerpt, Note that you should modify the default encryption key that is stored in ISecuritySettings to prevent malicious hackers from using the default publicly available key as an attack vector. Does this only pertain to when Sun JCE is not available and Wicket defaults to no encryption? From what I can gather, the key should be generated by... KeyInSessionSunJceCryptFactory.java if (key == null) { // generate new key key = session.getId() + . + UUID.randomUUID().toString (); session.setAttribute(keyAttr, key); } Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Wicket URL Encryption Key
A quick search through wicket's fisheye [1] revealed the default was changed in wicket 1.3.5 to fix [2] [1] http://fisheye6.atlassian.com/browse/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/settings/Settings.java#r684127 [2] http://issues.apache.org/jira/browse/WICKET-1782 On Wed, Jan 20, 2010 at 5:13 PM, Jonas barney...@gmail.com wrote: I think the book refers to wicket 1.3. The default behaviour of Settings#getCryptFactory has changed in 1.4. I think in 1.3 the default was ClassCryptFactory with a default key as still visible in ISecuritySettings#DEFAULT_ENCRYPTION_KEY. Now in 1.4, the KeyInSessionSunJceCryptFactory with a generated key (as you mentioned) is used. On Wed, Jan 20, 2010 at 4:59 PM, mzem...@osc.state.ny.us wrote: On page 331 of Wicket In Action is the following excerpt, Note that you should modify the default encryption key that is stored in ISecuritySettings to prevent malicious hackers from using the default publicly available key as an attack vector. Does this only pertain to when Sun JCE is not available and Wicket defaults to no encryption? From what I can gather, the key should be generated by... KeyInSessionSunJceCryptFactory.java if (key == null) { // generate new key key = session.getId() + . + UUID.randomUUID().toString (); session.setAttribute(keyAttr, key); } Notice: This communication, including any attachments, is intended solely for the use of the individual or entity to which it is addressed. This communication may contain information that is protected from disclosure under State and/or Federal law. Please notify the sender immediately if you have received this communication in error and delete this email from your system. If you are not the intended recipient, you are requested not to disclose, copy, distribute or take any action in reliance on the contents of this information. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: I feel silly asking this
have a look at http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html section 'Attribute wicket:message' On Mon, Jan 11, 2010 at 12:56 PM, Wayne Pope waynemailingli...@googlemail.com wrote: Ok , I think I must have a brain block or something. Basically how do you localize the submit input on a form with having to add a Button? Currently we have a fairly large number of forms in the applicaiton that just the default form onSubmit and we just add something like: input type=submit value=Save/ to the html. Do we need to add Buttons to all our pages or is there a way to specify in our application properties files what the default value should be for submits? many thanks - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Referring image using Resource Reference
take a closer look at ContextImage's contructor and its javadoc: /** * Constructor * * @param id * @param contextRelativePath *context-relative path eg codeimages/border.jpg/code */ public ContextImage(String id, String contextRelativePath) so try changing your code to the following: form.add(new ContextImage(images, image/calendarIcon.gif)); that sould work just fine. I think ResourceReference is only applicable if the resource is accessible on the webapps classpath, thus not directly accessible via context and to be served by wicket. On Tue, Jan 5, 2010 at 8:45 AM, vela vela@gmail.com wrote: Hello again, In the project setup, the Page class and their corresponding html files are not placed in the same directory. The Page class are placed under the package com.image and their corresponding html files are placed inside the html directory under the context root. If I place the image file inside the com.image directory or html directory, it is getting called. But I need to call the image file inside the image directory under the context root. In the Page class, the context image has call been called as form.add(new ContextImage(images, new Model(new ResourceReference(image/calendarIcon.gif; -- View this message in context: http://old.nabble.com/Referring-image-using-Resource-Reference-tp27014229p27024782.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: class cast exception when using setAutomaticMultiWindowSupport(true)
I think there was a message on this list reporting the same String/String ClassCastException a few days ago, but I don't remember if it was related to autocomplete. On Fri, Dec 11, 2009 at 4:05 AM, Douglas Ferguson doug...@douglasferguson.us wrote: The problem exists on the trunk. Has anybody else seen this? If nobody has seen this I will try to make a quickstart. D/ On Dec 10, 2009, at 4:11 PM, nino martinez wael wrote: have you tried with the latest from trunk? That way you can see quickly if it's fixed there... 2009/12/10 Douglas Ferguson doug...@douglasferguson.us I traced through this and there appears to be 2 items in the pagemap and I think it is related to getPageSettings().setAutomaticMultiWindowSupport(true); wicket:pageMapName = [people, resources] org.apache.wicket.markup.html.WicketEventReference = wicket-event.js On Dec 10, 2009, at 12:36 PM, Douglas Ferguson wrote: I'm getting this error from autocomplete after upgrading.. ... java.lang.ClassCastException: [Ljava.lang.String; cannot be cast to java.lang.String org.apache.wicket.request.target.coding.BookmarkablePageRequestTargetUrlCodingStrategy.decode(BookmarkablePageRequestTargetUrlCodingStrategy.java:91) org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.targetForRequest(WebRequestCodingStrategy.java:507) org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:191) org.apache.wicket.RequestCycle.step(RequestCycle.java:1310) org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) org.apache.wicket.RequestCycle.request(RequestCycle.java:545) org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468) org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301) org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) java.lang.Thread.run(Thread.java:636) - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: unreachable john.mattu...@td.com
That sounds really strange - I'd recommend a thorough virus scan of your box... On Wed, Dec 9, 2009 at 8:39 AM, Stefan Lindner lind...@visionet.de wrote: Every time I send an email to users@wicket.apache.org I receive the message john.mattu...@td.com is not reachable TDGROUP #5.0.0 X-Notes;Invalid/unknown recipient [MAPI Reason Code: 1, MAPI Diagnostic Code 1] Am I the only one who gets this message? Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: unreachable john.mattu...@td.com
forget that, I just also received that message, but it was filtered out as spam On Wed, Dec 9, 2009 at 8:45 AM, Jonas barney...@gmail.com wrote: That sounds really strange - I'd recommend a thorough virus scan of your box... On Wed, Dec 9, 2009 at 8:39 AM, Stefan Lindner lind...@visionet.de wrote: Every time I send an email to users@wicket.apache.org I receive the message john.mattu...@td.com is not reachable TDGROUP #5.0.0 X-Notes;Invalid/unknown recipient [MAPI Reason Code: 1, MAPI Diagnostic Code 1] Am I the only one who gets this message? Stefan - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: getting img src of dynamic image
Why don't you just pass your BufferedDynamicImageResource to an org.apache.wicket.markup.html.image.Image? That should work just fine if what you're generating in plotPolyGate.getResult().getImage() is 'static'. If it's not static, you can use the Image with an IModel containing the appropriate Resource. On Sun, Nov 22, 2009 at 2:55 PM, Simon Schafferer simon.schaffe...@gmx.at wrote: Hi, initial situation: I`m interfacing R with Java and provide some of the R functionalities within a web interface. Therefore all my images are BufferedImages from R. For drawing a polygon gate on one of the images I need the src of the Image for the JavaScript function that allows the user to draw a gate. I used this work around to get to the image source: Resource polyGateImageResource; BufferedDynamicImageResource dynamicresource = new BufferedDynamicImageResource(); dynamicresource.setImage(plotPolyGate.getResult().getImage()); polyGateImageResource = dynamicresource; String modifier = http://localhost:8080/; + polyGateImage.getRequest().getURL().replace(:::,) + tabs:panel:polyGateImage::IResourceListener::; polyGateImage.add(new SimpleAttributeModifier(src, modifier)); The String modifier contains: http://localhost:8080/?wicket:interface=polyGateMap:6:tabs:panel:polyGateImage::IResourceListener:: I don't think that this is a good approach to get the URL of a dynamic image, so i wonder if anybody knows a better solution. Greetings Simon -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Flash and Wicket crossdomain.xml
Is the content of you crossdomain.xml 'static'? If so, I guess you can just put that file into your web app's context root. If you need the file content generated dynamically, I doubt generating it in wicket is the easiest way to do it. I think I would rather just use a simple servlet. On Fri, Nov 20, 2009 at 2:23 PM, Mathias Nilsson wicket.program...@gmail.com wrote: Hi, I have built a flash movie that get's data from a webservice. When trying to access it in my webapp it complains. I read that I need to add a crossdomain.xml so that www.mysite.com/crossdomain.xml can be accessed. How can I make this file viewable this way using wicket? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: InvalidUrlException - how to show 404 page
I think it should be possible to have the webserver deliver the standard 404 page by throwing AbortWithWebErrorCodeException You can hook in at WebRequestCycleProcessor#respond(RuntimeException e, RequestCycle requestCycle) and throw the mentioned exception. Works find just like this in our webapp cheers, Jonas On Fri, Oct 2, 2009 at 10:22 AM, Thomas Singer wic...@regnis.de wrote: As I have reported a couple of weeks ago (but can't find the message any more for a follow-up), Wicket shows an ugly internal-error page if one somehow modified the stateful URLs, e.g. http://localhost:8080/?wicket:interface=:8 Following exception is logged: org.apache.wicket.protocol.http.request.InvalidUrlException: org.apache.wicket.WicketRuntimeException: Internal error parsing wicket:interface = :6 at org.apache.wicket.protocol.http.request.WebRequestCodingStrategy.decode(WebRequestCodingStrategy.java:231) at org.apache.wicket.Request.getRequestParameters(Request.java:172) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) How to configure Wicket to show the configured 404-page instead? Tom - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ConversionException and onSubmit is not called
Have you tried removing setType(Region.class); from your code? I don't think that's necessary for a DropDownChoice - and probably the cause why an IConverter is used (which is probably the source of the ConversionException you mentioned). On Fri, Aug 21, 2009 at 3:17 PM, Harrie Hazewinkelhar...@tipspot.com wrote: HI Cemil, I had to modify the setObject rather different, but it gave me the clue on where the conversion went wrong. Thanks for your sample code! regards, Harrie - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Session listener
I think overriding WebApplication#sessionDestroyed should do the trick. On Wed, Aug 19, 2009 at 12:26 PM, David Leangenwic...@leangen.net wrote: Hi! What's the best way to get notified of a session timeout event from within a Wicket App when I don't have access to the deployment descriptor? All I need is the ID of the session that expired. Thanks! =David - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Does ExternalLink URL encode?
Use the Source, Luke! have a look at ExternalLink#onComponentTag On Tue, Aug 18, 2009 at 12:38 PM, Roman Uhlig Maxity.deroman.uh...@maxity.de wrote: Just a simple question, I couldn't find any hint on this in the mailing list and the wiki. Is ExternalLink doing some URL encoding with the href param or will I have to do it on my own? Something like: new ExternalLink( id, http://www.mysite.com/page.jsp?title=; + URLEncoder.encode(This is a title, UTF-8) ); Thanks, Roman - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: currency symbol in windows and unix different for a label model
You shouldn't use methods that rely on the vm's default locale, as it might be set to something unexpected - use the methods with a locale parameter instead, and pass the Session#getLocale in, e.g. NumberFormat.getCurrencyInstance(Session.get().getLocale()) this is probably a serious amount of work, so if you only need to support one locale, and the servlet container is under your control, just set its default locale using vm arguments like -Duser.country=us -Duser.language=en setting the default locale from within a servlet (or wicket) will probably fail if your servlet container runs with a security manager On Thu, Jul 30, 2009 at 4:08 PM, fachhochfachh...@gmail.com wrote: I am assuming its some kind of java setting in unix box, I am a foreigner to unix please help me resolve this. fachhoch wrote: I have a Label new Label(recommendedAmt,NumberFormat.getCurrencyInstance().format(stgFinding.getFindingAmt()==null ? new BigDecimal(0): stgFinding.getFindingAmt())); this works fine but when deployed in windows I get the label as $0.00 and when deployed in unix i Get this as ¤0.00 and I also get strange symbols �� please help me resolve this. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/currency-symbol-in-windows-and-unix-different-for-a-label-model-tp24726638p24739192.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IModel parameters of StringResourceModel not getting detached
done: https://issues.apache.org/jira/browse/WICKET-2381 On Fri, Jul 17, 2009 at 4:52 PM, Johan Compagnerjcompag...@gmail.com wrote: please make a jira issue for this The detach of StringResourcemodel should walk over its param to check if it is a model and call detach on those. On Fri, Jul 17, 2009 at 10:44, Jonas barney...@gmail.com wrote: A question about StringResourceModel: it supports IModels in the 'parameters' Object[] that are properly handled in StringResourceModel#getString, meaning they could get attached because of StringResourceModel. Shouldn't it also be the StringResourceModel's responsibility to properly detach them (from #onDetach)? Who's in general responsible to detach an IModel, specially those who aren't a Component's 'default' IModel? Is that correct that any code that calls IModel#getObject() should also call IModel#detach() later in the same request? cheers, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
IModel parameters of StringResourceModel not getting detached
A question about StringResourceModel: it supports IModels in the 'parameters' Object[] that are properly handled in StringResourceModel#getString, meaning they could get attached because of StringResourceModel. Shouldn't it also be the StringResourceModel's responsibility to properly detach them (from #onDetach)? Who's in general responsible to detach an IModel, specially those who aren't a Component's 'default' IModel? Is that correct that any code that calls IModel#getObject() should also call IModel#detach() later in the same request? cheers, Jonas - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Background-Thread blocking Wicket-App
Sounds like your background thread is holding a lock that is also acquired during page rendering. Maybe you can find out which lock is contended by creating a thread dump using visualvm or jstack from jdk 1.6 On Fri, Jul 17, 2009 at 11:24 AM, Tokalak Ahmettoka...@yahoo.de wrote: Hi All, we've got a page which does time consuming tasks. Because of that, every time a user calls the page a new background-thread is started (only if not running already) and the user is informed that the task is running and the page will be updated with fresh data as quickly as the thread has finished. We've realized that the WHOLE application is blocked until the background-thread finishes. That is no other page can be called by the user who has started the thraed. The app is also not responding to other users as long as the thread is running. The background thread class i'm using is a simple thread extending the thread class and retrieving data from a very very big database in its run method. I'm using Wicket 1.3.5 on Tomcat6.0.18 Any ideas? - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: add html-attribute to a tab
usually, you can attach an AttributeModifier to the component representing the tag, like new AttributeModifier(title, true, new Model(The Title Text)) I never tried it in a TabbedPanel, but its probably one of the Components generated by one of the newXXX methods on TabbedPanel where you should attach the attribute modifier cheers, Jonas On Thu, Jul 16, 2009 at 11:12 AM, ptrashptr...@web.de wrote: So, it is not possible? -- View this message in context: http://www.nabble.com/add-html-attribute-to-a-tab-tp24468087p24512963.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: page refresh after setLocale
I think you just have to make sure the locale-dependent strings are not 'static' within the page. e.g. don't use new Model(My localized label from db) but something like new LoadableDetachableModel() { protected Object load() { return the string, taking the current locale into account; } } On Mon, Jun 8, 2009 at 11:34 AM, Juri Prokofievproj...@gmail.com wrote: I have a link that just changes a locale. How is it possible to refresh the same page after setting the locale? The problem is that after I click the link the translation links are changed, but the content(that comes from hibernate) of the page is still the same in different language. If I add a setResponsePage(HomePage.class) then it will do the trick, but I need to stay on the same page. Is suppose it should be a common case. Any ideas? Thank you - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxPagingNavigator and 508
to set the title attribute, you can attach an AttributeModifier to the links by overriding AjaxPagingNavigator#newPagingNavigationLink etc. e.g. new AjaxPagingNavigator(foo, pageable) { @Override protected Link newPagingNavigationLink(String id, IPageable pageable, int pageNumber) { Link link = super.newPagingNavigationLink(id, pageable, pageNumber); link.add(new AttributeModifier(title, true, new Model(the title))); return link; } }; of course you also have to do it for the other links in the navigator and the AjaxPagingNavigation On Thu, Apr 16, 2009 at 12:37 AM, tubin gen fachh...@gmail.com wrote: My application should be 508 and was wondering if using AjaxPagingNavigator and AjaxFallbackDefaultDataTable will they cause issue with 508 , because the pagining navigator provides links to pages and can I set the tittle attribute to the anchor created by navigator ? and the sortable column in AjaxFallbackDefaultDataTable - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Getting localized string in constructor.
Hi, I don't think createing a ResourceModel instance makes sense, because all ResourceModel does is using the localizer... Regarding the original question, if I remember correctly the warning message only shows up in development mode to give you a heads up that resource lookup will not work as expected if the component is not yet added to a page. See: http://day-to-day-stuff.blogspot.com/2008/05/wicket-internationalization.html section 'Finding the message' If the resource string isn't located in the page's resource file, it's probably safe to ignore the warning. Besides, if you're in a Component, you can use Component#getString as shortcut (instead of Application.get().getResourceSettings().getLocalizer().getString(...)) cheers, Jonas 2009/4/14 Witold Czaplewski witold-mail...@cts-media.eu: Hi Michał, if you need the string of a ResourceModel you may want to call: new ResourceModel(key).getObject().toString(). cheers, Witold Am Tue, 14 Apr 2009 11:07:05 +0200 schrieb Michał Letyński mletyn...@consol.pl: Hi. When im getting localized string in constructor via getString method the warning message is dispalyed: Tried to retrieve a localized string for a component that has not yet been added to the page. I know that one possible way to fix this is to use ResourceModel(key'). But what if i cant use ResourceModel ? for e.g some component want String directly. Is there a better solution then using: Application.get().getResourceSettings().getLocalizer().getString(resourceKey, (Component)null, defaultValue); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Getting localized string in constructor.
Just checked the code again, the message seems to be shown always (not just in development mode). To work around this, you can either call the localizer without component (as you originally proposed), or you can configure your logging not to log warnings from the localizer. Just remember that those warnings might be useful if you decide later to have per page resource bundles after all... 2009/4/14 Jonas barney...@gmail.com: Hi, I don't think createing a ResourceModel instance makes sense, because all ResourceModel does is using the localizer... Regarding the original question, if I remember correctly the warning message only shows up in development mode to give you a heads up that resource lookup will not work as expected if the component is not yet added to a page. See: http://day-to-day-stuff.blogspot.com/2008/05/wicket-internationalization.html section 'Finding the message' If the resource string isn't located in the page's resource file, it's probably safe to ignore the warning. Besides, if you're in a Component, you can use Component#getString as shortcut (instead of Application.get().getResourceSettings().getLocalizer().getString(...)) cheers, Jonas 2009/4/14 Witold Czaplewski witold-mail...@cts-media.eu: Hi Michał, if you need the string of a ResourceModel you may want to call: new ResourceModel(key).getObject().toString(). cheers, Witold Am Tue, 14 Apr 2009 11:07:05 +0200 schrieb Michał Letyński mletyn...@consol.pl: Hi. When im getting localized string in constructor via getString method the warning message is dispalyed: Tried to retrieve a localized string for a component that has not yet been added to the page. I know that one possible way to fix this is to use ResourceModel(key'). But what if i cant use ResourceModel ? for e.g some component want String directly. Is there a better solution then using: Application.get().getResourceSettings().getLocalizer().getString(resourceKey, (Component)null, defaultValue); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Communication between applications, one using wicket
Hi, there are probably easier way to provide a 'callback' channel to a remote system than a wicket page. Of course, using the web server makes sense, but I'd recommend to use a simple servlet to receive the callback and to update the specific database table instead of a wicket page, since the remote system probably doesn't need to get a html response - a simple http status code is probably enough. Using axis sounds like overkill to me... On Thu, Apr 9, 2009 at 9:36 AM, Cristi Manole cristiman...@gmail.com wrote: Hello, I have a wicket application where a user starts an action on another system (different machine, outside network). I would like for this specific user to receive a response from that system once the action is finished (it takes a fair amount of time) and the status of that action. My idea is to have inside Wicket application an ajax self updating panel, so that the database of the application gets read from time to time. The other application would send a message to the Wicket application (call some page with some page parameters), which would update the specific database table with the user who started the action and the response. Once the action is finished, the self updating panel (aware of this by reading it in the database) becomes visible and it will contain that message to inform the user. I think my idea is bad. If nothing else I consider it resource savvy. How do you guys handle communication between two applications (the other application is not written in java) in order to provide the response to the user without refreshing the page? Thank you very much in advance, Cristi Manole - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Repeater component with dynamic column list
We've created a grid with dynamic columns similar to org.apache.wicket.extensions.markup.html.repeater.data.grid.AbstractDataGridView, except, of course, that the cell populators (the columns) don't come from a fixed array, but from a (dynamic) list. On Wed, Mar 25, 2009 at 1:35 PM, rora tempma...@go2.pl wrote: Hello, my goal is to display a table with dynamic number of columns (and of course rows) based on my EntryData class. ArrayListEntryData entries = ...; public class EntryData implements Serializable { private String entryID; private ArrayListFieldData entryFields; [...] } where public class FieldData implements Serializable { private int fieldId; private String fieldLabel; private String fieldValue; [...] } I would like to have a table presenting entryID and values of all the fields for each entry on the list. Entry ID | entryFields[0].fieldLabel | ... | entryFields[x].fieldLabel entries[0].entryID | entries[0].entryFields[0].fieldValue | ... | entries[0].entryFields[x].fieldValue ... entries[y].entryID | entries[y].entryFields[x].fieldValue | ... | entries[y].entryFields[x].fieldValue I am not really experienced in Wicket and tried to find some Repeater class example to use it as a base for building my own solution. Unfortunately I didn't find anything that suits my needs. I would like to know if it would be possible at all to use one of the repeater control family member to display such data structure. I'll appreciate any help and sample code. Kind regards R -- View this message in context: http://www.nabble.com/Repeater-component-with-dynamic-column-list-tp22700806p22700806.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Base64UrlSafe violating RFC 3548?
https://issues.apache.org/jira/browse/WICKET-2171 On Fri, Mar 13, 2009 at 3:45 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: feel free to file a bug report. -igor On Fri, Mar 13, 2009 at 1:28 AM, Jonas barney...@gmail.com wrote: Hi, I recently stumbled across Base64UrlSafe, which claims 'Provides Base64 encoding and decoding with URL and filename safe alphabet as defined by RFC 3548, section 4.' In the mentioned section of the RFC [1], they use the '-' character for value 62 and '_' for value 63. Strangely, Base64UrlSafe uses '*' for 62 and '-' for 63. Is there any particular reason why it doesn't follow the RFC? Cheers, Jonas [1] http://www.faqs.org/rfcs/rfc3548.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
NullPointerException when starting Wicket Bench
Hallo, I am still new in working with eclipse, I have no idea what cause this Problem. I am trying write Wicket application and would like to use „wicket bench“ plugin. The current version of my eclipse is 3.4.0, „wicket bench“ 0.5.1, JDK 1.6.0. In „Editors“-“File Associations“ I have set *.html and *.java to use „Wicket editor“ as default. Can anybody help me ? Best regards, Virginijus Kandrotas java.lang.NullPointerException at wicketbench.eclipse.editor.WicketEditor.init(WicketEditor.java:88) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:799) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:643) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:266) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2820) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2643) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:318) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:160) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:207) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50) at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221) at org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:184) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079) at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:372) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Re: NullPointerException when starting Wicket Bench
I have just testet with eclipse 3.3 there comes exactly the same Exception, maybe it is just Wicket Bench 0.5.0 issue ? --- On Mon, 3/16/09, Brill Pappin br...@pappin.ca wrote: From: Brill Pappin br...@pappin.ca Subject: Re: NullPointerException when starting Wicket Bench To: users@wicket.apache.org Date: Monday, March 16, 2009, 6:59 AM I think Wicket Bench is a 3rd party plugin and not specifically associated with the Wicket development effort. I think you issue is related to the version of eclipse you are using (I have trouble with it too). I've been thinking of porting the code since its open and fixing it up, but I haven't had time yet. - Brill On 16-Mar-09, at 9:30 AM, Jonas Vingis wrote: Hallo, I am still new in working with eclipse, I have no idea what cause this Problem. I am trying write Wicket application and would like to use „wicket bench“ plugin. The current version of my eclipse is 3.4.0, „wicket bench“ 0.5.1, JDK 1.6.0. In „Editors“-“File Associations“ I have set *.html and *.java to use „Wicket editor“ as default. Can anybody help me ? Best regards, Virginijus Kandrotas java.lang.NullPointerException at wicketbench.eclipse.editor.WicketEditor.init(WicketEditor.java:88) at org.eclipse.ui.internal.EditorManager.createSite(EditorManager.java:799) at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:643) at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428) at org.eclipse.ui.internal.WorkbenchPartReference..getPart(WorkbenchPartReference.java:594) at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:266) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2820) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729) at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721) at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652) at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2643) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:646) at org.eclipse.ui.ide.IDE.openEditor(IDE.java:605) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:318) at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:160) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228) at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:207) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250) at org.eclipse.jdt.internal.ui.navigator.OpenAndExpand.run(OpenAndExpand.java:50) at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.java:221) at org.eclipse.ui.internal.navigator.CommonNavigatorManager$3.open(CommonNavigatorManager.java:184) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:820) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:880) at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:818) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1079) at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewer.java:372) at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1183) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:263) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:257) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:297) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488
Base64UrlSafe violating RFC 3548?
Hi, I recently stumbled across Base64UrlSafe, which claims 'Provides Base64 encoding and decoding with URL and filename safe alphabet as defined by RFC 3548, section 4.' In the mentioned section of the RFC [1], they use the '-' character for value 62 and '_' for value 63. Strangely, Base64UrlSafe uses '*' for 62 and '-' for 63. Is there any particular reason why it doesn't follow the RFC? Cheers, Jonas [1] http://www.faqs.org/rfcs/rfc3548.html - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: localization and session expiration
No need to use spring for that, the locale of a WebSession is initialized from ServletRequest#getLocale() by default, which is based on the Accept-Language header. On Fri, Mar 6, 2009 at 12:57 PM, Leszek Gawron lgaw...@apache.org wrote: Anton Veretennikov wrote: May be cookie? You can also try to extract the locale used by user in the browser from request header: http://www.acegisecurity.org/guide/springsecurity.html#concurrent-sessions GET /guide/springsecurity.html HTTP/1.1 Host: www.acegisecurity.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: pl,en;q=0.7,en-us;q=0.3 ^ Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://www.acooke.org/cute/SessionLim0.html If-Modified-Since: Tue, 15 Apr 2008 17:18:26 GMT If-None-Match: 28002-5ba09-44aec96961c80 Cache-Control: max-age=0 HTTP/1.x 304 Not Modified Date: Fri, 06 Mar 2009 11:52:59 GMT Server: Apache/2.2.8 (EL) Connection: close Etag: 28002-5ba09-44aec96961c80 Spring can resolve locale for you in a flexible manner: http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/servlet/LocaleResolver.html in your case: http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/servlet/i18n/AcceptHeaderLocaleResolver.html To integrate wicket with spring in this context override WebApplication.newSession: @Override public Session newSession( Request request, Response response ) { return new WebSession( request ) { �...@override public Locale getLocale() { return LocaleContextHolder.getLocale(); } }; } -- Leszek Gawron - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceLink, IE and https
Does it work if you set your Resource setCacheable(true)? On Thu, Mar 5, 2009 at 3:21 PM, Luca Provenzani eufor...@gmail.com wrote: Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760), but no answer! Someone can help? Regards Luca - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceLink, IE and https
If it is the browser that caches the report, you can work around this by adding something random to the url generated by ResourceLink#getUrl, similar to what's done in NonCachingImage. urlFor(IResourceListener.INTERFACE) + wicket:antiCache= + System.currentTimeMillis() Unfortunatly, ResourceLink#getUrl is final, so you'll probably have to create your own Link subclass similar to ResourceLink On Thu, Mar 5, 2009 at 4:33 PM, Luca Provenzani eufor...@gmail.com wrote: in this way it works, but how can i refresh the report when parameter is changed? Until now i change parameter into the onclick of the ResourceLink, but now the resource is cached...and then the result report is ever the same.. thanks Luca 2009/3/5 Jonas barney...@gmail.com Does it work if you set your Resource setCacheable(true)? On Thu, Mar 5, 2009 at 3:21 PM, Luca Provenzani eufor...@gmail.com wrote: Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760), but no answer! Someone can help? Regards Luca - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: ResourceLink, IE and https
Looking at ResourceLink#onResourceRequested, I see the resource is delivered before #onClick is called, so whatever you're doing in onClick is too late to have any influence on the report generation. On Thu, Mar 5, 2009 at 4:52 PM, Luca Provenzani eufor...@gmail.com wrote: sorry i wrote a wrong thing... the result is NOT ever the same, but is the report with the previous parameters. I try to explain better: i've a form that determines the report's prameters. On ResourceLink, i added a onmousedown AjaxFormSubmitBehavior to submit the parameter and calculate other. Then into the onclick of ResourceLink i update th resource parameter. the source: * rXlsLnk = new ResourceLink(lnkReport, xlsResource){ private static final long serialVersionUID = 1L; �...@override public void onClick() { HashMapString, String par = new HashMapString, String(); par.put(myWhere, myWhere); xlsResource.setReportParameters(par); super.onClick(); } }; rXlsLnk.add(new AjaxFormSubmitBehavior(onmousedown) { private static final long serialVersionUID = 1L; �...@override protected void onSubmit(AjaxRequestTarget target) { myWhere = WHERE iscr.SISSIONE_COD_SCUOLA='+MySession.getSessesion().getOperatore().getSissioneScuole().getCodMec()+' + AND iscr.FS_ISCR_AS='+iscrFilter.getAnnoScolastico()+' ; if(iscrFilter.getPlessoId()!=null !iscrFilter.getPlessoId().equals(-1)) ... etc etc } else { } } } �...@override protected void onError(AjaxRequestTarget target) { myWhere = WHERE 1=0; target.addComponent(feedbackPanel); } });* The first time i download the report i obtain an empty report, because empty parameters. The second time i obtained the report with th first submit parameter end then and then... can you help? thanks a lot Luca 2009/3/5 Jonas barney...@gmail.com If it is the browser that caches the report, you can work around this by adding something random to the url generated by ResourceLink#getUrl, similar to what's done in NonCachingImage. urlFor(IResourceListener.INTERFACE) + wicket:antiCache= + System.currentTimeMillis() Unfortunatly, ResourceLink#getUrl is final, so you'll probably have to create your own Link subclass similar to ResourceLink On Thu, Mar 5, 2009 at 4:33 PM, Luca Provenzani eufor...@gmail.com wrote: in this way it works, but how can i refresh the report when parameter is changed? Until now i change parameter into the onclick of the ResourceLink, but now the resource is cached...and then the result report is ever the same.. thanks Luca 2009/3/5 Jonas barney...@gmail.com Does it work if you set your Resource setCacheable(true)? On Thu, Mar 5, 2009 at 3:21 PM, Luca Provenzani eufor...@gmail.com wrote: Hi all This is my situation: i've a ResourceLink based on a JasperReport Resource(DynamicWebResource ) and all is ok until i use http. But if the web server uses https IE can't download the file. i searched in the web but i 've found only an e-mail with similar problem ( http://www.nabble.com/Download-Link-Problem-td14693760.html#a14693760 ), but no answer! Someone can help? Regards Luca - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: AjaxEditableLabel, Double type and comma / dot
What you can do is to provide you own Converter to the Label and do you own number parsing/formatting. In my experience it makes sense to strictly follow the formats defined by the locales, otherwise user will complain about unexpected results when entering numbers, e.g. if they use the character that you would expect as decimal separator as grouping char. On Fri, Feb 27, 2009 at 4:19 PM, Piller Sébastien pi...@hmcrecord.ch wrote: Hi all, I'd like to know if there is a way to make an AjaxEditableLabel accept either a comma or a dot as decimal separator. That field has a Double type. It works well but I have to insert a , as decimal separator (dots are not allowed), which is quite unusual. I know this is related to Locale, but is there an easy way? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: radio and radiogroup default checked not working?
Have you tried this: add models to the components (even though you don't use on them), and store the value associated with the Radio you want checked in the RadioGroup's model: final RadioGroupBoolean group = new RadioGroupBoolean(group, new Model(Boolean.TRUE)); RadioBoolean radio1 = new RadioBoolean(radio1, new Model(Boolean.TRUE)); radio1.add(new AjaxEventBehavior(onclick) { @Override protected void onEvent(AjaxRequestTarget target) { (do stuff) } }); RadioBoolean radio2 = new RadioBoolean(radio2, new Model(Boolean.FALSE)); radio2.add(new AjaxEventBehavior(onclick) { @Override protected void onEvent(AjaxRequestTarget target) { (do stuff) } }); group.add(radio1); group.add(radio2); add(group); On Fri, Feb 27, 2009 at 4:35 PM, francisco treacy francisco.tre...@gmail.com wrote: hi people, i'm quite puzzled with this little problem: i have two Radio buttons within a RadioGroup. both radios have an ajaxeventbehavior(onclick) attached to them, and there are no models backing those components. this works fine. my problem is i want the *first* option to be checked by default, but no matter what the second one gets checked by default in the browser. yes, i played around with *checked=checked* in my html but wicket always outputs *checked=checked* on the second radio button - and the browser (firefox) interprets that by checking the second one. code: final RadioGroupVoid group = new RadioGroupVoid(group); RadioVoid radio1 = new RadioVoid(radio1); radio1.add(new AjaxEventBehavior(onclick) { �...@override protected void onEvent(AjaxRequestTarget target) { (do stuff) } }); RadioVoid radio2 = new RadioVoid(radio2); radio2.add(new AjaxEventBehavior(onclick) { �...@override protected void onEvent(AjaxRequestTarget target) { (do stuff) } }); group.add(radio1); group.add(radio2); add(group); span wicket:id=group input type=radio wicket:id=radio1 checked=checked / Discussie input type=radio wicket:id=radio2 / Opiniepeiling /span wicket outputs: input type=radio wicket:id=radio1 checked=checked id=radio122 name=tabs:panel:group value=radio63 onclick=var wcall=wicketAjaxGet('?wicket:interface=:4:tabs:panel:group:radio1:1:IBehaviorListener:0:',null,null, function() {return Wicket.$('radio122') != null;}.bind(this));/ Discussie input type=radio wicket:id=radio2 id=radio223 name=tabs:panel:group value=radio64 checked=checked onclick=var wcall=wicketAjaxGet('?wicket:interface=:4:tabs:panel:group:radio2:1:IBehaviorListener:0:',null,null, function() {return Wicket.$('radio223') != null;}.bind(this));/ Opiniepeiling any ideas of what could be going wrong? thanks in advance, francisco - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to send serialize/byteArrayOutput stream from wicket page
I think the wicket way to do this is using a org.apache.wicket.markup.html.WebResource (or any of its subclasses) instead of a WebPage On Thu, Feb 26, 2009 at 10:45 AM, freak182 eman.noll...@gmail.com wrote: Hello, How can i send a serialize object using byteArrayOutput stream in wicket page. here is my code: public class BridgeIndex extends WebPage { public BridgeIndex() { final HttpServletResponse response = getWebRequestCycle().getWebResponse().getHttpServletResponse(); ObjectOutputStream out = null; final ByteArrayOutputStream byteObj = new ByteArrayOutputStream(); final BridgeObject bObj = new BridgeObject(); bObj.setPassword(123456); bObj.setUsername(test); try { out = new ObjectOutputStream(byteObj); log.info(Serializing the object...); // serialize the object out.writeObject(bObj); response.setHeader(Cache-Control, no-store); response.setHeader(Pragma, no-cache); response.setContentType(application/octet-stream); final ServletOutputStream outstream = response.getOutputStream(); outstream.write(byteObj.toByteArray()); outstream.flush(); outstream.close(); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } } ...i get this error ERROR - WicketFilter - closing the buffer error java.lang.IllegalStateException: STREAM at org.mortbay.jetty.Response.getWriter(Response.java:586) at org.apache.wicket.protocol.http.WebResponse.write(WebResponse.java:355) at org.apache.wicket.protocol.http.BufferedWebResponse.close(BufferedWebResponse.java:73) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:371) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) ...i want to access user object to the separate application..tnx. Thanks a lot. Cheers. -- View this message in context: http://www.nabble.com/How-to-send-serialize-byteArrayOutput-stream-from-wicket-page-tp0804p0804.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Is it worth to exchange labels by wicket:message?
I don't think its relevant for performance/memory, the overhead for dynamically creating a component for the label should be minmal. check out WicketMessageTagHandler to see the actual 'magic' On Tue, Feb 10, 2009 at 10:51 AM, Newgro per.new...@gmx.ch wrote: Hi *, i investigate some alternatives to achieve same goal in wicket. One i've found here http://cwiki.apache.org/WICKET/general-i18n-in-wicket.html Exchanging the label components by wicket:messages has the advantage of less code. But is this relevant for performance and memory usage to? Has someone done some tests on this way already? I only want to be sure that effort of exchange is ok, if i decide to do it. Thanks for help Per -- View this message in context: http://www.nabble.com/Is-it-worth-to-exchange-labels-by-wicket%3Amessage--tp21930543p21930543.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Check if file exists?
Not really related to wicket... Anyway, check javax.servlet.ServletContext#getResourcePaths(String path) On Mon, Feb 9, 2009 at 12:51 PM, dsj deusd...@gmail.com wrote: Hi, how to check if one image exists in my app-folder? or in other way: how to check if any file exist im my Web-app\images? I am using wicket 1.3.4 e tomcat v6.0. Thx. -- View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Check if file exists?
I assume you've tried to cast the wicket Request to a servlet request? Maybe you should try and ask google on how to access the servlet request from a wicket request: http://www.google.com/search?q=wicket+HttpServletRequest On Mon, Feb 9, 2009 at 1:31 PM, dsj deusd...@gmail.com wrote: I try this. I have put the servlet.api in my build classpath and try, but wicket claim that not possible cast to servlet anyway. btw, this is a dependence feature of the container? Jonas-21 wrote: Not really related to wicket... Anyway, check javax.servlet.ServletContext#getResourcePaths(String path) On Mon, Feb 9, 2009 at 12:51 PM, dsj deusd...@gmail.com wrote: Hi, how to check if one image exists in my app-folder? or in other way: how to check if any file exist im my Web-app\images? I am using wicket 1.3.4 e tomcat v6.0. Thx. -- View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21911335.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Check-if-file-exists--tp21911335p21911898.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to get at the 404 request URL?
Hi, this isn't actually related to wicket, but anyway, I think what you're looking for is the servlet request attribute javax.servlet.error.request_uri See: http://www.servlets.com/soapbox/servlet23.html specially the section 'New error attributes' regards, Jonas On Fri, Feb 6, 2009 at 3:28 PM, Jörn Zaefferer joern.zaeffe...@googlemail.com wrote: Hi, I'm using a servlet error-page mapping to display my custom NotFound page for 404s (eg. as described here: http://herebebeasties.com/2006-12-20/using-a-servlet-filter-for-404-error-page/) filter-mapping filter-namewicket-filter/filter-name url-pattern/*/url-pattern dispatcherREQUEST/dispatcher dispatcherERROR/dispatcher /filter-mapping error-page error-code404/error-code location/404/location /error-page I have some anlayzing code on my NotFound page to check where the 404 occured, eg. by looking at the referrer and logging the request URI. This works when I use setResponsePage(NotFound.class) in other pages, but not for the error-page mapping, as HttpServletRequest#getRequestURI() returns just /404, which isn't helping at all. Any ideas on how to get at the original URI that triggered the 404? Jörn - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Bug? RenderedDynamicImageResource.render only called once?
I think RenderedDynamicImageResource is for images that don't change during one jvm runtime. The displayed image is basically 'static'. If you want to change the contents of the image, extend DynamicImageResource directly instead of RenderedDynamicImageResource, that should do the trick. cheers, Jonas On Mon, Feb 2, 2009 at 4:08 PM, Brill Pappin br...@pappin.ca wrote: Ok, I've tracked down the problem, but don't know how to resolve it (I've been playing with it a bit). the render method is only being called once per session despite the cache==false (RenderedDynamicImageResource. render(Graphics2D) This doesn't jive with what I understand for the documentation. Is this a bug or by design? If its by design, what *should* I be using instead? - Brill On 30-Jan-09, at 5:26 PM, Brill Pappin wrote: I have a RenderedDynamicImageResource thats rendering a barcode, however I'm having trouble with it in that it only ever renders one image per session. The resource has been added to: [Application].getSharedResources().add( CommonPage.class, barcodeResource, null, null, new BarcodeImageResource(UnitConv.mm2px(100, 73), UnitConv .mm2px(100, 73))); I have set the resource up as: setCacheable(false) and i reset the last modified time when i render as: setLastModifiedTime(Time.now()); I'm using 1.4-SNAPSHOT Doe anyone have any idea how I can get this darn thing to return a new image on every request - Brill - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: UTF-8 bug in wicket? Or in Tomcat?
Hi Philipp, yes, thats correct. We had similar problems and fixed it that way, but maybe something else is still not set to UTF-8. I assume you have configured your tomcat connector using URIEncoding=UTF-8 (I think that is what Johan is referring to?). Have you tried adding a meta tag to your markup? Something like [meta http-equiv=Content-Type content=text/html; charset=UTF-8 /] cheers, Jonas On Fri, Jan 30, 2009 at 9:11 AM, Philipp Daumke dau...@averbis.de wrote: Hi Jonas, thanks for your help, but I think it doesn't help. Just to make sure that I understood the Application#init correctly, you meant to do it like this, right(?): public class MyApp extends WebApplication { public void init() { getRequestCycleSettings().setResponseRequestEncoding(UTF-8); getMarkupSettings().setDefaultMarkupEncoding(UTF-8); } public Class getHomePage() { return Index.class; } } Still, it seems to convert my code from latin1 to utf8, even though I enter utf8-text. Thanks for further help Philipp Hi, have you tried setting getRequestCycleSettings().setResponseRequestEncoding(UTF-8); getMarkupSettings().setDefaultMarkupEncoding(UTF-8); in your Application#init If you don't set the default markup encoding explicitly, the default for it is the 'os provided encoding' (see: IMarkupSettings#getDefaultMarkupEncoding) cheers, Jonas On Fri, Jan 30, 2009 at 1:02 AM, Philipp Daumke dau...@averbis.de wrote: Hi Mathias, 'äöü' is actually already converted to 'äöü' when I add a breakpoint at the onSubmit method of my form (so right when I get the input of the text field from my model). My whole eclipse is in UTF-8, Wicket writes UTF-8 to each HTML-Page, my firefox says UTF-8. What I think is that Wicket or Tomcat treats my UTF8-String äöü as an ISO-8859-1 String and converts it from iso to utf8, so into 'äöü'. When I copy 'äöü' into a tmp.txt file in unix-shell which is in UTF-8 and do an iconv -futf8 -tlatin1 tmp.txt on it, the output is 'äöü' again. Any idea what to do? All the best Philipp Do you save it to a database and then display the text? How do you present it? -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: UTF-8 bug in wicket? Or in Tomcat?
Hi, have you tried setting getRequestCycleSettings().setResponseRequestEncoding(UTF-8); getMarkupSettings().setDefaultMarkupEncoding(UTF-8); in your Application#init If you don't set the default markup encoding explicitly, the default for it is the 'os provided encoding' (see: IMarkupSettings#getDefaultMarkupEncoding) cheers, Jonas On Fri, Jan 30, 2009 at 1:02 AM, Philipp Daumke dau...@averbis.de wrote: Hi Mathias, 'äöü' is actually already converted to 'äöü' when I add a breakpoint at the onSubmit method of my form (so right when I get the input of the text field from my model). My whole eclipse is in UTF-8, Wicket writes UTF-8 to each HTML-Page, my firefox says UTF-8. What I think is that Wicket or Tomcat treats my UTF8-String äöü as an ISO-8859-1 String and converts it from iso to utf8, so into 'äöü'. When I copy 'äöü' into a tmp.txt file in unix-shell which is in UTF-8 and do an iconv -futf8 -tlatin1 tmp.txt on it, the output is 'äöü' again. Any idea what to do? All the best Philipp Do you save it to a database and then display the text? How do you present it? -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Render other components
Hi, I somehow doubt this is considered good practice to let one component know where in the component tree another component is situated. The code you propose breaks very easily e.g. if you introduce another container around the ADDT. Why don't you just pass the ADDT instance into the AjaxLink? something like: final AjaxFallbackDefaultDataTable myADDT = ... AjaxLink link = new AjaxLink(link, new PropertyModel(obj, id)) { public void onClick(AjaxRequestTarget target) { target.addComponent(myADDT); } } ...but I'm not sure if that's a better practice. At least this doesn't break as easily if you change the position of the ADDT in the component tree. Maybe a core-dev could shed some light on this issue? cheers, Jonas On Tue, Jan 27, 2009 at 2:21 PM, Philipp Daumke dau...@averbis.de wrote: Hi all, I finally my error and post the working solution. I need to use a colon : to find children. AjaxLink link = new AjaxLink(link, new PropertyModel(obj, id)) { public void onClick(AjaxRequestTarget target) { Page page = target.getPage(); AjaxFallbackDefaultDataTable myADDT= (AjaxFallbackDefaultDataTable) page.get(tabs:panel:relTable); target.addComponent(myADDT); } } For tabs, panel and relTable I put setOutputMarkupId(true); (don't know whether this was necessary). Philipp Dear Cemal, thanks for your fast help. You understood what I meant but I still have the problem, that I don't know how to get the instance myADDT. I tried Page page = target.getPage(); AjaxFallbackDefaultDataTable myADDT= (AjaxFallbackDefaultDataTable) page.get(relTable); but get myADDT=null. Probably because relTable is something like the 2nd or 3rd ancestor on that page (see below)? Thanks for your help again Philipp My Main HTML-Page Index.html: ... span wicket:id=tabs class=tabpanel/span ... Includes this subpage Index$TabPanel1.html wicket:panel table class=relTable cellspacing=0 wicket:id=relTable[table]/table (wicket:panel Philipp, I'm not sure I have fully understood what you are after but it may be that something as straight forward as making the component to be added (ADDT) invisible - setVisible(false) - when first added to its parent (eg the page) and making it visible in your AjaxLink (AL) onClick implementation. Don't forget to setOutputMarkupPlaceholderTag(true) as well as setOutputMarkupId(true) on your ADDT and to add the ADDT to the AjaxRequestTarget - target.addComponent(myADDT) - in that onClick method. Regards - Cemal http://www.jWeekend.co.uk jWeekend Philipp Daumke-2 wrote: Dear all, I look for an example how to render Wicket-Components (in my case an AjaxDefaultDataTable) triggered by other Components (in my case AjaxLink). In my case the two components are defined in different Java-Classes. I looked for a while in the examples and in the wiki, but coudln't find anything. I appreciate your help or just a few links to some examples! All the best Philipp To make a silly example, I look for something like: class1 AjaxLink link = new AjaxLink(link, new PropertyModel(obj, id)) { public void onClick(AjaxRequestTarget target) { getComponent(myAjaxDefaultDataTable).render(); } }; ... class2 ... add(new AjaxFallbackDefaultDataTable(myAjaxDefaultDataTable, columns, relationProvider, 20) { { setOutputMarkupId(true); } }); -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Averbis GmbH c/o Klinikum der Albert-Ludwigs-Universität Stefan-Meier-Strasse 26 D-79104 Freiburg Fon: +49 (0) 761 - 203 6707 Fax: +49 (0) 761 - 203 6800 E-Mail: dau...@averbis.de Geschäftsführer: Dr. med. Philipp Daumke, Kornél Markó Sitz der Gesellschaft: Freiburg i. Br. AG Freiburg i. Br., HRB 701080 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where to process PageParameters
Ok, I'll use the onBeforeRender() method. I just found the corresponding section in Wicket in Action. Thank you. Jonas - Original Message - From: Jeremy Thomerson [mailto:jer...@wickettraining.com] To: users@wicket.apache.org Sent: Wed, 14 Jan 2009 20:36:22 +0100 Subject: Re: Where to process PageParameters Yes - typically it is a good idea to do things like service-layer / database access inside the model or inside onBeforeRender / isVisible, etc, rather than doing your business logic and calling setVisible(), etc. One of the main reasons for this is that if you don't, your page won't work properly when you click a link that modifies something on the page - because it doesn't reconstruct the page, and therefore you don't refresh the data in your components. On Wed, Jan 14, 2009 at 11:09 AM, behrica carsten.behr...@efsa.europa.euwrote: Hello, I do something similar in a page constructor, even with accessing the service layer. I have the same concerns, if this is correct. In general I do not like if a constructor does any significant (eventually time consuming) work like database access or other. But I did not find an other solution neither. Maybe it could be postponed by using a model which executes the needed calls to the service layer in an lazy fashion. Carsten Jonas505 wrote: Thank you for the quick reply. It's already working fine, I was just wondering if it is best practice to call business logik from the constructor: public PageB(PageParameters p) { // can throw an exception: DataSet result = callMyBusinessLogik(p.getString(param1), p.getString(param2)); preparePageBComponents(result); } Jonas From: Martijn Dashorst 14 Jan 2009 14:24:21 +0100 Subject: Re: Where to process PageParameters setResponsePage(PageB.class, parameters); or use a bookmarkablepagelink Martijn On Wed, Jan 14, 2009 at 1:06 PM, Jonas505 jonas.hoepf...@iteratec.de wrote: Hello, I would like to know, where in my WebPage class PageParameters should be processed. I have a page A where you can fill in certain parameters (or select a predefined set of parameters). Then you submit those parameters which are given to the business logic to prepare some data. The resulting data is shown on page B. I would like that the user can bookmark page B with those parameters encoded in the URL. This works fine with page B having a constructor taking PageParameters. However, right now I call the Business-Logik from the constructor of page B, which seems strange. Am I missing something or is this the way to go? Thank you! Jonas -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21454742.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21460425.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Jeremy Thomerson http://www.wickettraining.com - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
IBehaviors added to ComponentTag not detached
While experimenting with MarkupFilters, I noticed that IBehaviors added to ComponentTag using ComponentTag#addBehavior(IBehavior behavior) are never detached. Is that a bug, or just not possible to do? As far as I can see you don't have ComponentTags available anymore when Components are detached... Furthermore, it seems that their enablement is also ignored, they're always treated as enabled in Component#renderComponentTag(...). cheers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: IBehaviors added to ComponentTag not detached
Maybe I'm missing something, but looking at the code again (Wicket 1.3.5), Component#renderComponentTag(...) seems to be the only place where Behaviors added to ComponentTags are dealt with. I can't find any code where they would be added to the Component. I also verfied again, IBehavior#detach(...) seems never to be called if the behavior is added to the ComponentTag. I verified that using a MarkupFilter that adds a behavior to every tag that would log a debug text if detach (or isEnabled) was ever called. Thanks for your time. Jonas On Thu, Jan 15, 2009 at 5:19 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote: behaviors added to componenttag are in turn added to components, so they are detached and managed by components no the componenttag they are added to. -igor On Thu, Jan 15, 2009 at 8:16 AM, Jonas barney...@gmail.com wrote: While experimenting with MarkupFilters, I noticed that IBehaviors added to ComponentTag using ComponentTag#addBehavior(IBehavior behavior) are never detached. Is that a bug, or just not possible to do? As far as I can see you don't have ComponentTags available anymore when Components are detached... Furthermore, it seems that their enablement is also ignored, they're always treated as enabled in Component#renderComponentTag(...). cheers - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Where to process PageParameters
Thank you for the quick reply. It's already working fine, I was just wondering if it is best practice to call business logik from the constructor: public PageB(PageParameters p) { // can throw an exception: DataSet result = callMyBusinessLogik(p.getString(param1), p.getString(param2)); preparePageBComponents(result); } Jonas From: Martijn Dashorst 14 Jan 2009 14:24:21 +0100 Subject: Re: Where to process PageParameters setResponsePage(PageB.class, parameters); or use a bookmarkablepagelink Martijn On Wed, Jan 14, 2009 at 1:06 PM, Jonas505 jonas.hoepf...@iteratec.de wrote: Hello, I would like to know, where in my WebPage class PageParameters should be processed. I have a page A where you can fill in certain parameters (or select a predefined set of parameters). Then you submit those parameters which are given to the business logic to prepare some data. The resulting data is shown on page B. I would like that the user can bookmark page B with those parameters encoded in the URL. This works fine with page B having a constructor taking PageParameters. However, right now I call the Business-Logik from the constructor of page B, which seems strange. Am I missing something or is this the way to go? Thank you! Jonas -- View this message in context: http://www.nabble.com/Where-to-process-PageParameters-tp21454742p21454742.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.5 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: continueToOriginalDestination and POST
I found a JIRA issue was filed for this a while back: https://issues.apache.org/jira/browse/WICKET-1703 ...but it hasn't been addressed yet... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Always serialize pages for debug purposes
It seems this feature was removed, but there's some javadoc left in org.apache.wicket.settings.IDebugSettings: [quote] iserializeSessionAttributes/i (defaults to true in development mode) - Causes the framework * to serialize any attribute put into session - this helps find Not Serializable errors early [/quote] On Mon, Aug 11, 2008 at 3:30 PM, Thomas Mäder [EMAIL PROTECTED] wrote: Yeah, but wasn't there official support for that? And if not, wouldn't this be useful for debug? Thomas 2008/8/11 Uwe Schäfer [EMAIL PROTECTED] Thomas Mäder schrieb: I seem to remember that there was a way to force Wicket to always serialize pages on detach in order to make sure every page is serializable during development. Can someone please point me to the FM so I can read it? Searching Nabble Google didn't turn up anything. one guy once posted this one: snip - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to get the remote address (IP)
Is your browser running on the same machine as the webserver? If so, you might want to read this: http://en.wikipedia.org/wiki/IPv6#Special_addresses On Tue, Jul 29, 2008 at 1:48 PM, Kaspar Fischer [EMAIL PROTECTED] wrote: On 29.07.2008, at 12:53, Hoover, William wrote: did you try getRequestCycleSettings().setGatherExtendedBrowserInfo(true); in your WebApplication? William, thanks for your answer. I indeed did not set this in my application. But if I do, I still obtain the same result. However, isn't there a cheap way to obtain the client's IP? If possible, I'd like to avoid gathering extended browser info. - 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: users, please give us your opinion: what is your take on generics with Wicket
1) Generifying* Wicket [X] Can best be done in a limited fashion, where we only generify IModel but not components. I care more about what generifying can do for API clarity (declaring a component to only accept certain models for instance) than static type checking. 2) How strongly do you feel about your choice above? [X] Whatever choice ultimately made, I'll happily convert/ start using 1.4 and up. IMHO generifying component adds too much verbosity, considering a lot of components don't even have a model. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Stress
I've run into similar problems once, I think what fixed it was setting IMarkupSettings#setDefaultMarkupEncoding to utf-8 as well. If not set explicitly, the encoding of the os is used, which probably doesn't handle french accents correctly, e.g. if it's an english os. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with Stress
meta http-equiv=Content-Type content=text/html; charset=UTF-8 / does the actual http header also say this? afair having this line in the html isn't enough to have contents treated as utf-8 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how can ..
Have you looked in the wiki? http://cwiki.apache.org/WICKET/reference-library.html This might be what you're looking for: http://cwiki.apache.org/WICKET/seo-search-engine-optimization.html On Fri, May 23, 2008 at 9:46 AM, Tomasz Prus [EMAIL PROTECTED] wrote: My boss wants such urls 2008/5/23 Tomasz Prus [EMAIL PROTECTED]: Do You know SEO optimized urls like http://www.nabble.com/Page-reload-after-file-upload-td15869570.html ? 2008/5/23 Thomas Mäder [EMAIL PROTECTED]: What are you trying to achieve? Why do you need a text url instead of a link to a page? Thomas On Fri, May 23, 2008 at 9:07 AM, Tomasz Prus [EMAIL PROTECTED] wrote: How can i prepare url like this: ../London/9.html I need that city and advertNumber parameters be always at the end of url. Can You help me? - 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: ssl post to creditor company
I'm not familiar with your HttpClient class, but I have used java.net.HttpURLConnection as (very simple...) http client in the past, which can be instructed to follow redirects. You can create one of those using java.net.URL(http://whatever.com/;).openConnection(). You'll probably have to format/encode the parameters in the message body yourself, HttpURLConnection won't do that for you. But that shouldn't be too hard... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Support for option disabled=disabled
To have more control over the options, you have to use org.apache.wicket.extensions.markup.html.form.select.Select There's a usage example in the javadoc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Select CheckGroup with Button instead of CheckGroupSelector
I think if you add 'return false;' to your javascript, the button's default click action (submitting a form) isn't executed, so your DataTable doesn't get refreshed. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket applet issue
It's not wicket that is looking for classes, it's your browser's java plugin. If you use the archive attribute like you do, the jars are searched in the same 'directory' as the page is where the applet tag is defined. e.g. www.example.com/foo/bar/appletpage.html contains your code, your java plugin searches the jars as www.example.com/foo/bar/jfreechart-1.0.8.jar etc. so, you need to make sure the jar urls are correct, e.g. by defining the jar urls relative or fully qualified using an AttributeModifier for the archive attribute (for wicket 1.3 at least, i'm not familiar with 1.2). On Dec 5, 2007 4:20 PM, zandile [EMAIL PROTECTED] wrote: I have been trying all sorts of work arounds to include an applet into wicket: I keep getting an classnotfoundexception in the java console for the applet. I am running wicket 1.2.6 and I am not sure what exactly is wrong with this, My applet runs fine when I run it in eclipse using the applet viewer but when I stick it into a page then I get the classnotfoundexception ??? applet code=com.test.AppletForm.class width=600 height=300 archive=jfreechart-1.0.8.jar, jcommon-1.0.12.jar /applet How exactly does wicket go about looking for classes? Help appreciated.. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display enum in a RadioChoice
Hi, some constructors of RadioChoice take a org.apache.wicket.markup.html.form.IChoiceRenderer, which is used to render the choices. cheers, Jonas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display enum in a RadioChoice
Yes i've considered RadioGroup and Radio but my question was also for other components (in fact i need to set the class of option, and input tag and surrely many others) have a look at AttributeModifier and AttributeAppender. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Display enum in a RadioChoice
The 'br/' is the default suffix (see RadioChoice#setSuffix and RadioChoice#setPrefix). AFAIK there's no way to set a class attribute using RadioChoice. Have you considered using RadioGroup and Radio? They're much more flexible than RadioChoice. On Nov 27, 2007 2:56 PM, Gervais [EMAIL PROTECTED] wrote: Ok, thanks. But if i need to set a class name for each items how can i do that ? I need to get and output like that : input type=radio class=genre male ... / And maybe can i also remove the 'br /' between each radio ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: question about 'isInstantiationAuthorized' method, thanks!
However, I can't change the url for 'Return to home page' link, as the homepage is a jsp page but 'Return to home page' link just send me to the default wicket homepage which specifed in xml file right? I wonder is there a way to change it as I am working with some jsp pages. You could use Application.getApplicationSettings().setAccessDeniedPage(Class klazz) to change the access denied page to a custom page which contains the link to you jsp page. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Locale change on Image with Resource results in broken images
Hi, I have a DynamicImageResource subclass that I add to an Image using the Image(String id, Resource imageResource) constructor. This works fine as long as the Locale of my Image doesn't change or isn't 'lost' because of serialization (it's for reasons I don't understand a transient field, see https://issues.apache.org/jira/browse/WICKET-1062 ). In that case, LocalizedImageResource.setSrcAttribute(...) sets the resource to null, so my precious resource is lost and the result is lots of broken images. I think LocalizedImageResource.setSrcAttribute(...) shouldn't reset the resource field if locales (and styles) don't match, since Resource doesn't seem to be locale/style specific (unlike ResourceReference) and cannot be reloaded/recomputed as the commentary suggests if the Image(String id, Resource imageResource) constructor was used. Any ideas how to work around that problem? Can anyone confirm that this is a bug? In that case, I'll create an issue on JIRA. cheers, Jonas
Re: User-defined variables in ConversionException
No opinions on that one? So, would anyone mind if I create a 'New Feature' Issue in JIRA? On 9/11/07, Jonas [EMAIL PROTECTED] wrote: Hi, wouldn't it make sense that you could set arbitrary variables on a ConversionException that would also be set on the ValidationError created in FormComponent#convertInput()? Currently, you can set the resource key that should be used for the error message, but you're limited to the few variables defined in FormComponent#convertInput(). I know I could override convertInput(), but I think user-defined variables would be a more elegant solution. What do you think? cheers, Jonas
Re: User-defined variables in ConversionException
I created https://issues.apache.org/jira/browse/WICKET-961 which also contains a patch against current trunk. cheers, Jonas On 9/12/07, Martijn Dashorst [EMAIL PROTECTED] wrote: Nope go ahead. If someone does mind, the issue is quickly closed ;) Martijn On 9/12/07, Jonas [EMAIL PROTECTED] wrote: No opinions on that one? So, would anyone mind if I create a 'New Feature' Issue in JIRA? On 9/11/07, Jonas [EMAIL PROTECTED] wrote: Hi, wouldn't it make sense that you could set arbitrary variables on a ConversionException that would also be set on the ValidationError created in FormComponent#convertInput()? Currently, you can set the resource key that should be used for the error message, but you're limited to the few variables defined in FormComponent#convertInput(). I know I could override convertInput(), but I think user-defined variables would be a more elegant solution. What do you think? cheers, Jonas -- 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: Localizer warnings
The warning shows up in beta3 way more often than it should. Check this thread: http://www.nabble.com/Localizer-warning-in-1.3.0-beta3-tf4353820.html On 9/12/07, Leszek Gawron [EMAIL PROTECTED] wrote: I keep getting a lot of these after upgrading to 1.3-beta3 WARN 2007-09-12 12:49.41:532 [Localizer] Tried to retrieve a localized string for a component that has not yet been added to the page. This can sometimes lead to an invalid or no localized resource returned. Make sure you are not calling Component#getString() inside your Component's constructor. Offending component: [Page class = com.mobilebox.indigo.web.configurator.page.WelcomePage, id = 7, version = 0] I am not calling Component#getString() AFAIK, so what should I be looking for? -- Leszek Gawron http://www.mobilebox.pl/krs.html CTO at MobileBox Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regression in 1.3.0-beta3(?)
We've run into the same issue after upgrading to beta3. We had to replace AjaxFallbackOrderByBorder with a 'normal' OrderByBorder to make our web app work again. Unfortunatly, I haven't been able to come up with a simple example that reproduces the problem. Have you? Johannes Schneider-3 wrote: org.apache.wicket.markup.MarkupException: Expected close tag for -- View this message in context: http://www.nabble.com/Regression-in-1.3.0-beta3%28-%29-tf4346638.html#a12406487 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: Regression in 1.3.0-beta3(?)
I've been able to reproduce the problem with a these few classes: http://www.nabble.com/file/p12409279/Expected_close_tag.zip Expected_close_tag.zip It seems to be caused by the problem that BorderBodyResolver warns about: Unlike OrderByBorder, AjaxFallbackOrderByBorder doesn't add the BorderBodyContainer so it fits the markup. Now, if AjaxFallbackOrderByBorder is wrapped in another Border (as in my attached example), we don't get that nice log message, instead we get that 'Expected close tag for ...' message. So, it seems https://issues.apache.org/jira/browse/WICKET-166 actually IS relevant for wicket 1.3.0. (Of course the fix looks now different because of the api change) cheers, Jonas igor.vaynberg wrote: hmm, if you could create a quickstart for this it would be very helpful. -igor -- View this message in context: http://www.nabble.com/Regression-in-1.3.0-beta3%28-%29-tf4346638.html#a12409279 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]