On Wed, 23 Oct 2013 07:14:43 -0200, Steve <steves...@gmail.com> wrote:

Hi Lidija,

Hi, guys!

I had a similar question myself about conditionally including
libraries and I believe you can find the answer here:
http://tapestry.apache.org/javascript.html

If you scroll down (or ctrl +f) to "The importJavaScriptLibrary
method" - I think this may help you. It looks like the approach you
are using is also documented under "Approach 1: @Import".

@Import will always do the import. I you use JavaScriptSupport.importJavaScriptLibrary(), you can do it dynamically. In addition, your problem may be solved by adding a test in the JavaScript code to check whether the table is actually there before applying the jQuery data table on it.

Hope this helps, i'm new to Tapestry myself so please take what I say
with a pinch of salt, but the documentation seems to show how it can
be done (I believe you would just need an if statement in your page
class).

That's correct. :)

--
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

Reply via email to