I was not able to reproduce this with CSS and realized that the
problem might be with injecting JavaScript on swapping. i also
noticed the following errors in the log files:
org.apache.wicket.protocol.http.PageExpiredException: No behaviors
attached to component [MarkupContainer [Component id =
mainMenuItemLink]]
at
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:105)
What could have caused these?
I also inspected the page that has this problem in production with
Firebug and noticed this in the <head> section:
<script id="" src_="../../resources/ce/dealbook2.js">
$(document).ready(function() {
$("a.fancy").fancybox({
'width' : '75%',
'height' : '90%',
'autoScale' : false,
'transitionIn' : 'elastic',
'transitionOut' : 'fade',
'type' : 'iframe'
});
});
; Wicket.functionExecuterCallbacks['script1'](); delete
Wicket.functionExecuterCallbacks['script1'];
</script>
The top of the file was written by us, but the last line was appended
by Wicket. Could you explain what this is doing?
Thanks,
Alec
On Thu, Sep 15, 2011 at 9:21 PM, Igor Vaynberg <[email protected]> wrote:
> that should work, please create a quickstart.
>
> -igor
>
> On Thu, Sep 15, 2011 at 8:06 PM, Alec Swan <[email protected]> wrote:
>> Hello,
>>
>> Our app uses panel swapping as a tabbing implementation.
>>
>> I noticed that if I inject CSS using
>> component.add(CSSPackageResource.getHeaderContribution(resourceRef,
>> media)) during panel construction, then the CSS is included correctly
>> and takes effect after the panel swap. However, if I inject the same
>> CSS in IHeaderContributor#renderHead() using
>> response.renderCSSReference(resourceRef, media) then CSS is not
>> included after the panel swap and hence does not take effect.
>>
>> How can I get CSS injection to work in IHeaderContributor#renderHead()?
>>
>> Thanks,
>>
>> Alec
>>
>> ---------------------------------------------------------------------
>> 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]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]