Re: wicket-datetime DateLabel
Ah, okay, thanks! On Tue, May 3, 2016 at 2:38 PM, Martin Grigorovwrote: > There is a task for Wicket 8 for this. > On May 4, 2016 12:32 AM, "Lon Varscsak" wrote: > > > Shouldn’t DateLabel allow Joda dates to be used in addition to > > java.util.Date? > > > > Thanks, > > > > Lon (Wicket Newb :D) > > >
Re: wicket-datetime DateLabel
There is a task for Wicket 8 for this. On May 4, 2016 12:32 AM, "Lon Varscsak"wrote: > Shouldn’t DateLabel allow Joda dates to be used in addition to > java.util.Date? > > Thanks, > > Lon (Wicket Newb :D) >
wicket-datetime DateLabel
Shouldn’t DateLabel allow Joda dates to be used in addition to java.util.Date? Thanks, Lon (Wicket Newb :D)
wicket datetime and opera
The org.apache.wicket.datetime.markup.html.form.DateTextField.forDatePattern( id , -MM-dd ); is not working on Opera 9.64 Tested in IE7, Firefox, Google chrome and ot works but not in opera This is tested with org.apache.wicket.extensions.yui.calendar.DatePicker Have tested different 1.4.x wicket releases. / Mathias
DatePicker from wicket-datetime working sample ?
I've searched the users list and Googled otherwise but can't find a working sample of DatePicker from wicket-datetime. Is there a handy one ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DatePicker from wicket-datetime working sample ?
http://wicketstuff.org/wicket/dates/ -igor On Fri, Aug 7, 2009 at 10:57 AM, Arun Guptaarun.gu...@gmail.com wrote: I've searched the users list and Googled otherwise but can't find a working sample of DatePicker from wicket-datetime. Is there a handy one ? -Arun -- Need Application Server ? - Download glassfish.org Blog: http://blogs.sun.com/arungupta - 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
wicket-datetime DateField generates 2 textfields problem
This is my first full day with wicket, so please bear with me. I am trying to use the DateField to manage a java.util.Date. My problem is that the datafield outputs an extra textfield in my form. The picker does work and does set the date value for the 2nd textarea, but there is still the extra (first) textfield that does not serve a purpose. I am using wicket 1.3.5 and wicket-datetime 1.3.5 I have included java snippet/template snippet and the what wicket generated. Thanks, hope for good things to come. DateField startDateField = new DateField(dateRange.startDate2); form.add(startDateField); tr tdwicket:message key=startDate[start date]/wicket:message/ tdtd input type=text wicket:id=dateRange.startDate2/ /td /tr tr tdwicket:message key=startDate[start date]/wicket:message/ tdtd input type=text wicket:id=dateRange.startDate2 name=dateRange.startDate2wicket:panel span style=white-space: nowrap; input value= type=text wicket:id=date size=8 name=dateRange.startDate2:date id=date21/ span class=yui-skin-samnbsp;span style=display:none;position:absolute;z-index: 9; id=date21Dp/ spanimg style=cursor: pointer; border: none; id=date21Icon src=resources/org.apache.wicket.extensions.yui.calendar.DatePicker/ icon1.gif alt=//span /span /wicket:panel/input /td /tr - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: wicket-datetime DateField generates 2 textfields problem
datefield should be attached to a span or a wicket:container tag rather then an input tag. so span wicket:id=datefield/span -igor On Wed, Jan 14, 2009 at 8:46 PM, Phillip Rhodes spamsu...@rhoderunner.com wrote: This is my first full day with wicket, so please bear with me. I am trying to use the DateField to manage a java.util.Date. My problem is that the datafield outputs an extra textfield in my form. The picker does work and does set the date value for the 2nd textarea, but there is still the extra (first) textfield that does not serve a purpose. I am using wicket 1.3.5 and wicket-datetime 1.3.5 I have included java snippet/template snippet and the what wicket generated. Thanks, hope for good things to come. DateField startDateField = new DateField(dateRange.startDate2); form.add(startDateField); tr tdwicket:message key=startDate[start date]/wicket:message/tdtd input type=text wicket:id=dateRange.startDate2/ /td /tr tr tdwicket:message key=startDate[start date]/wicket:message/tdtd input type=text wicket:id=dateRange.startDate2 name=dateRange.startDate2wicket:panel span style=white-space: nowrap; input value= type=text wicket:id=date size=8 name=dateRange.startDate2:date id=date21/ span class=yui-skin-samnbsp;span style=display:none;position:absolute;z-index: 9; id=date21Dp/spanimg style=cursor: pointer; border: none; id=date21Icon src=resources/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif alt=//span /span /wicket:panel/input /td /tr - 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: Wicket-contrib-accordion and Wicket-datetime YUI version clash?
Could be cool if we got a common place like jeremys jslib for this... Peter Neubauer wrote: Hi there, when using a DateTimeField together with Wicket-contrib-accordion, it seems my DateTimeField JS gets corrupted by the followoing header contributors: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleCivilOne - put it on the Map!/title link href=styles/styles.css rel=stylesheet type=text/css/ link href=images/app-icon.png rel=shortcut icon/ link href=images/app-icon.png rel=icon/ script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;/script script type=text/javascript src=resources/org.wicketstuff.accordion.AccordionPanel/accordion-menu-v2.js/script link rel=stylesheet type=text/css href=resources/se.waylabs.locus.LocusBasePage/accordion-menu-v2.css / script type=text/javascript src=resources/org.apache.wicket.extensions.yui.YuiLib/yuiloader-beta-min.js/script script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { if (typeof wicketCalendarInits == 'undefined') { wicketCalendarInits = new Array(); wicketCalendarInitFinished = false; } Question here is - might it be that the yui-loader-beta-min.js is loading a different version from the more explicit loader in AccordionPanel.class, something along the lines public void renderHead(IHeaderResponse response) { response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;); response.renderJavascriptReference(JAVASCRIPT); response.renderCSSReference(STYLE); }; ? I that case, how would one avoid this? Cheers /peter Open Hearts, Open Minds, OpenCauses. GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - New Energy for Data - the Graph Database. http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org- New Energy for Java - Domain Driven Development. - 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: Wicket-contrib-accordion and Wicket-datetime YUI version clash?
Hi there, now, updating the wicket-contrib-accordion YUI version to 2.4.1, the one used in wicket-datetime, is solving the problem, here is the patch! Index: src/main/java/org/wicketstuff/accordion/AccordionPanel.java === --- src/main/java/org/wicketstuff/accordion/AccordionPanel.java (revision 4542) +++ src/main/java/org/wicketstuff/accordion/AccordionPanel.java (working copy) @@ -60,13 +60,13 @@ public void renderHead(IHeaderResponse response) { response - .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;); + .renderJavascriptReference(http://yui.yahooapis.com/2.4.1/build/yahoo/yahoo.js;); response - .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;); + .renderJavascriptReference(http://yui.yahooapis.com/2.4.1/build/event/event.js;); response - .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;); + .renderJavascriptReference(http://yui.yahooapis.com/2.4.1/build/dom/dom.js;); response - .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;); + .renderJavascriptReference(http://yui.yahooapis.com/2.4.1/build/animation/animation.js;); response.renderJavascriptReference(JAVASCRIPT); response.renderCSSReference(STYLE); }; /peter Open Hearts, Open Minds, OpenCauses. GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - New Energy for Data - the Graph Database. http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org- New Energy for Java - Domain Driven Development. On Mon, Dec 29, 2008 at 10:13 PM, Peter Neubauer peter.neuba...@jayway.se wrote: Hi there, when using a DateTimeField together with Wicket-contrib-accordion, it seems my DateTimeField JS gets corrupted by the followoing header contributors: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleCivilOne - put it on the Map!/title link href=styles/styles.css rel=stylesheet type=text/css/ link href=images/app-icon.png rel=shortcut icon/ link href=images/app-icon.png rel=icon/ script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;/script script type=text/javascript src=resources/org.wicketstuff.accordion.AccordionPanel/accordion-menu-v2.js/script link rel=stylesheet type=text/css href=resources/se.waylabs.locus.LocusBasePage/accordion-menu-v2.css / script type=text/javascript src=resources/org.apache.wicket.extensions.yui.YuiLib/yuiloader-beta-min.js/script script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { if (typeof wicketCalendarInits == 'undefined') { wicketCalendarInits = new Array(); wicketCalendarInitFinished = false; } Question here is - might it be that the yui-loader-beta-min.js is loading a different version from the more explicit loader in AccordionPanel.class, something along the lines public void renderHead(IHeaderResponse response) { response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;); response.renderJavascriptReference(JAVASCRIPT); response.renderCSSReference(STYLE); }; ? I that case, how would one avoid this? Cheers /peter Open Hearts, Open Minds
Wicket-contrib-accordion and Wicket-datetime YUI version clash?
Hi there, when using a DateTimeField together with Wicket-contrib-accordion, it seems my DateTimeField JS gets corrupted by the followoing header contributors: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta http-equiv=Content-Type content=text/html; charset=utf-8 / titleCivilOne - put it on the Map!/title link href=styles/styles.css rel=stylesheet type=text/css/ link href=images/app-icon.png rel=shortcut icon/ link href=images/app-icon.png rel=icon/ script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;/script script type=text/javascript src=http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;/script script type=text/javascript src=resources/org.wicketstuff.accordion.AccordionPanel/accordion-menu-v2.js/script link rel=stylesheet type=text/css href=resources/se.waylabs.locus.LocusBasePage/accordion-menu-v2.css / script type=text/javascript src=resources/org.apache.wicket.extensions.yui.YuiLib/yuiloader-beta-min.js/script script type=text/javascript src=resources/org.apache.wicket.markup.html.WicketEventReference/wicket-event.js/script script type=text/javascript !--/*--![CDATA[/*!--*/ Wicket.Event.add(window, domready, function() { if (typeof wicketCalendarInits == 'undefined') { wicketCalendarInits = new Array(); wicketCalendarInitFinished = false; } Question here is - might it be that the yui-loader-beta-min.js is loading a different version from the more explicit loader in AccordionPanel.class, something along the lines public void renderHead(IHeaderResponse response) { response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/yahoo_2.0.0-b2.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/event_2.0.0-b2.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/dom_2.0.2-b3.js;); response .renderJavascriptReference(http://us.js2.yimg.com/us.js.yimg.com/lib/common/utils/2/animation_2.0.0-b3.js;); response.renderJavascriptReference(JAVASCRIPT); response.renderCSSReference(STYLE); }; ? I that case, how would one avoid this? Cheers /peter Open Hearts, Open Minds, OpenCauses. GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - New Energy for Data - the Graph Database. http://www.ops4j.org - New Energy for OSS Communities - Open Participation Software. http://www.qi4j.org- New Energy for Java - Domain Driven Development. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
RE: wicket-datetime
It looks like the datetime component has major issues of its own that make it virtually unusable (https://issues.apache.org/jira/browse/WICKET-1412). -Original Message- From: Eelco Hillenius [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 11, 2008 12:13 PM To: users@wicket.apache.org Subject: Re: wicket-datetime I'd potentially like to use this component, but its putting a ridiculous amount of markup into the script section in the head. Including a copy of the license... Licenses are only included/ not filtered out when Wicket runs in development mode. Also, if I add 2 date pickers it puts all the JS in the head... twice!! (including the license), .. how can I get it to reuse the same javascript. No, not all. Just the JS that is used for initializing an instance. The shared JS from YUI is only included once for all instances. Is this library intended for demo only? Of course not. We'll have to look closely at where we can optimize the per-instance initialization code. It looks like it has grown too much after several localization additions. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-datetime
On Tue, Mar 11, 2008 at 9:58 AM, Hoover, William [EMAIL PROTECTED] wrote: It looks like the datetime component has major issues of its own that make it virtually unusable (https://issues.apache.org/jira/browse/WICKET-1412). We've been using this component for quite a while (eating our own dog food as usual) without too much trouble. See comments on that issue. Patches to get rid of the rough edges are welcome, but calling it virtually unusable goes a bit to far imo. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-datetime
There was sometrouble with safari 2, but wicket got patched and that fixed it. Alex Jacoby wrote: Side note: the demo doesn't seem to be working in Safari (3.0.4). Clicking the calendar icon doesn't do anything. I don't see any JS errors in the console. Anyone else seen this? Alex On Mar 6, 2008, at 1:20 AM, 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] -- -Wicket for love -Jme for fun Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-datetime
Odd... Just tested again and it's working now. Pretty sure I wasn't hallucinating before but if no one else notices the problem I'll chalk it up to gremlins in my computer. I was using Safari 3 on leopard, btw. Alex On Mar 11, 2008, at 4:00 PM, Nino Saturnino Martinez Vazquez Wael wrote: There was sometrouble with safari 2, but wicket got patched and that fixed it. Alex Jacoby wrote: Side note: the demo doesn't seem to be working in Safari (3.0.4). Clicking the calendar icon doesn't do anything. I don't see any JS errors in the console. Anyone else seen this? Alex On Mar 6, 2008, at 1:20 AM, 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] -- -Wicket for love -Jme for fun Nino Martinez Wael Java Specialist @ Jayway DK http://www.jayway.dk +45 2936 7684 - 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-datetime
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 -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15869748.html 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: 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: wicket-datetime
Side note: the demo doesn't seem to be working in Safari (3.0.4). Clicking the calendar icon doesn't do anything. I don't see any JS errors in the console. Anyone else seen this? Alex On Mar 6, 2008, at 1:20 AM, 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: wicket-datetime
If you don't have licence matter you can download the old 1.2.x datepicker available here http://wicketstuff.org/confluence/display/STUFFWIKI/wicket-contrib-datepicker and refactor to make it use the Wicket 1.3.x core classes. That's all . / Paolo On Thu, Mar 6, 2008 at 11:23 AM, Charlie Dobbie [EMAIL PROTECTED] wrote: 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: wicket-datetime
i have no idea how much of that javascript can be factored out and how much of it is requried to init each instance of the yui calendar. (didnt write that one). perhaps gerolf or eelco wouldnt mind pipinig in... i didnt see any license headers being dumped into html though. personally ive used this one [1] in the past and liked it more then the yui thing... http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicket-calendar/ -igor On Thu, Mar 6, 2008 at 1: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 -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15869748.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-datetime
off the top of my head, i'd say we could skip the localization part for Locale.ENGLISH (and the like), as it's the default language in YUI. couple of YUI releases, we switched to using the YUILoader to dynamically load the needed .js files. and now that you've mentioned it, it may not be an ideal solution anyway, since we have to reuse the same YUILoader instance for all components (only datepickers in this case) on a page for the dependency resolution to work. maybe we should switch back to how it was before (good old header contributions). any thoughts? gerolf On Thu, Mar 6, 2008 at 6:52 PM, Igor Vaynberg [EMAIL PROTECTED] wrote: i have no idea how much of that javascript can be factored out and how much of it is requried to init each instance of the yui calendar. (didnt write that one). perhaps gerolf or eelco wouldnt mind pipinig in... i didnt see any license headers being dumped into html though. personally ive used this one [1] in the past and liked it more then the yui thing... http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicket-calendar/ -igor On Thu, Mar 6, 2008 at 1: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 -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15869748.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket-datetime
Thanks for the calendar info - i'll check it out. nb, they both share the same bug in StyleDateConverter.java where the formatter does not take the component locale. I've created a Jira item for this for the wicket-datetime component. https://issues.apache.org/jira/browse/WICKET-1401 Rgds Ned igor.vaynberg wrote: i have no idea how much of that javascript can be factored out and how much of it is requried to init each instance of the yui calendar. (didnt write that one). perhaps gerolf or eelco wouldnt mind pipinig in... i didnt see any license headers being dumped into html though. personally ive used this one [1] in the past and liked it more then the yui thing... http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/trunk/wicket-calendar/ -igor -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15886182.html 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: wicket-datetime
Thanks for the reply. Core to my requirement is internationalisation, and per locale date formats (both client and server side). The wicket-datetime one is close to ideal, just has some implementation issues which I believe could be cleaned up in a manner similar to *.js convenience methods. Rgds Ned ptrthomas wrote: I rolled my own datepicker (based on YUI) which was easy, you can have a look at the code here: http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/yui/YuiCalendar.java?r=1090 It does not support internationalization at all, but it may help, I also wrote a small piece of javascript that reduces the amount of js needed in head: http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/webapp/resources/yui/calendar/calendar-utils.js?r=1004 -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15886521.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket-datetime
I'd potentially like to use this component, but its putting a ridiculous amount of markup into the script section in the head. Including a copy of the license... Is there an easy way to move this into a separate request/resource - 1 per locale used? Also, if I add 2 date pickers it puts all the JS in the head... twice!! (including the license), .. how can I get it to reuse the same javascript. Is this library intended for demo only? -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15866334.html 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: wicket-datetime
On 3/6/08, Ned Collyer [EMAIL PROTECTED] wrote: I'd potentially like to use this component, but its putting a ridiculous amount of javascript into the script section in the head. Including a copy of the license... Is there an easy way to move this into a separate request/resource - 1 per locale used? Also, if I add 2 date pickers it puts all the JS in the head... twice!! (including the license), .. how can I get it to reuse the same javascript. Is this library intended for demo only? I rolled my own datepicker (based on YUI) which was easy, you can have a look at the code here: http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/java/info/jtrac/wicket/yui/YuiCalendar.java?r=1090 It does not support internationalization at all, but it may help, I also wrote a small piece of javascript that reduces the amount of js needed in head: http://fisheye3.cenqua.com/browse/j-trac/trunk/jtrac/src/main/webapp/resources/yui/calendar/calendar-utils.js?r=1004 -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15866334.html 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: wicket-datetime
it seems to be working just fine here http://wicketstuff.org/wicket13/dates/ -igor On Wed, Mar 5, 2008 at 8:33 PM, Ned Collyer [EMAIL PROTECTED] wrote: I'd potentially like to use this component, but its putting a ridiculous amount of markup into the script section in the head. Including a copy of the license... Is there an easy way to move this into a separate request/resource - 1 per locale used? Also, if I add 2 date pickers it puts all the JS in the head... twice!! (including the license), .. how can I get it to reuse the same javascript. Is this library intended for demo only? -- View this message in context: http://www.nabble.com/wicket-datetime-tp15866334p15866334.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket-datetime 1.3.1 css problem
I've just upgraded to wicket 1.3.1 and seem to be having a problem getting the calendar to display correctly. It works, but it's not picking up calendar css. From having a quick look at the source of AbstractCalendar is seems to be doing a: add(HeaderContributor.forCss(AbstractCalendar.class, assets/calendar.css)); but from what I can tell calendar.css doesn't seem to be under the assets directory assets it seems to be at assets/skins/sam. Am I doing something wrong, or is the css resource path not correct? Cheers Andrew -- View this message in context: http://www.nabble.com/wicket-datetime-1.3.1-css-problem-tp15731702p15731702.html 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: wicket-datetime 1.3.1 css problem
this should be fixed in trunk. Gerolf On Thu, Feb 28, 2008 at 9:21 AM, Andrew Moore [EMAIL PROTECTED] wrote: I've just upgraded to wicket 1.3.1 and seem to be having a problem getting the calendar to display correctly. It works, but it's not picking up calendar css. From having a quick look at the source of AbstractCalendar is seems to be doing a: add(HeaderContributor.forCss(AbstractCalendar.class, assets/calendar.css)); but from what I can tell calendar.css doesn't seem to be under the assets directory assets it seems to be at assets/skins/sam. Am I doing something wrong, or is the css resource path not correct? Cheers Andrew -- View this message in context: http://www.nabble.com/wicket-datetime-1.3.1-css-problem-tp15731702p15731702.html 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: wicket-datetime-rc2 javascript error in generated event.js
Answering myself. The problem does not occur anymore in yesterday's snapshot. Thanks to whoever fixed it, Wilko Hische -- View this message in context: http://www.nabble.com/wicket-datetime-rc2-javascript-error-in-generated-event.js-tp14438031p14457168.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket-datetime-rc2 javascript error in generated event.js
Hello, When in a wicket-rc2 Quickstart I try to use org.apache.wicket.extensions.yui.calendar.DateField from wicket-datetime-rc2 I get an error messsage in FF and IE7 concerning event.js. If I open the page for the first time: nl is not defined looking at the contents of event.js with firebug i only see nl (with nl being the only package at root level). -- HomePage.java: -- package nl.feeddex; import org.apache.wicket.PageParameters; import org.apache.wicket.extensions.yui.calendar.DateField; import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.model.IModel; public class HomePage extends WebPage { private Date date; public HomePage(final PageParameters parameters) { Form form = new Form(form); form.add( new DateField( testDate, new IModel(){ public Object getObject() { return date; } public void setObject(Object object) { date = (Date)object; } public void detach() { } })); add( form ); add( new MyDummyPanel( panel )); } } -- HomePage.html: -- html head titleWicket Quickstart Archetype Homepage/title /head body br/br/ form wicket:id=form Date: input type=submit value=Submit!/ /form div wicket:id=panel/div /body /html -- The panel i include because otherwise i get an exception(?): WicketMessage: Unknown tag name with Wicket namespace: 'panel'. Might be you haven't installed the appropriate resolver? This is a blocker for us, should I make a bug report? I am afraid the JavaScript is a bit too involved for me to be able to patch this myself on short notice. Best regards, Wilko Hische -- View this message in context: http://www.nabble.com/wicket-datetime-rc2-javascript-error-in-generated-event.js-tp14438031p14438031.html 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: wicket datetime / YUI calendar
GREAT!! :) Thanks. Did you also get the patch for the standalone (always shown) calendar commited? regards Nino Gerolf Seitz wrote: On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html Nino, have a look at WICKET-1030 and WICKET-1031. both features are in trunk. Regards, Gerolf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
On 10/3/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: GREAT!! :) Thanks. Did you also get the patch for the standalone (always shown) calendar commited? which patch? do you mean the DatePicker#renderOnLoad and #hideOnSelect thingy? that should be in. gerolf regards Nino Gerolf Seitz wrote: On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html Nino, have a look at WICKET-1030 and WICKET-1031. both features are in trunk. Regards, Gerolf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
Yup thats the one:).. Gerolf Seitz wrote: On 10/3/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: GREAT!! :) Thanks. Did you also get the patch for the standalone (always shown) calendar commited? which patch? do you mean the DatePicker#renderOnLoad and #hideOnSelect thingy? that should be in. gerolf regards Nino Gerolf Seitz wrote: On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html Nino, have a look at WICKET-1030 and WICKET-1031. both features are in trunk. Regards, Gerolf - 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 datetime / YUI calendar
Hmm, Im trying to make the calendar work with the DateTextField from the extensions(I guess thats the one I should use right?). But something are wrong, now my ajax update behaviors are no longer called, could you provide a snipplet of how it should be setup? Im doing this now TextField selectedDate = new TextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); And was just replacing it with: DateTextField selectedDate = new DateTextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); regards Nino Gerolf Seitz wrote: Nino, if you assign the DateTextField a model (with a valid date), the datepicker picks the date up and marks the given date as selected. @ CalendarGroup the most unobtrusive way i could come up with is the following: let the user override DatePicker#configure and do this: widgetProperties.put(pages, 2); problems arise when the user wants to use month/year selection too, as these two options don't work together (which option is more important?) we could do a check for that in DatePicker#renderHead right before the widgetProperties are transformed into a javascript array (line 190 or so) and throw an exception if (enableMonthYearSelection widgetProperties.contains(pages) Objects.longValue(widgetProperties.get(pages)) 1) on the client side, the function Wicket.DateTime.init checks whether the configuration property pages is available and greater 1 and instantiates a CalendarGroup instead of a Calendar. another (more dummy save) approach is to provide a class DatePickerGroup which final overrides enableMonthYearSelection with return false and introduces an overridable method getPages which sets the property. i would rather take the first route, as it doesn't expand the api. i also think that's what Eelco would prefer, right? ;) gerolf On 10/1/07, Gerolf Seitz [EMAIL PROTECTED] wrote: if you set a model for the textfield, the datepicker should actually pick it up. but i'm not sure whether this picking up is done in the Wicket.DateTime.showCalendar method, which is not called for the renderOnLoad-DatePicker, iirc... i will take a look at this later today... gerolf On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Sure there are always more questions:) I know that the problem with YUI calender, it has no model? what I mean are of course the calendar are attached to a tf field, and we use that for interaction on the calendar, but it seems that it are one way calendar -- textfield. Always being calendar thats pushing the value to the text field, and not noticing the differences if any the other way. And yes we are talking about the standalone version(good memory, Gerolf). It could be very nice if the calendar had some way of opening up for special statements I wanted to input.. For example to make the special rendering work I could just do this: YAHOO.example.calendar.cal1.addRenderer(2/29, YAHOO.example.calendar.cal1.*renderCellStyleHighlight1 ); *This adds the css class identifier highlight1 to the date 29/2. Then it would be up to the user or we could provide a default style which were bold. User can always override these styles. I mean the current implementation already knows a lot of this, it knows the namespace and the instance so I think if I somehow could be allowed doing something like below and there where such a method. // pseudo alike code Protected void additionalInitParametersAndCalls(List calls) { } List param=... param.add(addRenderer(2/29, YAHOO.example.calendar.cal1.*renderCellStyleHighlight1)*); This approach however requires that the user of the component are aware that its a YUI calender, we could also just encapsulate the things and make java methods for it. But theres just so many use cases thats possible. WDYT? -Nino Gerolf Seitz wrote: hi nino, @ your problem: if there is no model which can be updated (ie with an AjaxFormComponentUpdatingBehavior), so wicket doesn't know what happened on the client side. as a consequence the calendar
Re: wicket datetime / YUI calendar
you should use org.apache.wicket.datetime.markup.html.form.DateTextField in wicket-datetime, not the one from wicket-extensions ;) concerning your approach for the additional renderer: i think that's the way to go, since you can't just simply render such a call to the head section of the page, due to the usage of yuiloader, which loads the libs dynamically. so the calls would have to go after the Wicket.DateTime.init call in in the init${widgetId}DpJs function in DatePicker.js eelco, you're okay with this? gerolf btw: if people want to customize the calendar with the configure method, they have to know that it's the YUI Calendar anyway, so i think that's nothing to worry about. On 10/2/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hmm, Im trying to make the calendar work with the DateTextField from the extensions(I guess thats the one I should use right?). But something are wrong, now my ajax update behaviors are no longer called, could you provide a snipplet of how it should be setup? Im doing this now TextField selectedDate = new TextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); And was just replacing it with: DateTextField selectedDate = new DateTextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); regards Nino Gerolf Seitz wrote: Nino, if you assign the DateTextField a model (with a valid date), the datepicker picks the date up and marks the given date as selected. @ CalendarGroup the most unobtrusive way i could come up with is the following: let the user override DatePicker#configure and do this: widgetProperties.put(pages, 2); problems arise when the user wants to use month/year selection too, as these two options don't work together (which option is more important?) we could do a check for that in DatePicker#renderHead right before the widgetProperties are transformed into a javascript array (line 190 or so) and throw an exception if (enableMonthYearSelection widgetProperties.contains(pages) Objects.longValue(widgetProperties.get(pages)) 1) on the client side, the function Wicket.DateTime.init checks whether the configuration property pages is available and greater 1 and instantiates a CalendarGroup instead of a Calendar. another (more dummy save) approach is to provide a class DatePickerGroup which final overrides enableMonthYearSelection with return false and introduces an overridable method getPages which sets the property. i would rather take the first route, as it doesn't expand the api. i also think that's what Eelco would prefer, right? ;) gerolf On 10/1/07, Gerolf Seitz [EMAIL PROTECTED] wrote: if you set a model for the textfield, the datepicker should actually pick it up. but i'm not sure whether this picking up is done in the Wicket.DateTime.showCalendar method, which is not called for the renderOnLoad-DatePicker, iirc... i will take a look at this later today... gerolf On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Sure there are always more questions:) I know that the problem with YUI calender, it has no model? what I mean are of course the calendar are attached to a tf field, and we use that for interaction on the calendar, but it seems that it are one way calendar -- textfield. Always being calendar thats pushing the value to the text field, and not noticing the differences if any the other way. And yes we are talking about the standalone version(good memory, Gerolf). It could be very nice if the calendar had some way of opening up for special statements I wanted to input.. For example to make the special rendering work I could just do this: YAHOO.example.calendar.cal1.addRenderer(2/29, YAHOO.example.calendar.cal1.*renderCellStyleHighlight1 ); *This adds the css class identifier highlight1 to the date 29/2. Then it would be up to the user or we could provide
Re: wicket datetime / YUI calendar
@DateTextField Hmm, I have to supply a custom converter then. Could there be a default one in the YUI extension? How does your dateconverter look like? regards Nino Gerolf Seitz wrote: you should use org.apache.wicket.datetime.markup.html.form.DateTextField in wicket-datetime, not the one from wicket-extensions ;) concerning your approach for the additional renderer: i think that's the way to go, since you can't just simply render such a call to the head section of the page, due to the usage of yuiloader, which loads the libs dynamically. so the calls would have to go after the Wicket.DateTime.init call in in the init${widgetId}DpJs function in DatePicker.js eelco, you're okay with this? gerolf btw: if people want to customize the calendar with the configure method, they have to know that it's the YUI Calendar anyway, so i think that's nothing to worry about. On 10/2/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hmm, Im trying to make the calendar work with the DateTextField from the extensions(I guess thats the one I should use right?). But something are wrong, now my ajax update behaviors are no longer called, could you provide a snipplet of how it should be setup? Im doing this now TextField selectedDate = new TextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); And was just replacing it with: DateTextField selectedDate = new DateTextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); regards Nino Gerolf Seitz wrote: Nino, if you assign the DateTextField a model (with a valid date), the datepicker picks the date up and marks the given date as selected. @ CalendarGroup the most unobtrusive way i could come up with is the following: let the user override DatePicker#configure and do this: widgetProperties.put(pages, 2); problems arise when the user wants to use month/year selection too, as these two options don't work together (which option is more important?) we could do a check for that in DatePicker#renderHead right before the widgetProperties are transformed into a javascript array (line 190 or so) and throw an exception if (enableMonthYearSelection widgetProperties.contains(pages) Objects.longValue(widgetProperties.get(pages)) 1) on the client side, the function Wicket.DateTime.init checks whether the configuration property pages is available and greater 1 and instantiates a CalendarGroup instead of a Calendar. another (more dummy save) approach is to provide a class DatePickerGroup which final overrides enableMonthYearSelection with return false and introduces an overridable method getPages which sets the property. i would rather take the first route, as it doesn't expand the api. i also think that's what Eelco would prefer, right? ;) gerolf On 10/1/07, Gerolf Seitz [EMAIL PROTECTED] wrote: if you set a model for the textfield, the datepicker should actually pick it up. but i'm not sure whether this picking up is done in the Wicket.DateTime.showCalendar method, which is not called for the renderOnLoad-DatePicker, iirc... i will take a look at this later today... gerolf On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Sure there are always more questions:) I know that the problem with YUI calender, it has no model? what I mean are of course the calendar are attached to a tf field, and we use that for interaction on the calendar, but it seems that it are one way calendar -- textfield. Always being calendar thats pushing the value to the text field, and not noticing the differences if any the other way. And yes we are talking about the standalone version(good memory, Gerolf). It could be very nice if the calendar had some way of opening up for special statements I wanted to input.. For example to make the special rendering work I could just do this: YAHOO.example.calendar.cal1.addRenderer(2/29
Re: wicket datetime / YUI calendar
ahh didnt see the PatternDateConverter...:) Nino Saturnino Martinez Vazquez Wael wrote: @DateTextField Hmm, I have to supply a custom converter then. Could there be a default one in the YUI extension? How does your dateconverter look like? regards Nino Gerolf Seitz wrote: you should use org.apache.wicket.datetime.markup.html.form.DateTextField in wicket-datetime, not the one from wicket-extensions ;) concerning your approach for the additional renderer: i think that's the way to go, since you can't just simply render such a call to the head section of the page, due to the usage of yuiloader, which loads the libs dynamically. so the calls would have to go after the Wicket.DateTime.init call in in the init${widgetId}DpJs function in DatePicker.js eelco, you're okay with this? gerolf btw: if people want to customize the calendar with the configure method, they have to know that it's the YUI Calendar anyway, so i think that's nothing to worry about. On 10/2/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Hmm, Im trying to make the calendar work with the DateTextField from the extensions(I guess thats the one I should use right?). But something are wrong, now my ajax update behaviors are no longer called, could you provide a snipplet of how it should be setup? Im doing this now TextField selectedDate = new TextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); And was just replacing it with: DateTextField selectedDate = new DateTextField(calendar, selectedDateModel); selectedDate.add(new AjaxFormComponentUpdatingBehavior(onChange) { @Override protected void onUpdate(AjaxRequestTarget target) { log.debug(event fired); target.addComponent(ajaxRequiredTable); target.addComponent(dateLabel); } }); form.add(selectedDate); DatePicker datePicker = new DatePicker() { lots of stuff goes here... selectedDate.add(datePicker); regards Nino Gerolf Seitz wrote: Nino, if you assign the DateTextField a model (with a valid date), the datepicker picks the date up and marks the given date as selected. @ CalendarGroup the most unobtrusive way i could come up with is the following: let the user override DatePicker#configure and do this: widgetProperties.put(pages, 2); problems arise when the user wants to use month/year selection too, as these two options don't work together (which option is more important?) we could do a check for that in DatePicker#renderHead right before the widgetProperties are transformed into a javascript array (line 190 or so) and throw an exception if (enableMonthYearSelection widgetProperties.contains(pages) Objects.longValue(widgetProperties.get(pages)) 1) on the client side, the function Wicket.DateTime.init checks whether the configuration property pages is available and greater 1 and instantiates a CalendarGroup instead of a Calendar. another (more dummy save) approach is to provide a class DatePickerGroup which final overrides enableMonthYearSelection with return false and introduces an overridable method getPages which sets the property. i would rather take the first route, as it doesn't expand the api. i also think that's what Eelco would prefer, right? ;) gerolf On 10/1/07, Gerolf Seitz [EMAIL PROTECTED] wrote: if you set a model for the textfield, the datepicker should actually pick it up. but i'm not sure whether this picking up is done in the Wicket.DateTime.showCalendar method, which is not called for the renderOnLoad-DatePicker, iirc... i will take a look at this later today... gerolf On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: Sure there are always more questions:) I know that the problem with YUI calender, it has no model? what I mean are of course the calendar are attached to a tf field, and we use that for interaction on the calendar, but it seems that it are one way calendar -- textfield. Always being calendar thats pushing the value to the text field, and not noticing the differences if any the other way. And yes we are talking about the standalone version(good memory, Gerolf). It could be very nice if the calendar had some way of opening up for special statements I wanted to input.. For example
Re: wicket datetime / YUI calendar
On 10/2/07, Gerolf Seitz [EMAIL PROTECTED] wrote: you should use org.apache.wicket.datetime.markup.html.form.DateTextField in wicket-datetime, not the one from wicket-extensions ;) I didn't read the whole discussion, but the date picker is designed so that it should function with other text fields just fine. Only thing is that they should implement ITextFormatProvider to get the date pattern. concerning your approach for the additional renderer: i think that's the way to go, since you can't just simply render such a call to the head section of the page, due to the usage of yuiloader, which loads the libs dynamically. so the calls would have to go after the Wicket.DateTime.init call in in the init${widgetId}DpJs function in DatePicker.js eelco, you're okay with this? Go for it. Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
wicket datetime / YUI calendar
What's planed for the calendar? I have an issue(I'll file a bug if asked to): Selecting a date on calendar goto another (wicket)page return to the page with calendar and now default date a selected again. I do not do anything special to preserve the date for the calendar, it does not have a model.. Im starting to need these things: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html I could try to implement these thinges myself an supply a patch later. regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
hi nino, @ your problem: if there is no model which can be updated (ie with an AjaxFormComponentUpdatingBehavior), so wicket doesn't know what happened on the client side. as a consequence the calendar is initialized with the default dates. are we talking about a standalone calendar with an invisible textfield? @ multipage calendar: i already have something in my mind for supporting multipage calendars. i will try to add it this evening. @custom renderer: it would be nice if you could come up with something ;) anymore questions? regards, gerolf On 10/1/07, Nino Saturnino Martinez Vazquez Wael [EMAIL PROTECTED] wrote: What's planed for the calendar? I have an issue(I'll file a bug if asked to): Selecting a date on calendar goto another (wicket)page return to the page with calendar and now default date a selected again. I do not do anything special to preserve the date for the calendar, it does not have a model.. Im starting to need these things: Multipage calendar http://developer.yahoo.com/yui/examples/calendar/calgrp.html Calendar dates marked with bold http://developer.yahoo.com/yui/examples/calendar/render.html I could try to implement these thinges myself an supply a patch later. regards Nino - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
Im having trouble finding out how popups are actually done. It does not look at it is setup like this: http://developer.yahoo.com/yui/examples/calendar/popup.html Or it's either merged deep in some of the js scripts bundled.. It doesn't actually really popup like windows do. It's an element that is initially hidden, and clicking the icon triggers it's visibility. as this is something we critical need, i'd really be glad for any hints on going forward with this.. Try using AbstractCalendar instead, that should display a regular calendar. It is not nearly as well maintained as DatePicker - I actually wanted to delete it a few weeks ago, but Igor objected - but I think it should work. Patches are welcome to bring it more in line with DatePicker if needed (e.g. the handling of datepatterns is much better in DatePicker). Also, read the documentation of YUI Calendar. It's quite good. Regards, Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
nino filed WICKET-979 and i've attached a patch that should allow what nino wants to achieve. basically it adds two new options for configuring the datepicker: boolean hideOnSelect() and boolean renderOnLoad() Ah, that sounds fantastic! heh, i'm thinking about a detection-mechanism to automatically detect the need for a calendargroup too ;) i think the names already spoil what the methods are for ;) if you have a second or two, could you take a look at it? that would be great. Unfortunately, not right now as I'm well into the night trying to get a few more pages of Wicket In Action done. Hopefully you'll get commit access within a few days now, or maybe one of the other committers want to look at it. that's what i thought. we'll try to find someone else ;) Thanks! Eelco - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wicket datetime / YUI calendar
Hi Gerolf It should be pretty easy to implement right? Should I make a patch if I can? regards Nino Gerolf Seitz wrote: from the top of my head i'd say it's not yet possible. yould you please file a RFE? thanks. gerolf On 9/14/07, Nino.Martinez [EMAIL PROTECTED] wrote: Hi Im trying to setup the calendar to: Not being a popup Being multipage (2 pages) Like this: http://developer.yahoo.com/yui/examples/calendar/calgrp.html Im having sometrouble doing this, I am overiding the configure and the parameters are being passed out to the JS. But it's not working, I guess theres more to it than the parameter PAGES:XX..? BTW, working on the trunk/snapshot from today... regards Nino -- View this message in context: http://www.nabble.com/wicket-datetime---YUI-calendar-tf4443922.html#a12679607 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/wicket-datetime---YUI-calendar-tf4443922.html#a12680442 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: wicket datetime / YUI calendar
yeah, patches are always welcome (and increases the chances for the issue to be processed, although no guarantee for that ;) ) gerolf On 9/14/07, Nino.Martinez [EMAIL PROTECTED] wrote: Hi Gerolf It should be pretty easy to implement right? Should I make a patch if I can? regards Nino Gerolf Seitz wrote: from the top of my head i'd say it's not yet possible. yould you please file a RFE? thanks. gerolf On 9/14/07, Nino.Martinez [EMAIL PROTECTED] wrote: Hi Im trying to setup the calendar to: Not being a popup Being multipage (2 pages) Like this: http://developer.yahoo.com/yui/examples/calendar/calgrp.html Im having sometrouble doing this, I am overiding the configure and the parameters are being passed out to the JS. But it's not working, I guess theres more to it than the parameter PAGES:XX..? BTW, working on the trunk/snapshot from today... regards Nino -- View this message in context: http://www.nabble.com/wicket-datetime---YUI-calendar-tf4443922.html#a12679607 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/wicket-datetime---YUI-calendar-tf4443922.html#a12680442 Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]