Open GoogleCodeExporter opened 9 years ago
I do some inspection into the code a little and find out something:
If I just add Wiquery in to Maven's pom.xml
-> The default
"org.apache.wicket.markup.html.internal.HtmlHeaderContainer"
is immediatly replaced by
"WiQueryDecoratingHeaderResponse"
... which is weird ,
why I've never use any of Wiquery function but the
WiQueryDecoratingHeaderResponse show up in my response ???
Or JQWicket mislead to create a wrong HeaderResponse ...
After that, the way Wiquery does with the Order of JS file is misterious too...
:p
----------------------------------------
WiQueryDecoratingHeaderResponse .java source code
----------------------------------------
private void renderResponse()
{
Page page = (Page) ((IPageRequestHandler) getActiveRequestHandler()).getPage();
Long renderTime = page.getMetaData(WIQUERY_PAGE_KEY);
Boolean rendered =
renderTime != null && renderTime.equals(RequestCycle.get().getStartTime());
page.setMetaData(WIQUERY_PAGE_KEY, RequestCycle.get().getStartTime());
RequestCycle.get().setMetaData(WIQUERY_KEY, Boolean.TRUE);
// return when response has already been rendered.
if (rendered)
return;
final List<WiQueryPluginRenderingListener> pluginRenderingListeners =
settings.getListeners();
WiQueryPluginCollector visitor = new WiQueryPluginCollector();
visitor.component(page, new Visit<Void>());
page.visitChildren(visitor);
JsStatement jsStatement = new JsStatement();
for (IWiQueryPlugin plugin : visitor.getPlugins())
{
JsStatement tempStatement = plugin.statement();
if (tempStatement != null)
{
jsStatement.append("\t").append(tempStatement.render()).append("\n");
}
// calling listeners to compute specific stuff
for (WiQueryPluginRenderingListener listener : pluginRenderingListeners)
{
listener.onRender(plugin, this);
}
}
jsq.setStatement(jsStatement);
}
----------------------------------------------------
Can one of core developer tell me what I miss, or what configuration should I
do when I want to run Wiquery and JQWicket at the same time?
Thank in advance!
Original comment by hn.sgmedia
on 26 Jan 2012 at 5:57
Original issue reported on code.google.com by
hn.sgmedia
on 26 Jan 2012 at 4:28Attachments: