Hi Michael,
On 6 July 2011 20:03, Michael Hermanto <[email protected]> wrote:
> Sorry for the delay. Had a long 4-day weekend.
ah yes, it was a long weekend in the US :)
>
> preloadTokens (and preloadMetadatas) work similarly. In basic, it provides
> hooks when common container is instantiated to inline a map of gadget URLs
> to tokens (and metadatas), to warm-up the internal cache, to avoid XHR
> request when a gadget is navigated to. To use, as an example (roughly):
>
> var container = new osapi.container.Container({
> preloadMetadatas: { ... },
> preloadTokens: { ... },
> ...
> });
>
> This is injected by the server-side, through templating engine of your
> choice.
> Look at preloadFromConfig_ impl to see how this is consumed.
>
>
yes I figured out already when to call the preloadTokens or preloadMetadata
but I'm looking for a (working) example of the {...} part. Do you happen to
have samples of that?
Jasha
>
> On Mon, Jul 4, 2011 at 9:29 AM, Jasha Joachimsthal <
> [email protected]> wrote:
>
>> Could you please give me more information, Mike?
>>
>> Jasha
>>
>>
>> On 1 July 2011 03:07, Ryan J Baxter <[email protected]> wrote:
>> > Mike should be able to give more information on this since he wrote the
>> > common container.
>> >
>> > -Ryan
>> >
>> > Email: [email protected]
>> > Phone: 978-899-3041
>> > developerWorks Profile
>> >
>> >
>> >
>> > From: Jasha Joachimsthal <[email protected]>
>> > To: [email protected],
>> > Date: 06/29/2011 07:34 AM
>> > Subject: Usage or example of preloadTokens
>> >
>> >
>> >
>> > Hi,
>> >
>> > if there anyone who has a (working) example of preloadTokens in
>> > osapi.container.ContainerConfig (container/container.js)? I guess that's
>> > what I need if I want to pass my own security tokens but without
>> > documentation or a test case it's hard to find out how it is expected to
>> > work.
>> >
>> > Jasha Joachimsthal
>> >
>> > Europe - Amsterdam - Oosteinde 11, 1017 WT Amsterdam - +31(0)20 522
>> 4466
>> > US - Boston - 1 Broadway, Cambridge, MA 02142 - +1 877 414 4776 (toll
>> > free)
>> >
>> > www.onehippo.com
>> >
>> >
>> >
>> >
>>
>
>