cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Coplet and generator question
Date Sat, 14 Jan 2006 11:02:17 GMT
Hello Barthi,

Now I know what you are looking for. The first thing you ask, is very well possible (but again
hard if you also want to have your second thing), but I don't think that you should really
care about the generator being called twice: Why do you care anyway? Is it very expensive,
so what, make it cacheable...Is it only valid for example one minute, no problem, make it
an expire of a minute (you can actually do this very simple like below)

<map:pipeline internal-only="true" type="expires">
<map:parameter name="cache-expires" value="60"/>
<map:match pattern="getFBScontent">
	<map:generate type="FBS">
		<map:parameter name="objekt" value="{request-param:objekt}"/>
		<map:parameter name="objekt_ID" value="{request-param:objekt_ID}"/>
		<map:parameter name="typ" value="{request-param:typ}"/>
		<map:parameter name="geb_ID" value="{request-param:geb_ID}"/>
		<map:parameter name="stock_ID" value="{request-param:stock_ID}"/>
		<map:parameter name="abweichungen" value="{request-param:abweichungen}"/>
	</map:generate>
	<map:serialize type="xml"/>
</map:match>
</map:pipeline>

<map:pipeline internal-only="false">
<map:match pattern="bsplt_suchergebnis_dyn">
	<map:generate src="cocoon:/getFBScontent"/>
	<map:transform src="styles/portal/view_bsksuche.xsl">
		<map:parameter name="typ" value="{request-param:typ}"/>
	</map:transform>
	<map:serialize type="html"/>
</map:match>
</map:pipeline>

Now, you're FBS will be cached for one minute. Even better, make a smart cache key in the
generator. 

Of course, you would also have been able to accomplish this by one generator, and one xsl
that does both coplets, but then you run into trouble with your second question...you only
want to update you're second coplet. Well, AJAX is hot, though I am not (yet) familiar with
it....of course you don't want to use iframes :-) Before AJAX existed, I solved these kind
of things with an hidden iframe loading the second coplet, and when it is ready, javascript
back into the parent window....but....perhaps you don't even want to go there...

AS

> 
> 
> Ok, I will try to be more precisely. I attached a JPEG of our Portal.
> There you see the two coplets I'm speaking of. I also 
> attached the part of
> the sitemap, where the coplets are created. As you can see, 
> I'm calling the
> generator "FBS"
> twice, once for every coplet. Every coplet is transforming 
> the XML-data from
> the generator in a special way.
> So, what I want is to call the generator "FSB" delivering the 
> XML-data only
> one time.
> Then I want to pass this data to every coplet and create it.
> That's my first demand.
> 
> The second step would be the possibility to click something in the
> "Overview-Coplet" and update The "Details-Coplet".
> 
> I hope it clearer now.
> 
> Thanks,
> Barthi 
>  
> 
> > -----Original Message-----
> > From: Ard Schrijvers [mailto:a.schrijvers@hippo.nl] 
> > Sent: Friday, January 13, 2006 12:29 PM
> > To: users@cocoon.apache.org
> > Subject: RE: Coplet and generator question
> > 
> > 
> > > 
> > > Is it such a silly question? Or isn't it possible?
> > 
> > Probably not, but I do not really, and I suppose others as 
> > well, entirely grasp your problem. Lot's of people want to 
> > help at this list, but when a question is unclear, few 
> > answers are given. Probably silly of me, but I for example 
> > don't know what you mean with a coplet...If you explain a 
> > little more we can probably help you out
> > 
> > AS
> > 
> > 
> > > I'm new to Cocoon and really don't know how to manage it.
> > > Is there a hint in the docu I missed?
> > > 
> > > Thanks,
> > > Barthi
> > >  
> > > 
> > > > -----Urspr√ľngliche Nachricht-----
> > > > Von: Christian Barth [mailto:christian@buerobarth.de]
> > > > Gesendet: Donnerstag, 12. Januar 2006 17:40
> > > > An: users@cocoon.apache.org
> > > > Betreff: Coplet and generator question
> > > > 
> > > > Hi, it's me again!
> > > >  
> > > > I just wrote a new generator calculating some things in 
> Java and 
> > > > returning the results in an XML. This works fine.
> > > >  
> > > > But...
> > > >  
> > > > I need two coplets, one showing a kind of "overview" of 
> > the result 
> > > > and the second one showing "details" of the result.
> > > > 
> > > > Both have to be displayed on the same page. It would also 
> > be nice if 
> > > > I could click something in the "overview"-coplet and the 
> > > > "details"-coplet is updated.
> > > > 
> > > > So how can I build two coplets from one data-source?
> > > > 
> > > > Thanks,
> > > > BArthi
> > > > 
> > > > 
> > > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > > 
> > > > 
> > > 
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > 
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message