Em Wed, 25 Nov 2009 19:21:07 -0200, Howard Lewis Ship <hls...@gmail.com> escreveu:

I'm afraid its time to go for something a bit more structured:

@ImportJavaScript({
  @Import("classpath:foo.js" filter="IE5" combine=false),
  @Import("context:bar.js")})
public class MyJSComponent ...

Looks good to me. I just suggest not using just @Import, as it would be confusing for eventual other types of import.

What about

@ImportJavaScripts({
@ImportJavaScript(value = "classpath:foo.js", filter="IE5", combine=false),
   @ImportJavaScript("context:bar.js")})
public class MyJSComponent ...

It uses a similar convention naming used in the JPA annotations (@SecondaryTables, @SecondaryTable)

This raises some ambiguities: what if different imports of the same JS
file use different values for filter or combine?  I'd say that's an
error.

+1 for error.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, software architect and developer, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.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