You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by manumoreno <we...@gmail.com> on 2014/09/09 17:59:43 UTC
Problem getting data from a 'CharSequenceResource'
Hi, I need some advice to get data from a CharSequenceResource:
The Resource:
The request is provided by an asynchronous ajax request (from JQuery)
to a url like 'http://<domain>/getjson'
and that is mounted as:
The component is an tag, binded in wicket,.
The 'click: save' launchs the $.ajax.
The problem is that is Ok,
but is first a null string and later is desynchronized,
it writes one string from behind.
How can I refer to that string from the AjaxFallbackLink?, the
"MyResource._str" reference
is obviously incorrect. :(
Thx
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-getting-data-from-a-CharSequenceResource-tp4667434.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem getting data from a 'CharSequenceResource'
Posted by manumoreno <we...@gmail.com>.
Martin Grigorov-4 wrote
>> Do you think is feasible use two events in the same
>> component ?, for example,. an 'event: {onfocus}' from Knockout and the
>> AjaxFallbacklink?
>>
>
> It is OK (if you know what you are doing!).
Thx a lot, everything worked fine with two different events.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-getting-data-from-a-CharSequenceResource-tp4667434p4667464.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem getting data from a 'CharSequenceResource'
Posted by Martin Grigorov <mg...@apache.org>.
On Wed, Sep 10, 2014 at 9:40 AM, manumoreno <we...@gmail.com> wrote:
> Martin Grigorov-4 wrote
> > Hi,
> >
> > The
>
> > element has two JavaScript event listeners for 'click' event - one
> > by Wicket's AjaxFallbackLink and another by (Knockout.js ?!) data-bind
> > attribute.
> > The order of their execution is not determined.
> > If Wicket's listener is called first then it will get the old value:
> > null,
> > click1, click2, etc.
> > While data-bind's listener will get: click1, click2, click3, etc.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
>
> Ough!, yes, there are two event listeners for click,. (Knockout, good
> guess!), I think I'll try to make two components separately or use
> different
> events.
>
> Do you think is feasible use two events in the same
> component ?, for example,. an 'event: {onfocus}' from Knockout and the
> AjaxFallbacklink?
>
It is OK (if you know what you are doing!).
>
> Thanks a lot Martin,.
>
Welcome!
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-getting-data-from-a-CharSequenceResource-tp4667434p4667443.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Problem getting data from a 'CharSequenceResource'
Posted by manumoreno <we...@gmail.com>.
Martin Grigorov-4 wrote
> Hi,
>
> The
> element has two JavaScript event listeners for 'click' event - one
> by Wicket's AjaxFallbackLink and another by (Knockout.js ?!) data-bind
> attribute.
> The order of their execution is not determined.
> If Wicket's listener is called first then it will get the old value:
> null,
> click1, click2, etc.
> While data-bind's listener will get: click1, click2, click3, etc.
>
> Martin Grigorov
> Wicket Training and Consulting
> https://twitter.com/mtgrigorov
Ough!, yes, there are two event listeners for click,. (Knockout, good
guess!), I think I'll try to make two components separately or use different
events.
Do you think is feasible use two events in the same
component ?, for example,. an 'event: {onfocus}' from Knockout and the
AjaxFallbacklink?
Thanks a lot Martin,.
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Problem-getting-data-from-a-CharSequenceResource-tp4667434p4667443.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Problem getting data from a 'CharSequenceResource'
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
The <a> element has two JavaScript event listeners for 'click' event - one
by Wicket's AjaxFallbackLink and another by (Knockout.js ?!) data-bind
attribute.
The order of their execution is not determined.
If Wicket's listener is called first then it will get the old value: null,
click1, click2, etc.
While data-bind's listener will get: click1, click2, click3, etc.
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Tue, Sep 9, 2014 at 6:59 PM, manumoreno <we...@gmail.com> wrote:
> Hi, I need some advice to get data from a CharSequenceResource:
>
> The Resource:
>
>
>
> The request is provided by an asynchronous ajax request (from JQuery)
> to a url like 'http://<domain>/getjson'
>
>
>
> and that is mounted as:
>
>
>
>
> The component is an tag, binded in wicket,.
>
>
>
>
>
> The 'click: save' launchs the $.ajax.
>
> The problem is that is Ok,
> but is first a null string and later is desynchronized,
> it writes one string from behind.
>
> How can I refer to that string from the AjaxFallbackLink?, the
> "MyResource._str" reference
> is obviously incorrect. :(
>
> Thx
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Problem-getting-data-from-a-CharSequenceResource-tp4667434.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>