You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by roy huang <li...@hotmail.com> on 2004/06/30 13:17:08 UTC

Re: cl:links in cachingURI coplet ?

Hi,Phil:
  How to add copletID in cl:link?If you mean coplet="test-coplet" I already added it in the beginning.So the error is not appear but the data like "attributes/param" still not passed.
  I try this in samples of current cvs version,steps below:
  1.edit portal.xml in profiles\copletdata ,change GalleryViewer from URICoplet to CachingURICoplet
  2.add attributes:
       <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:java.lang.String" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/html/application</value>
      </attribute>
      <attribute>
       <name>temporary:application-uri</name>
       <value xsi:type="java:java.lang.String" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon://samples/blocks/portal/coplets/gallery/viewer</value>
      </attribute>
  3.start jetty and then the Gallary Viewer did't work.
  What can I do to make this work again? Or is it a bug?
  
  If you were me ,how to solve this problem by using CachingURICoplet with bookmark?
  WDYT?

  Roy Huang
  
   
----- Original Message ----- 
From: "Philippe Guillard" <pg...@soociety.com>
To: "users cocoon" <us...@cocoon.apache.org>
Sent: Wednesday, June 30, 2004 3:46 PM
Subject: Re: cl:links in cachingURI coplet ?


> Hi Roy,
> 
> Outside the portal maybe means calling a pipeline from a sitemap that is
> not mounted by the portal sitemap, or child of portal sitemap, but not
> sure.
> 
> I personnally passed to bookmarks!
> However, i made a quick try for you, Chris was right, you need to add
> the copletId in the cl:link like this :
> 
> <cl:link coplet="test-coplet" path="attributes/param"
> value="tets"></cl:link>   
> 
> I didn't check the link but i don't have the exception below (using head
> cvs, that could be another reason since event-link-transformer has
> changed too).
> 
> 
> Phil 
> 
> 
> On Wed, 2004-06-30 at 10:40, roy huang wrote:
> > Hi Chris,
> >     I meet the similar situation.I don't understand "calling your pipeline from outside the portal".How to define a pipeline called in a portal ? And what need to do if I call a pipeline outside a portal? Can you describe it more in detail?
> >    Thanks
> > 
> >    Roy Huang
> > ----- Original Message ----- 
> > From: "Christian Mayrhuber" <cm...@iicm.tu-graz.ac.at>
> > To: <us...@cocoon.apache.org>
> > Sent: Tuesday, June 22, 2004 5:07 PM
> > Subject: Re: cl:links in cachingURI coplet ?
> > 
> > 
> > > On Monday 21 June 2004 19:01, Philippe Guillard wrote:
> > > > Hi,
> > > >
> > > > I'm using cl:links OK with URI coplet but can't make cl:links work with
> > > > cachingURI coplet in rls 2.1.5. Should i change something ?
> > > >
> > > > I think the point is that cachingURI Coplet uses portal-html-eventlink
> > > > transformer.
> > > >
> > > > Error:
> > > > org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> > > > java.lang.RuntimeException: org.xml.sax.SAXException: copletId must be
> > > > passed as parameter or in the object model within the parent context.
> > > >
> > > > It seems that portal-html-eventlink needs copletId, i tried to give
> > > > <map:parameter name="copletId" value="{request-param:copletid}"/>
> > > > or <map:parameter name="copletId" value="id of my coplet"/>, no success
> > > >
> > > > Any idea?
> > > 
> > > I guess you are calling your pipeline from outside the portal, if you do this
> > > the {coplet:#} and any other coplet data is unknown, so you have to
> > > specifiy the "copletId" as string. The coplet transformer is in no
> > > way different in this regard.
> > > 
> > > -- 
> > > lg, Chris
> > > 
> > > ---------------------------------------------------------------------
> > > 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
> 
> 

Re: cl:links in cachingURI coplet ?

Posted by roy huang <li...@hotmail.com>.
Hi,Chris:
  You mean I can't use cl:link to pass information to a CachingURICoplet?
If so,I must use bookmark to accees a CachingURICoplet or not using CachingURICoplet,is that correct?
That's what make me confused.
  Thanks for replying.
Roy Huang
----- Original Message ----- 
From: "Christian Mayrhuber" <ch...@gmx.net>
To: <us...@cocoon.apache.org>
Sent: Friday, July 02, 2004 6:01 PM
Subject: Re: cl:links in cachingURI coplet ?


> On Friday 02 July 2004 09:15, roy huang wrote:
> > Hi,Chris:
> >   I change the uri attribute because I change GAlleryViewer from URICoplet
> > to CachingURICoplet,the CachingURICoplet need to change the original
> > attribute.What make me stuffed is CachingURICoplet not URICoplet.Maybe it
> > is a CachingURICoplet's bug.
> >
> > Roy Huang
> 
> The CachingURICoplet has some features that don't make any sense to be used 
> with the Gallery coplet, because the gallery viewer does not know anything 
> about the application-uri temporary attribute.
> You would need an extra coplet like the one accessing woody forms if you want 
> to use the application-uri with the Gallery coplet, it will not though.
> The Gallery coplet works vastly different. It generates its own portal events
> to do inter-coplet communication.
> If you look at gallery.xsl you will notice the line:
> 
> <cl:link path="attributes/picture" value="{picture[position()=$showpicindex]}" 
> coplet="GalleryViewer-1">Push to Viewer</cl:link>
> 
> The above line generates a CopletEvent setting the CopletInstanceData 
> attribute "picture" of the GalleryViewer-1 coplet instance to the selected 
> image.
> The result is that the GalleryViewer-1 displays the image.
> 
> If you change 
> <attribute>
>      <name>uri</name>
>      <value xsi:type="java:java.lang.String"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/html/application</value> 
> </attribute>
> the coplet cannot be accessed anymore because it does not refer to the 
> GalleryCoplet. Changing the uri attribute back to the Gallery coplet will 
> make it work again, but the advanced capabilities of the CachingURICoplet 
> will not be used.
> 
> The idea of the CachingURICoplet is a different one. Let's assume you have
> an cocoon application outside of the portal that you want to include, but you 
> don't want to rewrite it to generate coplet events by means of
> <cl:link ..../> and the CopletTransformer. In this case the CachingURICoplet +
> HTMLEventLinkTransformer enables you to write a simple coplet to include your 
> application as coplet.
> 
> If you have a look at http://localhost:8888/docs/developing/portal/forms.html
> you can see that the temporaryAttributes/application-uri attribute is accessed 
> in the sitemap and used to generate the xml.
> Next, this xml is transformed by the HTMLEventLinkTransformer to generate
> <cl:link ...> elements.
> Finally, the CopletTransformer transforms the <cl:link ...> into portal events
> which set the temporaryAttributes/application-uri once a form or hyperlink is 
> clicked.
> 
> -- 
> lg, Chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

Re: cl:links in cachingURI coplet ?

Posted by Christian Mayrhuber <ch...@gmx.net>.
On Friday 02 July 2004 09:15, roy huang wrote:
> Hi,Chris:
>   I change the uri attribute because I change GAlleryViewer from URICoplet
> to CachingURICoplet,the CachingURICoplet need to change the original
> attribute.What make me stuffed is CachingURICoplet not URICoplet.Maybe it
> is a CachingURICoplet's bug.
>
> Roy Huang

The CachingURICoplet has some features that don't make any sense to be used 
with the Gallery coplet, because the gallery viewer does not know anything 
about the application-uri temporary attribute.
You would need an extra coplet like the one accessing woody forms if you want 
to use the application-uri with the Gallery coplet, it will not though.
The Gallery coplet works vastly different. It generates its own portal events
to do inter-coplet communication.
If you look at gallery.xsl you will notice the line:

<cl:link path="attributes/picture" value="{picture[position()=$showpicindex]}" 
coplet="GalleryViewer-1">Push to Viewer</cl:link>

The above line generates a CopletEvent setting the CopletInstanceData 
attribute "picture" of the GalleryViewer-1 coplet instance to the selected 
image.
The result is that the GalleryViewer-1 displays the image.

If you change 
<attribute>
     <name>uri</name>
     <value xsi:type="java:java.lang.String"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/html/application</value> 
</attribute>
the coplet cannot be accessed anymore because it does not refer to the 
GalleryCoplet. Changing the uri attribute back to the Gallery coplet will 
make it work again, but the advanced capabilities of the CachingURICoplet 
will not be used.

The idea of the CachingURICoplet is a different one. Let's assume you have
an cocoon application outside of the portal that you want to include, but you 
don't want to rewrite it to generate coplet events by means of
<cl:link ..../> and the CopletTransformer. In this case the CachingURICoplet +
HTMLEventLinkTransformer enables you to write a simple coplet to include your 
application as coplet.

If you have a look at http://localhost:8888/docs/developing/portal/forms.html
you can see that the temporaryAttributes/application-uri attribute is accessed 
in the sitemap and used to generate the xml.
Next, this xml is transformed by the HTMLEventLinkTransformer to generate
<cl:link ...> elements.
Finally, the CopletTransformer transforms the <cl:link ...> into portal events
which set the temporaryAttributes/application-uri once a form or hyperlink is 
clicked.

-- 
lg, Chris

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


Re: cl:links in cachingURI coplet ?

Posted by roy huang <li...@hotmail.com>.
Hi,Chris:
  I change the uri attribute because I change GAlleryViewer from URICoplet to CachingURICoplet,the CachingURICoplet need to change the original attribute.What make me stuffed is CachingURICoplet not URICoplet.Maybe it is a CachingURICoplet's bug.

Roy Huang 
----- Original Message ----- 
From: "Christian Mayrhuber" <ch...@gmx.net>
To: <us...@cocoon.apache.org>
Sent: Thursday, July 01, 2004 1:49 AM
Subject: Re: cl:links in cachingURI coplet ?


> On Wednesday 30 June 2004 13:17, roy huang wrote:
> > Hi,Phil:
> >   How to add copletID in cl:link?If you mean coplet="test-coplet" I already
> > added it in the beginning.So the error is not appear but the data like
> > "attributes/param" still not passed. I try this in samples of current cvs
> > version,steps below:
> >   1.edit portal.xml in profiles\copletdata ,change GalleryViewer from
> > URICoplet to CachingURICoplet 2.add attributes:
> >        <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:java.lang.String"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/html/
> >application</value> </attribute>
> >       <attribute>
> >        <name>temporary:application-uri</name>
> >        <value xsi:type="java:java.lang.String"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon://samples/bloc
> >ks/portal/coplets/gallery/viewer</value> </attribute>
> >   3.start jetty and then the Gallary Viewer did't work.
> >   What can I do to make this work again? Or is it a bug?
> 
> Hmm,
> I guess it does not work because you have added a second uri attribute which 
> points to the wrong pipeline location.
> There is already an uri attribute in copletdata/portal.xml
> 
>       <attribute>
>       <name>uri</name>
>       <value xsi:type="java:java.lang.String" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/gallery/browser</value>
>       </attribute>
> 
> The CachingURICoplet should not make a difference for this application.
> (I have not tried this myself)
> 
> If you want to use urls that actually make sense you will have to use the 
> bookmark feature of the portal engine.
> See http://wiki.cocoondev.org/Wiki.jsp?page=PortalEngineBookmarks
> 
> -- 
> lg, Chris
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

Re: cl:links in cachingURI coplet ?

Posted by Christian Mayrhuber <ch...@gmx.net>.
On Wednesday 30 June 2004 13:17, roy huang wrote:
> Hi,Phil:
>   How to add copletID in cl:link?If you mean coplet="test-coplet" I already
> added it in the beginning.So the error is not appear but the data like
> "attributes/param" still not passed. I try this in samples of current cvs
> version,steps below:
>   1.edit portal.xml in profiles\copletdata ,change GalleryViewer from
> URICoplet to CachingURICoplet 2.add attributes:
>        <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:java.lang.String"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/html/
>application</value> </attribute>
>       <attribute>
>        <name>temporary:application-uri</name>
>        <value xsi:type="java:java.lang.String"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon://samples/bloc
>ks/portal/coplets/gallery/viewer</value> </attribute>
>   3.start jetty and then the Gallary Viewer did't work.
>   What can I do to make this work again? Or is it a bug?

Hmm,
I guess it does not work because you have added a second uri attribute which 
points to the wrong pipeline location.
There is already an uri attribute in copletdata/portal.xml

      <attribute>
      	<name>uri</name>
      	<value xsi:type="java:java.lang.String" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/gallery/browser</value>
      </attribute>

The CachingURICoplet should not make a difference for this application.
(I have not tried this myself)

If you want to use urls that actually make sense you will have to use the 
bookmark feature of the portal engine.
See http://wiki.cocoondev.org/Wiki.jsp?page=PortalEngineBookmarks

-- 
lg, Chris


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


Re: cl:links in cachingURI coplet ?

Posted by Philippe Guillard <pg...@soociety.com>.
Roy,

- I don't have time now to check cl:link, it seems that you don't have
the error anymore (=copletId must be passed as parameter or in the
object model within the parent context.) right? So i think you are
almost there. But if you added coplet="test-coplet" like here : 
<cl:link coplet="test-coplet" path="attributes/param"
value="tets"></cl:link> 
in the gallery coplet then.. i don't know.


- If you want to try bookmarks, which does the same for me, i think the
best way is to connect you to this wiki as it is best explained:
http://wiki.cocoondev.org/Wiki.jsp?page=PortalEngineBookmarks.
I know it disturbs to change and try again, so good luck.

Phil

On Wed, 2004-06-30 at 19:17, roy huang wrote:
> Hi,Phil:
>   How to add copletID in cl:link?If you mean coplet="test-coplet" I already added it in the beginning.So the error is not appear but the data like "attributes/param" still not passed.
>   I try this in samples of current cvs version,steps below:
>   1.edit portal.xml in profiles\copletdata ,change GalleryViewer from URICoplet to CachingURICoplet
>   2.add attributes:
>        <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:java.lang.String" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon:/coplets/html/application</value>
>       </attribute>
>       <attribute>
>        <name>temporary:application-uri</name>
>        <value xsi:type="java:java.lang.String" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">cocoon://samples/blocks/portal/coplets/gallery/viewer</value>
>       </attribute>
>   3.start jetty and then the Gallary Viewer did't work.
>   What can I do to make this work again? Or is it a bug?
>   
>   If you were me ,how to solve this problem by using CachingURICoplet with bookmark?
>   WDYT?
> 
>   Roy Huang
>   
>    
> ----- Original Message ----- 
> From: "Philippe Guillard" <pg...@soociety.com>
> To: "users cocoon" <us...@cocoon.apache.org>
> Sent: Wednesday, June 30, 2004 3:46 PM
> Subject: Re: cl:links in cachingURI coplet ?
> 
> 
> > Hi Roy,
> > 
> > Outside the portal maybe means calling a pipeline from a sitemap that is
> > not mounted by the portal sitemap, or child of portal sitemap, but not
> > sure.
> > 
> > I personnally passed to bookmarks!
> > However, i made a quick try for you, Chris was right, you need to add
> > the copletId in the cl:link like this :
> > 
> > <cl:link coplet="test-coplet" path="attributes/param"
> > value="tets"></cl:link>   
> > 
> > I didn't check the link but i don't have the exception below (using head
> > cvs, that could be another reason since event-link-transformer has
> > changed too).
> > 
> > 
> > Phil 
> > 
> > 
> > On Wed, 2004-06-30 at 10:40, roy huang wrote:
> > > Hi Chris,
> > >     I meet the similar situation.I don't understand "calling your pipeline from outside the portal".How to define a pipeline called in a portal ? And what need to do if I call a pipeline outside a portal? Can you describe it more in detail?
> > >    Thanks
> > > 
> > >    Roy Huang
> > > ----- Original Message ----- 
> > > From: "Christian Mayrhuber" <cm...@iicm.tu-graz.ac.at>
> > > To: <us...@cocoon.apache.org>
> > > Sent: Tuesday, June 22, 2004 5:07 PM
> > > Subject: Re: cl:links in cachingURI coplet ?
> > > 
> > > 
> > > > On Monday 21 June 2004 19:01, Philippe Guillard wrote:
> > > > > Hi,
> > > > >
> > > > > I'm using cl:links OK with URI coplet but can't make cl:links work with
> > > > > cachingURI coplet in rls 2.1.5. Should i change something ?
> > > > >
> > > > > I think the point is that cachingURI Coplet uses portal-html-eventlink
> > > > > transformer.
> > > > >
> > > > > Error:
> > > > > org.apache.cocoon.ProcessingException: Failed to execute pipeline.:
> > > > > java.lang.RuntimeException: org.xml.sax.SAXException: copletId must be
> > > > > passed as parameter or in the object model within the parent context.
> > > > >
> > > > > It seems that portal-html-eventlink needs copletId, i tried to give
> > > > > <map:parameter name="copletId" value="{request-param:copletid}"/>
> > > > > or <map:parameter name="copletId" value="id of my coplet"/>, no success
> > > > >
> > > > > Any idea?
> > > > 
> > > > I guess you are calling your pipeline from outside the portal, if you do this
> > > > the {coplet:#} and any other coplet data is unknown, so you have to
> > > > specifiy the "copletId" as string. The coplet transformer is in no
> > > > way different in this regard.
> > > > 
> > > > -- 
> > > > lg, Chris
> > > > 
> > > > ---------------------------------------------------------------------
> > > > 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