Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow loading JSON from an existing object/string #38

Open
capeterson opened this issue Feb 21, 2012 · 1 comment
Open

Allow loading JSON from an existing object/string #38

capeterson opened this issue Feb 21, 2012 · 1 comment

Comments

@capeterson
Copy link

Background: I'm looking at using timeglider in an open-source project that runs on top of salesforce.com, which means I'm stuck and/or blessed with following the way their platform runs. While on salesforce it's possible to have a "normal" ajax URL that returns a JSON string, it has extra overhead performance-wise and is a sperate "page" that has to have access granted for it, making this approach sub-optimal.

WIth that said, they have a very nice system that allows you to annotate a method and have it directly callable from within a page, e.g. the javascript String someJSON = myClass.getJSON(); would handle all the work of making the "AJAX" request, escaping it, etc. for me. However, I can't use this approach with timeglider as it required a URL to fetch data from, and doesn't seem to be able to directly accept a string or object to use as a data source. If this were possible it would make my life much easier, and in one use case would prevent the same data from being generated twice on the server side.

@timeglider
Copy link
Owner

Hi Chris

You can use a data object rather than a URL for loading
into Timeglider: it just has to have the same properties the
JSON would have had. Try loading a data object that's
just like timeglider JSON into the "source" option for the
widget.

Out of curiosity, can you tell me more about the open source
project you're using? While I'm excited about integration with
Salesforce, Timeglider has a commercial/non-commercial license
structure. If you're doing something "non-commercial", it's free,
but there is a license fee for commercial use.

Email me directly about this, since it's not code/git
related: [email protected]

Thanks!

On Tue, Feb 21, 2012 at 2:46 PM, Chris Peterson <
[email protected]

wrote:

Background: I'm looking at using timeglider in an open-source project that
runs on top of salesforce.com, which means I'm stuck and/or blessed with
following the way their platform runs. While on salesforce it's possible to
have a "normal" ajax URL that returns a JSON string, it has extra overhead
performance-wise and is a sperate "page" that has to have access granted
for it, making this approach sub-optimal.

WIth that said, they have a very nice system that allows you to annotate a
method and have it directly callable from within a page, e.g. the
javascript String someJSON = myClass.getJSON(); would handle all the work
of making the "AJAX" request, escaping it, etc. for me. However, I can't
use this approach with timeglider as it required a URL to fetch data from,
and doesn't seem to be able to directly accept a string or object to use as
a data source. If this were possible it would make my life much easier, and
in one use case would prevent the same data from being generated twice on
the server side.


Reply to this email directly or view it on GitHub:
#38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants