The variable's value is dynamically generated by the component that is 
importing the library.
If there are multiple component, any component instance should win, and that's 
ok.


On Aug 18, 2011, at 3:22 PM, Robert Zeigler wrote:

> What if you include a bit of custom js in a separate file that defines the 
> variable?
> 
> component.js:
> var somevar="someval";
> 
> Then:
> 
> @Import(library={"component.js","context:js/gwtSupport.js"})
> public class GwtSupport{...}
> 
> Pretty sure that the order of the libraries in your @Import will be honored 
> in the import declarations on the page (but I don't remember offhand).
> 
> Robert
> 
> On Aug 18, 2011, at 8/183:14 PM , Lenny Primak wrote:
> 
>> I have a component like this:
>> 
>> @Import(library="context:js/gwtSupport.js")
>> public class GwtSupport
>> {
>>   // intentionally left blank
>> }
>> 
>> 
>> gwtSupport.js (actually the GWT component itself which I have no control 
>> over)
>> is trying to read a variable.
>> 
>> I wasn't able to figure out a way to set it before gwtSupport.js gets 
>> included.
>> 
>> I tried addInitializerCall, addScript, etc. but they all come after 
>> gwtSupport.js is included.
>> 
>> What am I missing?
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to