Hi,

auto-components are added to the component tree not until rendering of markup, this is too late for header contributions.

Sven

Am 14.02.2012 07:33, schrieb Chris Colman:
Added a JIRA for this:

https://issues.apache.org/jira/browse/WICKET-4408

If I explicitly add the component to the parent it works but I can't do
this in our app.

________________________________

From: Chris Colman [mailto:[email protected]]
Sent: Tuesday, 14 February 2012 4:11 PM
To: [email protected]
Subject: Header contribution from a component resolved via an
IComponentResolver

Is header contribution meant to work when a component is not added
directly but added but added via an IComponentResolver?

I have component and have added a renderHead override:

Class MyComponent extends Panel
{
/**
  * Write out necessary header markup.
  */
@Override
public void renderHead(IHeaderResponse response)
{
     StringBuffer sb = new StringBuffer();

     sb.append("<script src=\"/jquery.easing.1.3.min.js\"></script>");
     sb.append("<script src=\"/trans-banner.min.js\"></script>");

     response.renderString(sb.toString());
}
}

But this method is never called. Is header contribution meant to work
this easily or am I missing something?

Using latest 1.5.x snapshot.

Yours sincerely,

Chris Colman

Pagebloom Team Leader,
Step Ahead Software


pagebloom - your business&  your website growing together

Sydney:           (+61 2) 9656 1278     Canberra: (+61 2) 6100 2120
Email: [email protected]<mailto://[email protected]>
Website:
http://www.pagebloom.com<blocked::http://www.pagebloom.com/>
http://develop.stepaheadsoftware.com
<blocked::http://develop.stepaheadsoftware.com/>





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to