mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-02 15:41:36 +02:00
fixes to dynamic codegen
This commit is contained in:
parent
a0392bbd64
commit
e12ca44470
@ -66,7 +66,7 @@ public:
|
||||
void renderBody(const Renderable* pRenderable, const RenderContext& context, std::ostream& ostr);
|
||||
/// Emits code for the page body to the given output stream.
|
||||
|
||||
void renderVariables(const DynamicCodeLoader* pLoader, const RenderContext& context, std::ostream& ostr);
|
||||
static void renderVariables(const DynamicCodeLoader* pLoader, const RenderContext& context, std::ostream& ostr);
|
||||
// You must first call renderVariables then renderHead
|
||||
|
||||
private:
|
||||
|
@ -119,7 +119,6 @@ void DynamicCodeLoaderRenderer::renderHead(const Renderable* pRenderable, const
|
||||
}
|
||||
|
||||
// write loadAll
|
||||
str << "function " << pLoader->loadAllFunctionName() << "(){" << std::endl;
|
||||
|
||||
std::vector<const DynamicCodeLoader*>::const_iterator it = deps.begin();
|
||||
str << "function " << pLoader->loadAllFunctionName() << "(){" << std::endl;
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "Poco/WebWidgets/ExtJS/PageRenderer.h"
|
||||
#include "Poco/WebWidgets/ExtJS/Utility.h"
|
||||
#include "Poco/WebWidgets/ExtJS/PanelRenderer.h"
|
||||
#include "Poco/WebWidgets/ExtJS/DynamicCodeLoaderRenderer.h"
|
||||
#include "Poco/WebWidgets/Page.h"
|
||||
#include "Poco/WebWidgets/Panel.h"
|
||||
#include "Poco/WebWidgets/RenderContext.h"
|
||||
@ -146,13 +147,20 @@ void PageRenderer::renderHead(const Renderable* pRenderable, const RenderContext
|
||||
ostr << "oHead.appendChild(oScript);" << std::endl;
|
||||
ostr << "}" << std::endl;
|
||||
}
|
||||
std::set<DynamicCodeLoader::Ptr>::const_iterator itDC = dcls.begin();
|
||||
for (; itDC != dcls.end(); ++itDC)
|
||||
{
|
||||
(*itDC)->renderHead(context, ostr);
|
||||
std::set<DynamicCodeLoader::Ptr>::const_iterator itDC = dcls.begin();
|
||||
for (; itDC != dcls.end(); ++itDC)
|
||||
{
|
||||
DynamicCodeLoaderRenderer::renderVariables((*itDC), context, ostr);
|
||||
}
|
||||
}
|
||||
{
|
||||
std::set<DynamicCodeLoader::Ptr>::const_iterator itDC = dcls.begin();
|
||||
for (; itDC != dcls.end(); ++itDC)
|
||||
{
|
||||
(*itDC)->renderHead(context, ostr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
ostr << "Ext.onReady(function() {";
|
||||
ostr << "var " << VAR_LOCALTMP << ";"; // tmp variable needed for table renderer
|
||||
|
Loading…
x
Reference in New Issue
Block a user