Hi Wotan,
I'm not sure if this will actually work, but if you're entering the jxtemplate
after a sendPage from flow, you can try to use the flow-attr input module. That
way you can reach components defined in your flowscript from the sitemap.
I guess you can then try to do something like:
<map:generate type="jx" src="blocks.xml">
<map:parameter name="contextPath" value="{request:contextPath}"/>
<map:parameter name="sitemapAsBase" value="{baselink:SitemapBaseLink}"/>
<map:parameter name="requestAsBase" value="{baselink:RequestBaseLink}"/>
<map:parameter name="base-url" value="{global:base-url}"/>
<map:parameter name="factory" value="{flow-attr:factory}"/>
</map:generate>
I hope this helps you out.
Regards,
Jeroen Reijn
Hippo
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf
Of Wotan von Klass
Posted At: maandag 11 september 2006 13:39
Posted To: Cocoon User List
Conversation: Access component in JXTemplate
Subject: Access component in JXTemplate
Hello,
Ive a problem with accessing a component. Maybe someone can help me:
The component is defined in cocoon.xconf with:
<component class="de.cocoon.hibernate.HibernateFactory"
role="de.cocoon.persistantfactory.PersistenceFactory"/>
and I can access it in the flowscript with:
var factory =
cocoon.getComponent(Packages.de.cocoon.persistantfactory.PersistenceFactory.ROLE);
Now I want to access it in an JXTemplateGenerator in the sitemap:
The call at the moment is:
<map:generate type="jx" src="blocks.xml">
<map:parameter name="contextPath" value="{request:contextPath}"/>
<map:parameter name="sitemapAsBase"
value="{baselink:SitemapBaseLink}"/>
<map:parameter name="requestAsBase"
value="{baselink:RequestBaseLink}"/>
<map:parameter name="base-url" value="{global:base-url}"/>
</map:generate>
but in blocks.xml I only have request, session, context and so on. So
how can i access it there? Is there a parameter for the cocoon object?
Thanks a lot
Wotan von Klass
---------------------------------------------------------------------
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]