But if I try to use the script as a resource of my Panel, which would be ideal for making the panel a true component, then the URL is specific to that panel. A different panel, or other JS on my page which depends upon this script, would have the same Javascript referenced through a differnt URL.

  -- Scott

jan_bar wrote:
It doesn't matter how many times you have <script src=> with the same URL on
your page. It will be cached and downloaded only when needed.

Jan

"Scott Sauyet" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Hi Folks,

It's been far too long since I asked a question on this list.  One might
think I was starting to "get it".  :-)

I'm planning on building my first reusable panel soon; and I'm pretty
sure I understand what I need to in order to do this, but one thing is
nagging at me.  The panel will have associated Javascript.  This is
straightforward enough, but that Javascript file depends upon another
Javascript library, Ben Nolan's excellent Behaviours
(http://bennolan.com/behaviour/).  I use that library for things other
than this panel on some pages, but not on others.  I'd rather not
include it twice on a single page.

I could simply include the Behaviour library on each page, needed or
not, and have the panel assume that it will be in place.  But I really
don't like the idea that the panel can't be dropped into place.  It's
not meant as a reusable panel for anything off my current project, but
it feels somehow... wrong.  Perhaps I can add something to the Behaviour
library that will only define things if they haven't already been
defined, but that starts to bring back nightmares of old "#IFDEF" days;
possible but not pleasing.

So, I guess the question is, has anyone found an elegant solution to
this problem?  Am I missing something basic?

Thanks for all the help this list has given.

  -- Scott



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl






-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user







-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to