Re: setResponsePage + anchor
Hi Janos, Thanks for your response. That's an interesting solution to the problem! I have been digging through the setResponsePage etc code, trying to find a way to fit this into the framework directly, and have come up empty-handed. It would seem logical to me that there should be a way to specify either a String id or a Component directly inside the request target, but I can't see how to fit it in. It looks like your solution is the best available at the moment. Regards, Charlie. 2008/12/4 Cserep Janos cser...@szeretgom.hu I'm doing it like this from my Page: @Override public void renderHead(IHeaderResponse response) { if (anchor != null) { response.renderOnLoadJavascript(location.href='# + anchor + ';); anchor = null; } } Just have a setter for the anchor property on the Page instance you pass to setResponsePage(). janos On Thu, Dec 4, 2008 at 1:53 PM, Charlie Dobbie cfmdob...@gmail.com wrote: Hi, I know you can set an anchor when you are coming from a Link component, but how can I set an anchor without the Link? From a Button's onSubmit, I am calling setResponsePage with a Page instance, and have a reference to a component on that page that I would like the browser to jump directly to. From my research so far, I don't believe this to be possible, but easily could have missed something! Is there a way to do this? Regards, Charlie. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
setResponsePage + anchor
Hi, I know you can set an anchor when you are coming from a Link component, but how can I set an anchor without the Link? From a Button's onSubmit, I am calling setResponsePage with a Page instance, and have a reference to a component on that page that I would like the browser to jump directly to. From my research so far, I don't believe this to be possible, but easily could have missed something! Is there a way to do this? Regards, Charlie.
Thank you for wicketstuff-annotation!
I recently encountered the wicketstuff-annotation project, and now mount all my pages via annotations. Thank you for this project! Gets a lot of Page configuration out of the Application subclass and back to where it should be. After seeing the mount scanner, I was very pleased to note that the same approach would solve another issue I have. In my Application subclass I always have a list of annotated Hibernate classes that need to be added to the AnnotationConfiguration. While in heavy development, I'm adding new domain objects all the time, and frequently forget to add them to this list, adding up to lots of minor frustrations. But not any more - using the MatchingResources class from wicketstuff-annotations, seven lines of code solved that one for good: MatchingResources resources = new MatchingResources(classpath*:uk/co/mypackagestructure/data/**/*.class); ListClass? extends Annotation hibernateClasses = new ArrayListClass? extends Annotation(); hibernateClasses.add(Entity.class); hibernateClasses.add(MappedSuperclass.class); for(Class? extends Annotation hibernateClass : hibernateClasses) { for(Class? c : resources.getAnnotatedMatches(hibernateClass)) { config.addAnnotatedClass(c); } } Hurrah! Charlie.
Re: Overriding builtin error messages
Unless I'm missing something, hopefully your wicket:id in markup matches the id you're giving the component... :-) Charlie. 2008/11/11 Steve Swinsburg [EMAIL PROTECTED] Ah so is the form-id in the docs the wicket:id which is static in the HTML or is it the markup id of the form which is dynamic? Does this then mean that in my Application properties I should put: myForm.uploadTooLarge=No way dude, far too large! What about including the actual size ( ie 2M) like the Form component does? cheers, Steve 4 (0) 1524 594870 On 11 Nov 2008, at 15:55, [EMAIL PROTECTED] wrote: How dynamic is your form's id? Shouldn't be static because of HTML reference? On Nov 11, 2008 1:53pm, Steve Swinsburg [EMAIL PROTECTED] wrote: I'd like to override the default form feedback messages (also so I can localise them). ie 'Upload must be less than' In Form.java I found this : // Resource key should be .uploadTooLarge to // override default message But I'm still not sure how to override it in a Properties file if the form-id is dynamic? Any help much appreciated. Steve
Re: Use provided head section
As default, anything in a wicket:head section gets included on the page. See the following: http://cwiki.apache.org/WICKET/wickets-xhtml-tags.html#Wicket%27sXHTMLtags-Elementwicket:head Otherwise, I'd say look into IHeaderContributor. --Charlie. 2008/11/10 Thies Edeling [EMAIL PROTECTED] Hello, At my current project the header and footer of each page is generated by a CMS, Fatwire, and provided as plain html. The generated header includes the head section (with lots of javascript/css includes) and some layout tags. In a JSP application the header/footer were jsp:included and any javascript/css files the application needed would be statically added in the CMS itself. How to do this with Wicket? Contributions to the body of the html page is not a problem, I can parse them out of the provided html and add them as a Label or such but what's the best way to deal with a providedhead section ? gr, Thies
Re: File Chooser dialog needed
2008/11/7 Jeremy Thomerson [EMAIL PROTECTED] Depending on what you're doing, if you really had to do something with a directory, you may have to horror-music-starts use an applet /horror-music. Hope this helps. WicketMessage: Tag 'horror-music-starts' (line 2, column 27) has a mismatched close tag at '/horror-music' (line 3, column 1) ;-)
Re: Can we have a prefix in the subject line for any emails from this mailing list?
The list software produces a valid RFC 2919 List-Id header - any decent mail user agent should be able to filter based on that. As alluded to by Ryan, Gmail recognises this and will create a new filter in like three clicks. Charlie. 2008/9/10 Ryan Gravener [EMAIL PROTECTED] switch to gmail On Wed, Sep 10, 2008 at 12:43 PM, Vernon [EMAIL PROTECTED] wrote: Emails from this mailing list quickly jam up my email account. Since there isn't a filter for this email account, I have to move emails to another folder by hand. It would be very helpful if the subject line with a prefix like [wicket-user] so that I know what the email is about. Thanks.
Re: London Wicket Event, August 6 at Google, London
I'm in! You can't keep me away... To anyone who is undecided over whether or not to attend, I heartily recommend it. I think everyone comes away at least with some fresh ideas or an understanding of some aspect of Wicket they've not yet used, or they just benefit from talking to people tackling the same or similar problems as them. (And hey, there's always pizza as well.) Some of the previous presentations are available at the London Wicket site: http://www.londonwicket.org/ Charlie. 2008/7/10 jWeekend [EMAIL PROTECTED]: Al and I would like to invite those of you that can get to London on August 6 to our next London Wicket Event at Google's London office - thanks to all involved at Google (especially Al) for kindly hosting us and for the great support. We'll be posting details soon (we have some impressive presentations lined-up again). This post confirms the date and location. The http://jweekend.com/dev/LWUGReg/ registration/event details page should be updated by the time you click on this link ... you know the drill. Regards - Cemal http://jWeekend.co.uk - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: New to Wicket: Confused with versions, wicket-extensions, looking for date picker
There's a Datepicker component in the wicket-datetime package. If using Maven: dependency groupIdorg.apache.wicket/groupId artifactIdwicket-datetime/artifactId version1.3.4/version /dependency 2008/6/30 jdj [EMAIL PROTECTED]: Hello, I'm new to Wicket. I'm using Wicket 1.3.3. I'm looking for a date picker component for Wicket, and I noticed that there is one in the http://wicket.sourceforge.net/wicket-extensions/ wicket-extensions package. However, the information on that website seems to be out of date, it's about wicket-extensions 1.2 while the newest version in the Maven repository is wicket-extensions 1.3.3. In wicket-extensions 1.3.3, the DatePicker, which was in the package wicket.extensions.markup.html.datepicker in version 1.2, seems to be gone. I cannot find documentation for wicket-extensions 1.3.3 anywhere. Where is it? Is there a date picker component available in the current version of Wicket or Wicket Extenstions? If so, where can I find it? If not, then where can I find a date picker for Wicket? - 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
On Sun, Jun 1, 2008 at 9:44 PM, Eelco Hillenius [EMAIL PROTECTED] wrote: 1) Generifying* Wicket [X] Can best be done like currently in the 1.4 branch, where models and components are both generified. I care most about the improved static type checking generified models and components give Wicket. [half-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. [ ] Should be avoided, I prefer the way 1.3 works. Because... (fill in your opinion here). [ ] (anything other than these choices?) I see the stronger-typing made possible with Generics as a step forward for Java and for Wicket. I believe that Generics will improve my code, and make my life easier. I understand that actually implementing the Generified objects is harder than using them, and that this task rests mostly on the devs' shoulders! 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. [ ] I might rethink upgrading if my choice doesn't win. [ ] I definitively won't be using 1.4. if Wicket doesn't go for my preference. Whatever the devs decide, I'm not going to stop using Wicket (or refuse to upgrade forever more) just because they've not implemented something exactly the way I personally prefer! I have faith that, with discussion, the right decision will be made for the framework as a whole. After all, if I weren't happy to go along with the majority view, I'd have to write everything myself... Charlie. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DateTimeField and zero padding hours
I'm playing with the DateTimeField at the moment, and if I set the time to midnight I get 0 for hours and 00 for minutes. It makes sense to me to pad minutes out to two digits. Hours should arguably be padded out to two digits if you're in 24-hour mode, but the component doesn't do that at the moment. I've not seen the hours value disappearing when set to zero so far. Charlie. On Tue, Apr 15, 2008 at 7:59 AM, Johan Compagner [EMAIL PROTECTED] wrote: I dont know exatly dont see an example here, but i just guess you dont comply completely with the format and then the formatter just tries to interperd it. On 4/14/08, Federico Fanton [EMAIL PROTECTED] wrote: On Sat, 12 Apr 2008 18:25:56 +0200 Johan Compagner [EMAIL PROTECTED] wrote: I guess this has something to do with the format string that is used for your locale, just look int what dateformat is used in your case I'm sorry, but I cannot understand how the blank hours is related to a locale issue.. I'm looking at DateTimeField source right now, and while minutesField has a MINUTES_CONVERTER that does the zero-padding, hoursField has nothing like that.. Am I missing something? Many thanks for your attention. - 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: wicket.contrib.scriptaculous
Might want to double-check you've not got conflicting Wicket jars on your classpath. Charlie. On Fri, Apr 11, 2008 at 2:40 PM, Ryan Sonnek [EMAIL PROTECTED] wrote: hmmmthey worked the last time I checked. I'll try to take a look, but if you see anything that's obviously incorrect, let me know. On Fri, Apr 11, 2008 at 5:58 AM, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: When I try to run mvn jetty:run I get this error: 2008-04-11 12:56:38.642::WARN: failed wicketstuff-scriptaculous-examples org.apache.wicket.WicketRuntimeException: Application class wicket.contrib.scriptaculous.examples.ScriptaculousExamplesApplication must be a subclass of WebApplication at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:76) at org.apache.wicket.protocol.http.ContextParamWebApplicationFactory.createApplication(ContextParamWebApplicationFactory.java:49) at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:496) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:589) at org.mortbay.jetty.servlet.Context.startContext(Context.java:139) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) Are it broken intentionally? Or am I just doing something wrong? -- -Wicket for love Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684
Re: Render body only
Off Topic, but does anyone else apart from Scott and me get confused by this duality? Should I setProperty, or override getProperty? And the equally annoying Does getComponentX give me a reference to an already-created ComponentX, or do I override it to supply my own ComponentX? Charlie. On Thu, Apr 3, 2008 at 3:37 PM, Scott Sauyet [EMAIL PROTECTED] wrote: Jeremy Levy wrote: Did you try setRenderBodyOnly(true) ? D'Oh! No, I was looking to subclass and override getRenderBodyOnly(). Sheer brilliance! -- Scott
Customising DateTimeField
Hi all, Date handling in my application is rather shoddy at the moment, and I'm trying to clean it up and make things work properly. I've added wicket-datetime-1.3-SNAPSHOT and want to use the DateTimeField, but there are a couple of extra things I need that are stumping me at the moment. Firstly, I need to make the time fields mandatory, if and only if a date has been specified. (Unless forced, my users leave fields blank, making every date midnight of the specified day...) The hours and minutes fields are private, so I cannot access them to add any custom validation - is there any other way around this? Secondly, I need to provide a JavaScript link near the component which will automatically fill everything to the current date and time. I think I can provide this via a Behaviour as the input components have predictable DOM ids, but how can I get at the date format that the component is expecting? Or is this the wrong approach, and I should be doing something in Java via Ajax instead? Thanks for any thoughts on these, Charlie.
Re: Customising DateTimeField
Apologies, spoke too soon - my Behaviour idea is also a non-starter. They have predictable wicket:ids, but no DOM ids at all, so I cannot locate the fields via JavaScript. I'm guessing at this point that I should just copy the DateTimeField component entirely and modify to fit! :-) Charlie. On Wed, Mar 26, 2008 at 1:57 PM, Charlie Dobbie [EMAIL PROTECTED] wrote: Hi all, Date handling in my application is rather shoddy at the moment, and I'm trying to clean it up and make things work properly. I've added wicket-datetime-1.3-SNAPSHOT and want to use the DateTimeField, but there are a couple of extra things I need that are stumping me at the moment. Firstly, I need to make the time fields mandatory, if and only if a date has been specified. (Unless forced, my users leave fields blank, making every date midnight of the specified day...) The hours and minutes fields are private, so I cannot access them to add any custom validation - is there any other way around this? Secondly, I need to provide a JavaScript link near the component which will automatically fill everything to the current date and time. I think I can provide this via a Behaviour as the input components have predictable DOM ids, but how can I get at the date format that the component is expecting? Or is this the wrong approach, and I should be doing something in Java via Ajax instead? Thanks for any thoughts on these, Charlie.
WebPage.onDetach calls renderHead on all Components on the page?
Hi all, I've recently upgraded a 1.2.6 application to 1.3.1. This involved simultaneously upgrading libraries for Wicket, Databinder and Hibernate to name but three, so until my application settles, I'll never be sure which library is causing each issue! I'm getting the following exception in my logs on development, but not deployment: 25-Mar-2008 12:56:21 org.apache.wicket.RequestCycle detach SEVERE: there was an error cleaning up target [EMAIL PROTECTED] class = flow.pages.internal.job.ViewJob, id = 1, version = 0]-newDuplicationTaskLink-interface org.apache.wicket.markup.html.link.ILinkListener.ILinkListener (request paramaters: [RequestParameters componentPath=1:newDuplicationTaskLink pageMapName=null versionNumber=0 interfaceName=ILinkListener componentId=null behaviorId=null urlDepth=-1 parameters={} onlyProcessIfPathActive=false]). org.hibernate.PropertyValueException: not-null property references a null or transient value: flow.data.DuplicationTask.description at org.hibernate.engine.Nullability.checkNullability(Nullability.java :72) [...snip...] at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at flow.pages.internal.job.ViewJob$9.isVisible(ViewJob.java:219) at org.apache.wicket.Component.renderHead(Component.java:2528) at org.apache.wicket.markup.html.WebPage$1.component(WebPage.java:432) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java :821) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java :836) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java :861) at org.apache.wicket.markup.html.WebPage.onDetach(WebPage.java:425) at org.apache.wicket.Component.detach(Component.java:1075) at org.apache.wicket.request.target.component.PageRequestTarget.detach( PageRequestTarget.java:80) at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1046) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java :354) at org.apache.wicket.protocol.http.WicketFilter.doFilter( WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1084) [...snip...] I think my problem might be related to the onDetach method in WebPage. In this method, if there is an HtmlHeaderContainer, and if the application is in development mode, it visits all the components on the page and calls renderHead on each. I do not understand the intention behind that at all. Can anyone explain why it is doing what it is doing, and how I can avoid this Exception? Charlie. More detailed information if required: I have a page (ViewJob) which which has a Link whose onClick calls: HibernateObjectModel jobModel = (HibernateObjectModel)((IChainingModel)ViewJob.this.getModel()).getChainedModel(); WebPage responsePage = new NewDuplicationTask(jobModel); setResponsePage(responsePage); The constructor of the NewDuplicationTask page extracts the Job from the passed jobModel and calls duplicationTask.setJob(job). The DuplicationTask that it holds has a description property, which is initially null and is populated via a required field on the NewDuplicationTask page. However, the above Exception complaining about a null description property occurs at page display, way before the form could have been submitted. The Exception thrown is pointing to an isVisible check, on the page that the user has just left. The renderHead call mentioned above calls isVisible, and in my case I have a component whose visibility depends on whether or not a Job already exists in the database with the same job number. I believe this check is causing Hibernate to attempt to flush the Job back to the database, which then causes the Exception because the DuplicationTask that has just been added to the in-memory Job hasn't been completed yet. And certainly shouldn't be flushed to the database until the Submit button is finally pressed!
Re: WebPage.onDetach calls renderHead on all Components on the page?
Hi Johan and Maurice, Many thanks - I've upgraded to the 1.3-SNAPSHOT, and that has fixed my problem. (Anyone who finds this message looking for snapshot releases, check: http://wicket.apache.org/getting-wicket.html) Cheers, Charlie. On Tue, Mar 25, 2008 at 1:50 PM, Maurice Marrink [EMAIL PROTECTED] wrote: This has recently been fixed on trunk. You could either switch to version 1.3-SNAPSHOT or wait til 1.3.3 comes out. If you wait untill 1.3.3 you could work around the issue by either switching to deployment mode or catching the null in your code and then do nothing. Dammit Johan, could you not have waited 30 seconds :P Maurice On Tue, Mar 25, 2008 at 2:44 PM, Charlie Dobbie [EMAIL PROTECTED] wrote: Hi all, I've recently upgraded a 1.2.6 application to 1.3.1. This involved simultaneously upgrading libraries for Wicket, Databinder and Hibernate to name but three, so until my application settles, I'll never be sure which library is causing each issue! I'm getting the following exception in my logs on development, but not deployment: 25-Mar-2008 12:56:21 org.apache.wicket.RequestCycle detach SEVERE: there was an error cleaning up target [EMAIL PROTECTED] [Page class = flow.pages.internal.job.ViewJob, id = 1, version = 0]-newDuplicationTaskLink-interface org.apache.wicket.markup.html.link.ILinkListener.ILinkListener (request paramaters: [RequestParameters componentPath=1:newDuplicationTaskLink pageMapName=null versionNumber=0 interfaceName=ILinkListener componentId=null behaviorId=null urlDepth=-1 parameters={} onlyProcessIfPathActive=false]). org.hibernate.PropertyValueException: not-null property references a null or transient value: flow.data.DuplicationTask.description at org.hibernate.engine.Nullability.checkNullability( Nullability.java :72) [...snip...] at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java :305) at flow.pages.internal.job.ViewJob$9.isVisible(ViewJob.java:219) at org.apache.wicket.Component.renderHead(Component.java:2528) at org.apache.wicket.markup.html.WebPage$1.component(WebPage.java :432) at org.apache.wicket.MarkupContainer.visitChildren( MarkupContainer.java :821) at org.apache.wicket.MarkupContainer.visitChildren( MarkupContainer.java :836) at org.apache.wicket.MarkupContainer.visitChildren( MarkupContainer.java :861) at org.apache.wicket.markup.html.WebPage.onDetach(WebPage.java:425) at org.apache.wicket.Component.detach(Component.java:1075) at org.apache.wicket.request.target.component.PageRequestTarget.detach( PageRequestTarget.java:80) at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1046) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet( WicketFilter.java :354) at org.apache.wicket.protocol.http.WicketFilter.doFilter( WicketFilter.java:194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1084) [...snip...] I think my problem might be related to the onDetach method in WebPage. In this method, if there is an HtmlHeaderContainer, and if the application is in development mode, it visits all the components on the page and calls renderHead on each. I do not understand the intention behind that at all. Can anyone explain why it is doing what it is doing, and how I can avoid this Exception? Charlie. More detailed information if required: I have a page (ViewJob) which which has a Link whose onClick calls: HibernateObjectModel jobModel = (HibernateObjectModel)((IChainingModel)ViewJob.this.getModel()).getChainedModel(); WebPage responsePage = new NewDuplicationTask(jobModel); setResponsePage(responsePage); The constructor of the NewDuplicationTask page extracts the Job from the passed jobModel and calls duplicationTask.setJob(job). The DuplicationTask that it holds has a description property, which is initially null and is populated via a required field on the NewDuplicationTask page. However, the above Exception complaining about a null description property occurs at page display, way before the form could have been submitted. The Exception thrown is pointing to an isVisible check, on the page that the user has just left. The renderHead call mentioned above calls isVisible, and in my case I have a component whose visibility depends on whether or not a Job already exists in the database with the same job number. I believe this check is causing Hibernate to attempt to flush the Job back to the database, which then causes the Exception because the DuplicationTask that has just been added to the in-memory Job hasn't been completed yet
Re: Interesting markup question
Hi Erik, The wicket:panel construct will be stripped entirely of course. Where would you expect the class applied to a wicket:panel to appear - are you suggesting it should be added to the containing div? So: div wicket:id=menu[menu]/div And: wicket:panel class=menuBarContents of Panel/wicket:panel Would become: div class=menuBarContents of Panel/div Charlie. On Thu, Mar 6, 2008 at 8:28 AM, Erik van Oosten [EMAIL PROTECTED] wrote: Hi, I recently tried the following in a panel's markup: div wicket:id=menu/div add(new MenuPanel(menu)); and in MenuPanel.html: wicket:panel class=menuBar ... /wicket:panel Unfortunately the class attribute was not put in the result. It was even silently ignored! WDYT, is this desired behavior? FYI, this is my workaround: wicket:container wicket:id=menu/wicket:container add(new MenuPanel(menu)); and in MenuPanel.html: wicket:panel div class=menuBar ... /div /wicket:panel Regards, Erik. -- Erik van Oosten http://day-to-day-stuff.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-datetime
Hi all, This is causing me some issues as well. I have a page which contains 21 datepickers... These add 59KB of JavaScript to the head and I now believe might be the cause of a ~three second browser pause I'm seeing when the entering the page. The 1.2.6 datepicker component kept its JavaScript in external libraries, so they were only loaded once, and made a call to Calendar.setup to do the work for each component. Obviously, they're both different technologies behind the scenes, so the same approach might not work. Anyone got any suggestions? Charlie. On Thu, Mar 6, 2008 at 9:42 AM, Ned Collyer [EMAIL PROTECTED] wrote: Hi Igor, The picker works fine - its the implementation I'm concerned about. If you have 2 instances, then all the javascript exists twice. All the translations exist twice. The demo does not show 2 date pickers and you can clearly see the dependance on initdateTextField2 being pasted into the middle of the script area. eg, say you need to specify a date range - or multiple date ranges for something like a search input, or you have multiple panels with date pickers. Is this purely to satisfy the requirement of the example? -ie, not suitable for anything more than date of birth checking and 1 instance per page. igor.vaynberg wrote: it seems to be working just fine here http://wicketstuff.org/wicket13/dates/ -igor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Url Coding Strategy for choosing Locale by URL Sub Directory
Hi Wicket-User, I have a similar situation - I'm tasked to build a site that appears to have multiple directories but that actually use the same set of pages. So for example: http://mysite.com/clientname/Login http://mysite.com/clientname/Register http://mysite.com/clientname/OtherBookmarkablePath The first part of the path will be used to show a different look-and-feel - depending on the clientname you'll get different logos, text styles etc. (I can't make these different sites with alternative CSS or with variant pages, as they need to be created and customized on the fly through an admin section.) I'm not sure where to start looking, or what approach to take. Should that first path element be ultimately exposed on the Page as a PageParameter? Does this play havoc with getHomePage - how can I return a particular user's home page? Does the URL interpretation occur in the WebRequestCodingStrategy? (I'm stepping through a request at the moment, but haven't located where this particular magic happens yet!) (It would be great to just store the look and feel on the user's account, but I'm told that login and registration pages must also be branded.) Charlie. On Mon, Mar 3, 2008 at 1:10 PM, oliverw [EMAIL PROTECTED] wrote: I would like to allow the users of my site to choose which language the site and the content is presented in by kind of prefixing the actual URL with a virtual subfolder specifying the language. Example: Let's mount a page: mount(new IndexedHybridUrlCodingStrategy(/foobar, FooPage.class)); And assume the following user access urls: http://domain.com/foobar - results in page foobar presented in english http://domain.com/de/foobar - results in page foobar presented in german http://domain.com/fr/foobar - results in page foobar presented in french What I would like to know if: a) It is possible to implement this without mounting /foobar multiple times for all possible location (I think in order to get this to work I would have to overrride WebRequestCodingStrategy.strategyForPath where simply all mountpoints get iterated and checked for the target URL with parth.startswith(key) b) Where to start? I debugged through most of the request cycle code but I'm still not sure what's the best place to hook into. Any hint would be appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Why dioes this error occur?
Hi all, I am encountering the same issue as the OP reports, but it is not related to double-clicking. My situation is as follows: (Using Wicket 1.2.6, Databinder 1.0) I have a PropertyListView using a HibernateListModel that selects a number of objects from the database. One of the components rendered per item is an AjaxLink that opens a ModalWindow. Inside the ModalWindow is an AjaxLink whose onClick updates the object (such that it will no longer appear in the list), detaches the model backing the list and adds the PropertyListView to the AjaxRequestTarget. The screen refreshes, and the object is no longer listed. It *works*, in that when the correct link is clicked, the ModalWindow closes, the database is updated, and the page refreshes without the object that was just actioned. However, I'm getting the OP's exception trace in the logs. I presume what's happening is that something is performing some kind of finishing-up callback to the ModalWindow or one of the AjaxLinks, which then fails because the component is no longer on the page. I'm afraid I don't have a great grasp of the process around the ModalWindow - have I diagnosed the problem correctly? Given that my code works (so whatever is broken isn't vital), and given that the stack trace for the exception doesn't go near my code (so I can't just intercept and ignore the Exception), what can I do to fix it? Is there a better approach to my problem that avoids this issue? Cheers, Charlie. On Nov 21, 2007 6:05 PM, salmas [EMAIL PROTECTED] wrote: It seems that this is a common bug, there is a thread titled Doubleclicking on a refreshable Ajax button which appears to be similar. I am using an AjaxSubmitButton in my application and double clicks and fast clicks are an issue. I have followed the sugggestions to use javascript to disable the button between clicks and while this reduced the frequency it still does occur from time to time. We cannot move to my application to prodution like this and my manager does not want this application to have to go to a newer wicket since we'll have to start from scratch with testing. Would it be possible to release a patch for older releases such as wicket-1.2.6? This would be huge for my project. Regards serban.balamaci wrote: Hi. Well in my case this error apeared when the user clicked on a link that was directing the user to the next page, and while the user did not wait for the other page to load, or he thought that he did not press the mouse button and he clicked again. The server saw that the component(link) was no longer in the the new page and therefore the nullpointer. (Or that's how i explained it to myself). I got around this by disabling the link after the clicking. salmas wrote: Every once in awhile if I am clicking around for awhile in the UI of my application I get the following error. What causes this? java.lang.NullPointerException at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveListenerInterfaceTarget(DefaultRequestTargetResolverStrategy.java:295) at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveRenderedPage(DefaultRequestTargetResolverStrategy.java:228) at wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:153) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48) at wicket.RequestCycle.step(RequestCycle.java:992) at wicket.RequestCycle.steps(RequestCycle.java:1084) at wicket.RequestCycle.request(RequestCycle.java:454) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219) at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:262) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183) - To