Hi David,

As you have realized, the portal doesn't use request parameters, but events and actions. When you request a portal page, this page calls each portlet that described it. Each portlet has its own set of parameters you can use in your pipeline.

For example, you may have a portlet, with the following parameters described in your portal or copletinstancedata/portal-role-zzz.xml files :
* database (your notes database)
* query (your query)
* sortQuery (the sort query to use)
* browseQuery (the page number you want)
* count (the number of results you want)


Let's say you generate your pipeline call with all of these parameters (through {coplet:attributes/query}, ... in your generator)
So, to solve your problem in this situation, you just have to update the browseQuery attribute. Then the portlet will be called again and the result will be there.


To do that, just put the following where you want to generate the link to next/previous page :
<cl:links>
<cl:link coplet="your-porlet-instance" path="attributes/browseQuery" value="2"/>
<cl:content>
Page 2
</cl:content>
</cl:links>


<cl:links>
<cl:link coplet="your-porlet-instance" path="attributes/browseQuery" value="3"/>
<cl:content>
Page 3
</cl:content>
</cl:links>


And, so on

You may put several cl:link, this way you can change several parameter values in one link.


HTH


David Duhme a écrit :

Hello Cocooners,

after several months of practicing cocoon it still takes me hours
and days to get some tricky things working. Hope I'm not the
only one making this experience ;)

Let me explain what I'm trying to do and perhaps someone can help
me with that.

I've written a custom generator which makes a Lotus Domino connection
and fetches xml out of a domino database. This generator is part of
a pipeline which serves the content for a CachingURICoplet in the cocoon
portal. The generator works similar to the Portal ProxyTransformer, that
means it is making a http-connection to the domino server and using the
domino specific url syntax.


http://server/datbase/view?ReadViewEntries&RestrictToCategory=category&Count=10


       (returns xml stream)

The initial parameters are passed to the generator through the coplet-data
like this

<coplet-data id="ID" name="standard">
<title>TITLE</title>
<coplet-base-data>CachingURICoplet</coplet-base-data>
<attribute>
<name>buffer</name>
<value xsi:type="java:java.lang.Boolean" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> true
</value>
</attribute>
<attribute>
<name>handleParameters</name>
<value xsi:type="java:java.lang.Boolean" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> true
</value>
</attribute>
<attribute>
<name>uri</name>
<value xsi:type="java.lang.String" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
cocoon:/coplets/domino/view?server=[server]
&amp;database=[database]
&amp;designelement=View
&amp;designelementname=[viewname]
&amp;RestrictToCategory=[username]
&amp;Count=10
</value>
</attribute>
</coplet-data>


For the coplet content the following pipeline is triggered:

<map:match pattern="domino/view">
<map:generate type="domino" />
<map:transform src="styles/view2html.xsl">
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="html" />
</map:match>


Now my problem:
The domino server delivers only ten entries of the view because I told it so ('Count=10').
If there are more than ten entries in the view I need to generate links in the coplet which
reload the content of the coplet with different URL parameters. This means the pipeline
has to be executed again and the portal page has to be updated. So what I'm trying
to implement is some kind of google-like paging mechanism which stays in the context of
a portal coplet.


I know that I have to generate portal-events and specify the copletId and portalName
to do that, but I'm not sure which events I have to call and how to achieve that.


Another possibility is that I'm completly wrong and I could use the ApplicationCoplet
to realize this. But the ProxyTransformer seams to expect html or xhtml to work correctly
and the LinkTransformer needs the content of a ProxyTransfomer Instance to translate links.


So if there's any experienced cocoon portal user out there who can help me transforming
domino urls into portal-events, I would really appreciate it.


Thanks in advance,

David Duhme.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--

Jean-Christophe Kermagoret
[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to