You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Swanthe Lindgren <sw...@megasol.se> on 2011/01/21 12:11:45 UTC

DatePickerBehavior lost when toggling visibility

Hello
I have a text field with jQuery DatePickerBehavior. When the page is 
loaded and the field is initially visible, the behavior works just fine. 
But when toggling the visibility from hidden to visible, the client 
function is gone. The little date packer icon is gone and so is the 
click event on the input field.

What do I have to do?

//Swanthe


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


RE: DatePickerBehavior lost when toggling visibility

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> A drop down box fires an AJAX request and the text field  with the date 
> picker has an overridden isVisible() method.

You have used setOutputMarkupPlaceholderTag(true) on the component that visibility is toggled for yes?

- Tor Iver

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


Re: DatePickerBehavior lost when toggling visibility

Posted by Swanthe Lindgren <sw...@megasol.se>.
Sorry, I didn't get that wiquery also used jQuery. After changing to 
wiquery I at least got my quickstart-app running

On 2011-01-21 13:34, Ernesto Reinaldo Barreiro wrote:
> A said: this works fine on my applications using latest versions of
> wiquery DatePicker [(see 1]) + AJAX replacements.
>
> 1-http://www.google.com/codesearch/p?hl=en#pdLMIUTpzpE/trunk/src/main/java/org/odlabs/wiquery/ui/datepicker/DatePicker.java
>
> Ernesto
>
>
> On Fri, Jan 21, 2011 at 12:55 PM, Swanthe Lindgren
> <sw...@megasol.se>  wrote:
>> I have just changed to jQuery DatePickerBehavior from wicket extensions YUI
>> DatePicker, which of course worked just fine in this scenario, but since I
>> want some of the customizations available in jQuery we made a switch.
>>
>> On 2011-01-21 12:49, Ernesto Reinaldo Barreiro wrote:
>>> Are you using wiquery? If so, can you show me your code or send me a
>>> simplified Panel showing this behavior? I use wiquery  datepickers on
>>> my applications in combination with via AJAX replacements and do not
>>> have this issue.
>>>
>>> Ernesto
>>>
>>> On Fri, Jan 21, 2011 at 12:41 PM, Swanthe Lindgren
>>> <sw...@megasol.se>    wrote:
>>>> A drop down box fires an AJAX request and the text field  with the date
>>>> picker has an overridden isVisible() method.
>>>>
>>>> On 2011-01-21 12:35, Ernesto Reinaldo Barreiro wrote:
>>>>> How do you toggle visibility? Replacing panels via AJAX or client side
>>>>> JavaScript? The AJAX way will work for sure. I think via JavaScript
>>>>> you will have to "manually" recreate it when making it visible....
>>>>>
>>>>> Ernesto
>>>>>
>>>>> On Fri, Jan 21, 2011 at 12:11 PM, Swanthe Lindgren
>>>>> <sw...@megasol.se>      wrote:
>>>>>> Hello
>>>>>> I have a text field with jQuery DatePickerBehavior. When the page is
>>>>>> loaded
>>>>>> and the field is initially visible, the behavior works just fine. But
>>>>>> when
>>>>>> toggling the visibility from hidden to visible, the client function is
>>>>>> gone.
>>>>>> The little date packer icon is gone and so is the click event on the
>>>>>> input
>>>>>> field.
>>>>>>
>>>>>> What do I have to do?
>>>>>>
>>>>>> //Swanthe
>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> 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
>>
>>
> ---------------------------------------------------------------------
> 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: DatePickerBehavior lost when toggling visibility

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
A said: this works fine on my applications using latest versions of
wiquery DatePicker [(see 1]) + AJAX replacements.

1-http://www.google.com/codesearch/p?hl=en#pdLMIUTpzpE/trunk/src/main/java/org/odlabs/wiquery/ui/datepicker/DatePicker.java

Ernesto


On Fri, Jan 21, 2011 at 12:55 PM, Swanthe Lindgren
<sw...@megasol.se> wrote:
> I have just changed to jQuery DatePickerBehavior from wicket extensions YUI
> DatePicker, which of course worked just fine in this scenario, but since I
> want some of the customizations available in jQuery we made a switch.
>
> On 2011-01-21 12:49, Ernesto Reinaldo Barreiro wrote:
>>
>> Are you using wiquery? If so, can you show me your code or send me a
>> simplified Panel showing this behavior? I use wiquery  datepickers on
>> my applications in combination with via AJAX replacements and do not
>> have this issue.
>>
>> Ernesto
>>
>> On Fri, Jan 21, 2011 at 12:41 PM, Swanthe Lindgren
>> <sw...@megasol.se>  wrote:
>>>
>>> A drop down box fires an AJAX request and the text field  with the date
>>> picker has an overridden isVisible() method.
>>>
>>> On 2011-01-21 12:35, Ernesto Reinaldo Barreiro wrote:
>>>>
>>>> How do you toggle visibility? Replacing panels via AJAX or client side
>>>> JavaScript? The AJAX way will work for sure. I think via JavaScript
>>>> you will have to "manually" recreate it when making it visible....
>>>>
>>>> Ernesto
>>>>
>>>> On Fri, Jan 21, 2011 at 12:11 PM, Swanthe Lindgren
>>>> <sw...@megasol.se>    wrote:
>>>>>
>>>>> Hello
>>>>> I have a text field with jQuery DatePickerBehavior. When the page is
>>>>> loaded
>>>>> and the field is initially visible, the behavior works just fine. But
>>>>> when
>>>>> toggling the visibility from hidden to visible, the client function is
>>>>> gone.
>>>>> The little date packer icon is gone and so is the click event on the
>>>>> input
>>>>> field.
>>>>>
>>>>> What do I have to do?
>>>>>
>>>>> //Swanthe
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>
>

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


Re: DatePickerBehavior lost when toggling visibility

Posted by Swanthe Lindgren <sw...@megasol.se>.
I have just changed to jQuery DatePickerBehavior from wicket extensions 
YUI DatePicker, which of course worked just fine in this scenario, but 
since I want some of the customizations available in jQuery we made a 
switch.

On 2011-01-21 12:49, Ernesto Reinaldo Barreiro wrote:
> Are you using wiquery? If so, can you show me your code or send me a
> simplified Panel showing this behavior? I use wiquery  datepickers on
> my applications in combination with via AJAX replacements and do not
> have this issue.
>
> Ernesto
>
> On Fri, Jan 21, 2011 at 12:41 PM, Swanthe Lindgren
> <sw...@megasol.se>  wrote:
>> A drop down box fires an AJAX request and the text field  with the date
>> picker has an overridden isVisible() method.
>>
>> On 2011-01-21 12:35, Ernesto Reinaldo Barreiro wrote:
>>> How do you toggle visibility? Replacing panels via AJAX or client side
>>> JavaScript? The AJAX way will work for sure. I think via JavaScript
>>> you will have to "manually" recreate it when making it visible....
>>>
>>> Ernesto
>>>
>>> On Fri, Jan 21, 2011 at 12:11 PM, Swanthe Lindgren
>>> <sw...@megasol.se>    wrote:
>>>> Hello
>>>> I have a text field with jQuery DatePickerBehavior. When the page is
>>>> loaded
>>>> and the field is initially visible, the behavior works just fine. But
>>>> when
>>>> toggling the visibility from hidden to visible, the client function is
>>>> gone.
>>>> The little date packer icon is gone and so is the click event on the
>>>> input
>>>> field.
>>>>
>>>> What do I have to do?
>>>>
>>>> //Swanthe
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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: DatePickerBehavior lost when toggling visibility

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
Are you using wiquery? If so, can you show me your code or send me a
simplified Panel showing this behavior? I use wiquery  datepickers on
my applications in combination with via AJAX replacements and do not
have this issue.

Ernesto

On Fri, Jan 21, 2011 at 12:41 PM, Swanthe Lindgren
<sw...@megasol.se> wrote:
> A drop down box fires an AJAX request and the text field  with the date
> picker has an overridden isVisible() method.
>
> On 2011-01-21 12:35, Ernesto Reinaldo Barreiro wrote:
>>
>> How do you toggle visibility? Replacing panels via AJAX or client side
>> JavaScript? The AJAX way will work for sure. I think via JavaScript
>> you will have to "manually" recreate it when making it visible....
>>
>> Ernesto
>>
>> On Fri, Jan 21, 2011 at 12:11 PM, Swanthe Lindgren
>> <sw...@megasol.se>  wrote:
>>>
>>> Hello
>>> I have a text field with jQuery DatePickerBehavior. When the page is
>>> loaded
>>> and the field is initially visible, the behavior works just fine. But
>>> when
>>> toggling the visibility from hidden to visible, the client function is
>>> gone.
>>> The little date packer icon is gone and so is the click event on the
>>> input
>>> field.
>>>
>>> What do I have to do?
>>>
>>> //Swanthe
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: DatePickerBehavior lost when toggling visibility

Posted by Swanthe Lindgren <sw...@megasol.se>.
A drop down box fires an AJAX request and the text field  with the date 
picker has an overridden isVisible() method.

On 2011-01-21 12:35, Ernesto Reinaldo Barreiro wrote:
> How do you toggle visibility? Replacing panels via AJAX or client side
> JavaScript? The AJAX way will work for sure. I think via JavaScript
> you will have to "manually" recreate it when making it visible....
>
> Ernesto
>
> On Fri, Jan 21, 2011 at 12:11 PM, Swanthe Lindgren
> <sw...@megasol.se>  wrote:
>> Hello
>> I have a text field with jQuery DatePickerBehavior. When the page is loaded
>> and the field is initially visible, the behavior works just fine. But when
>> toggling the visibility from hidden to visible, the client function is gone.
>> The little date packer icon is gone and so is the click event on the input
>> field.
>>
>> What do I have to do?
>>
>> //Swanthe
>>
>>
>> ---------------------------------------------------------------------
>> 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: DatePickerBehavior lost when toggling visibility

Posted by Ernesto Reinaldo Barreiro <re...@gmail.com>.
How do you toggle visibility? Replacing panels via AJAX or client side
JavaScript? The AJAX way will work for sure. I think via JavaScript
you will have to "manually" recreate it when making it visible....

Ernesto

On Fri, Jan 21, 2011 at 12:11 PM, Swanthe Lindgren
<sw...@megasol.se> wrote:
> Hello
> I have a text field with jQuery DatePickerBehavior. When the page is loaded
> and the field is initially visible, the behavior works just fine. But when
> toggling the visibility from hidden to visible, the client function is gone.
> The little date packer icon is gone and so is the click event on the input
> field.
>
> What do I have to do?
>
> //Swanthe
>
>
> ---------------------------------------------------------------------
> 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: DatePickerBehavior lost when toggling visibility

Posted by Swanthe Lindgren <sw...@megasol.se>.
I have produced a small quickstart (attached). Hope someone can help me 
out on this.

//Swanthe


On 2011-01-21 12:11, Swanthe Lindgren wrote:
> Hello
> I have a text field with jQuery DatePickerBehavior. When the page is 
> loaded and the field is initially visible, the behavior works just 
> fine. But when toggling the visibility from hidden to visible, the 
> client function is gone. The little date packer icon is gone and so is 
> the click event on the input field.
>
> What do I have to do?
>
> //Swanthe
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>