Browser giving me a little trouble.  Apologies if I double-submitted this.
My respoonse:

I didn't even know such a website existed.  Thanks.

I am trying to implement the HeaderResponseContainer and filter
suggestion.  In my component I added the container:

add(new HiddenField(INTERNAL_HIDDEN_ROWS_SELECTED, new
Model("")).setOutputMarkupId(true).setMarkupId(INTERNAL_HIDDEN_ROWS_SELECTED));
add(new HiddenField(INTERNAL_HIDDEN_COLUMN_SYNCH, new Model("")));
add(new HeaderResponseContainer("gridCode", "gridCodeFilter"));

I added the HTML to my component (notice same level as those hiddens)
<wicket:panel>
 <div class="enotes">
  <input type="hidden" wicket:id="_gridRowsSelected" id="_gridRowsSelected"
/>
  <input type="hidden" wicket:id="_gridColSynch" id="_gridColSynch" />
  <div id="eNoteGrid"></div>
 </div>
 <wicket:container wicket:id="gridCode" />
</wicket:panel>

And in the renderHead I do:
@Override
public void renderHead(Component comp, IHeaderResponse response) {
          super.renderHead(comp, response);

          callbackUrl = behavior.getCallbackUrl().toString();
//JS
 response.render(JavaScriptHeaderItem.forReference(new
JavaScriptResourceReference(ExtGrid.class, "ExtGridSupport.js")));
 response.render(new
FilteredHeaderItem(JavaScriptContentHeaderItem.forScript(writeGridJS(),
getId() + "_js"), "gridCodeFilter"));
}

But I am getting:
Failed to handle: <wicket:container wicket:id="gridCode"/>. It might be
that no resolver has been registered to handle this special tag.  But it
also could be that you declared wicket:id=gridCode in your markup, but that
you either did not add the component to your page at all, or that the
hierarchy does not match.
 MarkupStream: [markup =
file:/C:/views/EquitShare_Development/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/AFMSShared/gov/usdoj/afms/shared/wicket/ext/grid/ExtGrid.html
<wicket:panel>
 <div class="enotes">
  <input type="hidden" wicket:id="_gridRowsSelected"
id="_gridRowsSelected"/>
  <input type="hidden" wicket:id="_gridColSynch" id="_gridColSynch"/>
  <div id="eNoteGrid"></div>
 </div>
 <wicket:container wicket:id="gridCode"/>
</wicket:panel>, index = 6, current =  '<wicket:container
wicket:id="gridCode"/>' (line 0, column 0)]
 at
org.apache.wicket.markup.MarkupStream.throwMarkupException(MarkupStream.java:526)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1409)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689)
 at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
 at
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689)
 at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
 at
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689)
 at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
 at
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
 at
org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1529)
 at
org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:689)
 at
org.apache.wicket.markup.html.panel.AssociatedMarkupSourcingStrategy.renderAssociatedMarkup(AssociatedMarkupSourcingStrategy.java:76)
 at
org.apache.wicket.markup.html.panel.PanelMarkupSourcingStrategy.onComponentTagBody(PanelMarkupSourcingStrategy.java:112)
 at org.apache.wicket.Component.internalRenderComponent(Component.java:2549)
 at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1493)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1390)
 at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
 at org.apache.wicket.Page.onRender(Page.java:876)
 at org.apache.wicket.markup.html.WebPage.onRender(WebPage.java:142)
 at org.apache.wicket.Component.internalRender(Component.java:2379)
 at org.apache.wicket.Component.render(Component.java:2307)
 at org.apache.wicket.Page.renderPage(Page.java:1010)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:121)
 at
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:219)
 at
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)
 at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:861)
 at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
 at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:261)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:218)
 at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:289)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:259)
 at
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:201)
 at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:282)



Brian Mulholland
"For every complex problem, there is an answer that is clear, simple and
wrong."
--H.L. Mencken
"Politics is the art of looking for trouble, finding it everywhere,
diagnosing it incorrectly, and applying the wrong remedies."
--Groucho Marx


On Thu, Jan 23, 2014 at 9:30 AM, Martin Grigorov-4 [via Apache Wicket] <
ml-node+s1842946n466391...@n4.nabble.com> wrote:

> Hi,
>
> Read http://wicketinaction.com/2012/07/wicket-6-resource-management/
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Thu, Jan 23, 2014 at 4:24 PM, Entropy <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=4663911&i=0>>
> wrote:
>
> > Hello, I am just converted to Wicket 6, and I have a line like this in
> one
> > component:
> >
> > response.render(JavaScriptHeaderItem.forScript(writeGridJS(), getId() +
> > "_js"));
> >
> > That writes some custom javascript which in turn run when Ext.onReady()
> is
> > ready.  However, this script generated so early that not only is the DOM
> > not
> > ready, Ext itself hasn't even been defined.  My header item is the
> second
> > item in the <HEAD>, and the Ext include is 3rd from last.  Even moving
> the
> > ext include to the top of the .html, it is still well below the code and
> > does not run in time.
> >
> > How can I make my header item render at the BOTTOM of the <head> instead
> of
> > at the top?
> >
> > --
> > View this message in context:
> >
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910.html
> > Sent from the Users forum mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4663911&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=4663911&i=2>
> >
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910p4663911.html
> To unsubscribe from Wicket 6 - JavaScriptHeaderItem renders too early, click
> here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4663910&code=YmxtdWxob2xsYW5kQGdtYWlsLmNvbXw0NjYzOTEwfC05NzMyODEwMzU=>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-6-JavaScriptHeaderItem-renders-too-early-tp4663910p4663913.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to