What about components that use different versions of a similarly named
js, or two different components that use a similarly named, but
entirely different js file? (i.e. Tree.js)  Or what if my version of a
component uses a tweaked version of ExtJs?

Is there a way (or a need) to have namespaces for component's js
files?  Maybe naming the js files with the component's package name,
since we are already solving this problem when it comes to
classes/pages?

On Jan 11, 2008 12:27 PM, Michael Lake <[EMAIL PROTECTED]> wrote:
>
> Let's say Sven, Chris, and I each are creating component libraries for
> re-use and each of us are using the ExtJs library.
>
> And supposing that a T5 project used all of our libraries, then there
> could potentially be a conflict on the client side
> because multiple javascript files of the same library (with different
> package locations) might get included on the same page.
> (i suppose it might depend on the specific js library and how it might
> handle onPageLoad events for example)
>
> wouldn't it make sense to have a single ExtJs library that could be
> shared by each of our component libraries?
>
> A library with just Ext might look something like this:
>
> public class ExtModule {
>
>       public static void
> contributeFactoryDefaults(MappedConfiguration<String, String>
> configuration) {
>
>           configuration.add("tapestry.ext2", "classpath:$
> {tapestry.ext2.path}");
>           configuration.add("tapestry.ext2.path", "net/sourceforge/mtc/
> ext_2_0");
>      }
>
> }
>
>
> And could then be used in each of our libraries in the following way
> (after adding the dependency in maven):
>
>     @Inject
>     @Path("${tapestry.ext2}/resources/css/ext-all.css")
>      private Asset _extAllStyle;
>
>
>
> Does this make sense? are there things to look out for in the
> licenses? What's the future in this?
>
> -mike
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to