You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by TechniciuM <a1...@rppkn.com> on 2012/03/14 20:40:52 UTC
Difference between tml and java importing js
Hi, as title denotes, I would like to know what is the difference between tml
and java importing javascript. Examples shown below.
JAVA page
@Import(library="../dimitriy/bogdanov/bootstrap-dropdown.js")
and
TML page
Discussion about this topic is appreciated. :)
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Difference-between-tml-and-java-importing-js-tp5565945p5565945.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Difference between tml and java importing js
Posted by TechniciuM <a1...@rppkn.com>.
Thank you for the explanation. :)
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Difference-between-tml-and-java-importing-js-tp5565945p5568052.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Difference between tml and java importing js
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, 14 Mar 2012 17:02:07 -0300, Michael Gentry <mg...@masslight.net>
wrote:
> How about this, instead:
>
> JAVA *component*
> @Import(library="../dimitriy/bogdanov/bootstrap-dropdown.js")
>
> and
>
> TML *component*
>
> If your component is rendered multiple times in a page, then the TML
> method will import the JS repeatedly. Tapestry is smart enough, even
> in the Java component, to know if it has already been imported and not
> import it multiple times. This applies to CSS, too.
Exactly. The same is valid for mixing components and page imports in the
same page: using @Import, Tapestry is smart enough to not include the same
.js or .css twice even if the page, components and mixins inside the page
import the same files.
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Difference between tml and java importing js
Posted by Michael Gentry <mg...@masslight.net>.
How about this, instead:
JAVA *component*
@Import(library="../dimitriy/bogdanov/bootstrap-dropdown.js")
and
TML *component*
If your component is rendered multiple times in a page, then the TML
method will import the JS repeatedly. Tapestry is smart enough, even
in the Java component, to know if it has already been imported and not
import it multiple times. This applies to CSS, too.
mrg
On Wed, Mar 14, 2012 at 3:40 PM, TechniciuM <a1...@rppkn.com> wrote:
> Hi, as title denotes, I would like to know what is the difference between tml
> and java importing javascript. Examples shown below.
>
> JAVA page
> @Import(library="../dimitriy/bogdanov/bootstrap-dropdown.js")
>
> and
>
> TML page
>
>
> Discussion about this topic is appreciated. :)
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Difference-between-tml-and-java-importing-js-tp5565945p5565945.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org