You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jakob Günther <ja...@yahoo.de> on 2007/01/18 18:13:41 UTC
Observer-Pattern in the Portal-Engine
Hello cocooners,
i try to realize an Observer-Pattern in the Portal-Engine. The idea is
that the coplets register at a main-component. This component (i would
prefer a javascript communicating with some pojo's) would fire event
back to the registered coplets when their calculated data is ready. But
i dont know how to get the coplets refreshed before sended. I always
have to refresh the browser and thats of course no solution.
I use cocoon 2.1.9
I fire CopletJXPathEvent's in my JS-Function doEvent
the part of my sitemap:
<map:match pattern="portal">
<map:select type="request-param">
<map:parameter name="parameter-name" value="loaded"/>
<map:when test="true">
<map:act type="auth-protect">
<map:parameter name="handler"
value="portal-handler"/>
<map:parameter name="application" value="portal"/>
<map:transform
src="{portal-skin:skin.basepath}/styles/portal-page.xsl">
<map:parameter name="user" value="{ID}"/>
<map:parameter name="username"
value="{session:getAttribute(.,'username')}"/>
<map:parameter name="title"
value="{global:mainTitle}"/>
<map:parameter name="base"
value="{portalpath:relative}"/>
</map:transform>
<map:transform type="cinclude"/>
<map:transform type="portal-coplet"/>
<map:transform type="portal-new-eventlink"/>
<map:transform type="encodeURL"/>
<map:serialize type="html-include"/>
</map:act>
</map:when><map:otherwise>
<map:act type="auth-protect">
<map:parameter name="handler"
value="portal-handler"/>
<map:parameter name="application" value="portal"/>
<map:generate type="portal" label="content"/>
<map:call function = "doEvents"/>
</map:act>
</map:otherwise>
</map:select>
</map:match>
I hope, i could describe the problem. Im not that good in english.
Greetings,
Jakob