You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by vineet semwal <vi...@gmail.com> on 2012/06/11 07:24:31 UTC

call to Wicket.Ajax.get gives object is undefined

Hi,

in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
object inn firefox and in chrome it gives  Ajax request:TypeError:
Cannot read property 'length' of undefined.

-- 
thanks,

Vineet Semwal

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


Re: call to Wicket.Ajax.get gives object is undefined

Posted by vineet semwal <vi...@gmail.com>.
thank you martin !,i was able to do that with dynamic extra parameter ..

On Mon, Jun 11, 2012 at 6:09 PM, Martin Grigorov <mg...@apache.org> wrote:
> You need 'dep' - dynamic extra parameter.
> These are parameters which are evaluated when the Ajax call is about to be made.
>
>
> On Mon, Jun 11, 2012 at 12:16 PM, vineet semwal
> <vi...@gmail.com> wrote:
>> thanks martin,i initially assumed both are supported now :) ,i looked
>> at wiki ajax page again ,also i had a look at how ajaxlink is
>> generating script so i have now improved my js function ,now i am not
>> getting any error but i still can't pass value from javascript ,here
>> is the improved js code,
>>
>>   function acall(id,url){
>>        url = url + "&" + id + "=" + 'test';
>>        Wicket.Ajax.get({"u":url, "e": "onkeyup", "c":id});
>> }
>>
>>
>>
>> On Mon, Jun 11, 2012 at 1:20 PM, Martin Grigorov <mg...@apache.org> wrote:
>>> Hi Vineet,
>>>
>>> You don't use the new Wicket.Ajax.get() method syntax.
>>> You use: Wicket.Ajax.get(url, function() {}, function() {}); which is
>>> the 1.5.x way.
>>>
>>> The new is: Wicket.Ajax.get({ 'u': url });
>>>
>>> See the generated scripts for the wicket-example pages.
>>> At the Wiki page you can see the names of the keys of the JSON object
>>> that is used to configure the Ajax call, aka Ajax attributes.
>>>
>>> On Mon, Jun 11, 2012 at 10:44 AM, vineet semwal
>>> <vi...@gmail.com> wrote:
>>>> Hi martin-g,
>>>> no i can't reproduce on examples but i have attached a quickstart
>>>> here,please see if the attachment works here .
>>>>
>>>> On Mon, Jun 11, 2012 at 11:03 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>>> Can you reproduce this on
>>>>> http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?
>>>>>
>>>>> On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal <vi...@gmail.com> wrote:
>>>>>> Hi,
>>>>>>
>>>>>> in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
>>>>>> object inn firefox and in chrome it gives  Ajax request:TypeError:
>>>>>> Cannot read property 'length' of undefined.
>>>>>>
>>>>>> --
>>>>>> thanks,
>>>>>>
>>>>>> Vineet Semwal
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Martin Grigorov
>>>>> jWeekend
>>>>> Training, Consulting, Development
>>>>> http://jWeekend.com
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> thanks,
>>>>
>>>> Vineet Semwal
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> thanks,
>>
>> Vineet Semwal
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
thanks,

Vineet Semwal

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


Re: call to Wicket.Ajax.get gives object is undefined

Posted by Martin Grigorov <mg...@apache.org>.
You need 'dep' - dynamic extra parameter.
These are parameters which are evaluated when the Ajax call is about to be made.


On Mon, Jun 11, 2012 at 12:16 PM, vineet semwal
<vi...@gmail.com> wrote:
> thanks martin,i initially assumed both are supported now :) ,i looked
> at wiki ajax page again ,also i had a look at how ajaxlink is
> generating script so i have now improved my js function ,now i am not
> getting any error but i still can't pass value from javascript ,here
> is the improved js code,
>
>   function acall(id,url){
>        url = url + "&" + id + "=" + 'test';
>        Wicket.Ajax.get({"u":url, "e": "onkeyup", "c":id});
> }
>
>
>
> On Mon, Jun 11, 2012 at 1:20 PM, Martin Grigorov <mg...@apache.org> wrote:
>> Hi Vineet,
>>
>> You don't use the new Wicket.Ajax.get() method syntax.
>> You use: Wicket.Ajax.get(url, function() {}, function() {}); which is
>> the 1.5.x way.
>>
>> The new is: Wicket.Ajax.get({ 'u': url });
>>
>> See the generated scripts for the wicket-example pages.
>> At the Wiki page you can see the names of the keys of the JSON object
>> that is used to configure the Ajax call, aka Ajax attributes.
>>
>> On Mon, Jun 11, 2012 at 10:44 AM, vineet semwal
>> <vi...@gmail.com> wrote:
>>> Hi martin-g,
>>> no i can't reproduce on examples but i have attached a quickstart
>>> here,please see if the attachment works here .
>>>
>>> On Mon, Jun 11, 2012 at 11:03 AM, Martin Grigorov <mg...@apache.org> wrote:
>>>> Can you reproduce this on
>>>> http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?
>>>>
>>>> On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal <vi...@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
>>>>> object inn firefox and in chrome it gives  Ajax request:TypeError:
>>>>> Cannot read property 'length' of undefined.
>>>>>
>>>>> --
>>>>> thanks,
>>>>>
>>>>> Vineet Semwal
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>> thanks,
>>>
>>> Vineet Semwal
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> thanks,
>
> Vineet Semwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: call to Wicket.Ajax.get gives object is undefined

Posted by vineet semwal <vi...@gmail.com>.
thanks martin,i initially assumed both are supported now :) ,i looked
at wiki ajax page again ,also i had a look at how ajaxlink is
generating script so i have now improved my js function ,now i am not
getting any error but i still can't pass value from javascript ,here
is the improved js code,

   function acall(id,url){
	url = url + "&" + id + "=" + 'test';
 	Wicket.Ajax.get({"u":url, "e": "onkeyup", "c":id});
}



On Mon, Jun 11, 2012 at 1:20 PM, Martin Grigorov <mg...@apache.org> wrote:
> Hi Vineet,
>
> You don't use the new Wicket.Ajax.get() method syntax.
> You use: Wicket.Ajax.get(url, function() {}, function() {}); which is
> the 1.5.x way.
>
> The new is: Wicket.Ajax.get({ 'u': url });
>
> See the generated scripts for the wicket-example pages.
> At the Wiki page you can see the names of the keys of the JSON object
> that is used to configure the Ajax call, aka Ajax attributes.
>
> On Mon, Jun 11, 2012 at 10:44 AM, vineet semwal
> <vi...@gmail.com> wrote:
>> Hi martin-g,
>> no i can't reproduce on examples but i have attached a quickstart
>> here,please see if the attachment works here .
>>
>> On Mon, Jun 11, 2012 at 11:03 AM, Martin Grigorov <mg...@apache.org> wrote:
>>> Can you reproduce this on
>>> http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?
>>>
>>> On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal <vi...@gmail.com> wrote:
>>>> Hi,
>>>>
>>>> in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
>>>> object inn firefox and in chrome it gives  Ajax request:TypeError:
>>>> Cannot read property 'length' of undefined.
>>>>
>>>> --
>>>> thanks,
>>>>
>>>> Vineet Semwal
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> thanks,
>>
>> Vineet Semwal
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
thanks,

Vineet Semwal

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


Re: call to Wicket.Ajax.get gives object is undefined

Posted by Martin Grigorov <mg...@apache.org>.
Hi Vineet,

You don't use the new Wicket.Ajax.get() method syntax.
You use: Wicket.Ajax.get(url, function() {}, function() {}); which is
the 1.5.x way.

The new is: Wicket.Ajax.get({ 'u': url });

See the generated scripts for the wicket-example pages.
At the Wiki page you can see the names of the keys of the JSON object
that is used to configure the Ajax call, aka Ajax attributes.

On Mon, Jun 11, 2012 at 10:44 AM, vineet semwal
<vi...@gmail.com> wrote:
> Hi martin-g,
> no i can't reproduce on examples but i have attached a quickstart
> here,please see if the attachment works here .
>
> On Mon, Jun 11, 2012 at 11:03 AM, Martin Grigorov <mg...@apache.org> wrote:
>> Can you reproduce this on
>> http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?
>>
>> On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal <vi...@gmail.com> wrote:
>>> Hi,
>>>
>>> in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
>>> object inn firefox and in chrome it gives  Ajax request:TypeError:
>>> Cannot read property 'length' of undefined.
>>>
>>> --
>>> thanks,
>>>
>>> Vineet Semwal
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> thanks,
>
> Vineet Semwal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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


Re: call to Wicket.Ajax.get gives object is undefined

Posted by vineet semwal <vi...@gmail.com>.
Hi martin-g,
no i can't reproduce on examples but i have attached a quickstart
here,please see if the attachment works here .

On Mon, Jun 11, 2012 at 11:03 AM, Martin Grigorov <mg...@apache.org> wrote:
> Can you reproduce this on
> http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?
>
> On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal <vi...@gmail.com> wrote:
>> Hi,
>>
>> in wicket 6.x, call to �Wicket.Ajax.get method gives me undefined
>> object inn firefox and in chrome it gives �Ajax request:TypeError:
>> Cannot read property 'length' of undefined.
>>
>> --
>> thanks,
>>
>> Vineet Semwal
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
thanks,

Vineet Semwal

Re: call to Wicket.Ajax.get gives object is undefined

Posted by Martin Grigorov <mg...@apache.org>.
Can you reproduce this on
http://www.wicket-library.com/wicket-examples-6.0.x/ajax ?

On Mon, Jun 11, 2012 at 8:24 AM, vineet semwal <vi...@gmail.com> wrote:
> Hi,
>
> in wicket 6.x, call to  Wicket.Ajax.get method gives me undefined
> object inn firefox and in chrome it gives  Ajax request:TypeError:
> Cannot read property 'length' of undefined.
>
> --
> thanks,
>
> Vineet Semwal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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