Hello all,

I am running into some odd behavior with 1.2.6 when I add a
ModalWindow to a ModalWindow.  We have subclassed ModalWindow to add
our own css & js.  The relevant part of that is:

public class AthenaModalWindow extends ModalWindow
{
        private static ResourceReference VEGAS_JS = new
ResourceReference(AthenaModalWindow.class,"vegas_modal.js");

        public AthenaModalWindow(String id, boolean useDefaultTitle)
        {
                super(id);
                add(HeaderContributor.forCss("/style/vegas_modal.css"));
                add(HeaderContributor.forJavaScript("/js/dojo.js"));
                add(HeaderContributor.forJavaScript(VEGAS_JS));
etc.

When I open a page with an AthenaModalWindow I see the following in the header:

<link type="text/css" rel="stylesheet" href="/mytrip/style/cart_global.css">
<link 
href="https://sb-www.vegas.com/mytrip/app/resources/wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css";
type="text/css" rel="stylesheet">
<link href="/mytrip/style/vegas_modal.css" type="text/css" rel="stylesheet">

Now when I try to open another AthenaModalWindow from within the above
ModalWindow I see the following added to the header

<link id="" rel="stylesheet"
href="http://www.vegas.com/mytrip/style/cart_global.css";
type="text/css">
<link id="" rel="stylesheet"
href="/mytrip/app/resources/wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css"
type="text/css">

At this point the css work that we have done in vegas_modal.css is
overridden by the re-introduction of modal.css.  Note the change of
modal.css' href

1) 
https://sb-www.vegas.com/mytrip/app/resources/wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css
2) 
/mytrip/app/resources/wicket.extensions.ajax.markup.html.modal.ModalWindow/res/modal.css

Conversely, the href for cart_global.css undergoes the opposite transformation:

1) /mytrip/style/cart_global.css
2) http://www.vegas.com/mytrip/style/cart_global.css

How can I control this so that modal.css is not added a 2nd time?
When I use FireBug to remove the 2nd copy of modal.css all of my
layout problems go away.

Thank you,
Scott

-- 
Scott Swank
reformed mathematician

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

Reply via email to