On Thu, 25 Sep 2014 10:45:44 -0300, Carlos Gómez Montiel
<ibe...@gmail.com> wrote:
Hi Thiago
Ok, I will more specific:
Hi!
Thanks for being more specific. :) We want to help, but it's quite hard
I'm developing a Tapestry component (GMapShow) that renders a google
map. If I include the google maps javascript library directly in this
component, the map is not render if the component is inside a block, so
I need to include the library BEFORE the block (with the GMapShow
component) is rendered.
So, I have created a component to only include the Google Maps library:
public class ImportGMapLib {
@Inject
private JavaScriptSupport javaScriptSupport;
public void beginRender() {
javaScriptSupport.importJavaScriptLibrary("https://maps.googleapis.com/maps/api/js?v=3.exp");
}
}
By the way, from T5.4 on, you can use https://, http:// and //: in @Import.
Where's your JavaScript? How are you including it? That's probably the
source of your problem.
If you put your JavaScript code inside a .js file and included using
@Import or JavaScriptSupport.importJavaScriptLibrary(), your code would be
automatically included after the library you're using.
That's why we ask people more information and snippets of code when asking
help: the original question in the subject of the message (how can I
validate if a script is present), which, by the way, is
JavaScript-specific, not Tapestry-specific, wouldn't need to be asked.
--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org