You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk> on 2007/10/01 11:57:25 UTC

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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Yup thats the one:)..

Gerolf Seitz wrote:
> On 10/3/07, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>
> 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 <
>>>       
>> nino.martinez@jayway.dk>
>>     
>>> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
On 10/3/07, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>
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 <
> nino.martinez@jayway.dk>
> > 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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
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 <ni...@jayway.dk>
> 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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
On 10/1/07, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>
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

Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
@Calendar not picking up dates


Ahhh, might be then because I used a "normal" textfield and created my 
own datetime model converter(did this before we upgraded to 1.3 and YUI 
calendar). Should it be possible to use calendar with just a "normal" 
textfield then?
 

@ CalendarGroup


Didnt know that it was'nt possible to do both, but great idea having a 
check for it. I like the first version best, because there can be alot 
of functionality like this and we could end up have tons of methods that 
one should override if we follow the last approach...


What did you think of my idea with the render/mark dates bold in the 
calendar?

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 <ge...@gmail.com> 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 < nino.martinez@jayway.dk>
>> 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 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 <
>>>>         
>>> nino.martinez@jayway.dk>
>>>       
>>>> 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: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Eelco Hillenius <ee...@gmail.com>.
On 10/2/07, Gerolf Seitz <ge...@gmail.com> 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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
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 
>> <ni...@jayway.dk>
>> 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 < gerolf.seitz@gmail.com> 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 <
>>>>>         
>>> nino.martinez@jayway.dk>
>>>    
>>>>> 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 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 <
>>>>>>>
>>>>>>>             
>>>>>> nino.martinez@jayway.dk>
>>>>>>
>>>>>>          
>>>>>>> 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: users-unsubscribe@wicket.apache.org
>>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>               
>>>>>> --------------------------------------------------------------------- 
>>>>>>
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>           
>>>>       
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>     
>>
>>   
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
you can use one of the static methods like
DateTextField#forDatePattern
DateTextField#forDateStyle
...

gerolf

On 10/2/07, Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>
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.DateTextFieldin
> > 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 <
> nino.martinez@jayway.dk>
> > 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 < gerolf.seitz@gmail.com> 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 <
> >>>>
> >> nino.martinez@jayway.dk>
> >>
> >>>> 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 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 <
> >>>>>>
> >>>>>>
> >>>>> nino.martinez@jayway.dk>
> >>>>>
> >>>>>
> >>>>>> 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: users-unsubscribe@wicket.apache.org
> >>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>>>
> >>>>>
> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>>>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
@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 <ni...@jayway.dk>
> 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 < gerolf.seitz@gmail.com> 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 <
>>>>         
>> nino.martinez@jayway.dk>
>>     
>>>> 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 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 <
>>>>>>
>>>>>>             
>>>>> nino.martinez@jayway.dk>
>>>>>
>>>>>           
>>>>>> 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: users-unsubscribe@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>               
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
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 <ni...@jayway.dk>
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 < gerolf.seitz@gmail.com> 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 <
> nino.martinez@jayway.dk>
> >> 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 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 <
> >>>>
> >>> nino.martinez@jayway.dk>
> >>>
> >>>> 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: users-unsubscribe@wicket.apache.org
> >>>>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> >>> For additional commands, e-mail: users-help@wicket.apache.org
> >>>
> >>>
> >>>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
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 <ge...@gmail.com> 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 < nino.martinez@jayway.dk>
>> 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 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 <
>>>>         
>>> nino.martinez@jayway.dk>
>>>       
>>>> 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: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>>
>>>>>
>>>>>           
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>       
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
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 <ge...@gmail.com> 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 < nino.martinez@jayway.dk>
> 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 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 <
> > nino.martinez@jayway.dk>
> > > 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: users-unsubscribe@wicket.apache.org
> > >> For additional commands, e-mail: users-help@wicket.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
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 <ni...@jayway.dk>
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 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 <
> nino.martinez@jayway.dk>
> > 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: users-unsubscribe@wicket.apache.org
> >> For additional commands, e-mail: users-help@wicket.apache.org
> >>
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: wicket datetime / YUI calendar

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
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 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 <ni...@jayway.dk>
> 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: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>     
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: wicket datetime / YUI calendar

Posted by Gerolf Seitz <ge...@gmail.com>.
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 <ni...@jayway.dk>
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: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>