With performance in consideration, how would you store multiple overlay types for the entire of your GWT app to use upon request?
With performance in consideration, how would you store multiple overlay types for the entire
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I understand correctly, you are wanting to reference an overlay type from anywhere within your application. In that case, consider creating a
public staticvariable.For example, say we have a JavaScript Overlay Type called
Book. Inside of it, we can create a static variable to hold our global instance.Then later on, we reference it from wherever we want:
Truth be told, this is how any “global” variable works in Java. Overlay types happen to work the same way!
Do note that there is no magic happening by putting the
instanceinside of the Book class. You could very easily do the same thing:and later: