Alex
Can you give snippets of your copletinstancedata/portal.xml file and your
sitemap.xmap?
Laurent

> -----Message d'origine-----
> De�: Alex Romayev [mailto:[EMAIL PROTECTED]
> Envoy�: mardi 20 janvier 2004 00:21
> ��: [EMAIL PROTECTED]
> Objet�: RE: [portal] Linking to portal pages
> 
> Laurent,
> 
> I think I'm almost there, however I'm getting an error
> and I believe it is because I don't quite understand
> your point #2 and making some mistake there.  The
> error that I get is:
> 
> org.apache.cocoon.ProcessingException: Failed to
> execute pipeline.:
> org.apache.commons.jxpath.JXPathException: Exception
> trying to set value with xpath parameters/news-id;
> Cannot set property /parameters/news-id, path does not
> match a changeable location.
> 
> Please see my comments below.
> 
> Thanks,
> -Alex
> 
> 
> --- Laurent Trillaud <[EMAIL PROTECTED]> wrote:
> > Alex
> > Yes, but it's a bad idea, because you haven't
> > insurance about coplets
> > synchronization, and you will not have the benefit
> > of the history record of
> > the portal.
> > The good design is to use coplet attributes.
> > 1. Declare an attributes in
> > copletinstancedata/portal.xml
> > <coplet-instance-data id="MyCoplet-1"
> > name="standard">
> > <coplet-data>MyCoplet</coplet-data>
> > <attribute>
> > <name>MyAttribute</name>
> > <value
> >
> xsi:type="java:java.lang.String">MyDefaultValue</value>
> > </attribute>
> > </coplet-instance-data>
> 
> OK, I did that -- my coplet instance is named
> "news-item-1" and the attribute "news-id".  I also
> noticed that the sample places the attributes in
> coplet definitions rather than coplet instances, does
> it matter?
> 
> > 2. Use the portal-coplet transformer to set the
> > attribute
> > <cl:links>
> > <cl:link layout="maintab" value="1"
> > path="aspectDatas/tab"/>
> > <cl:link coplet="MyCoplet-1" value="MyValue"
> > path="parameters/MyAttribute"/>
> > <cl:content>My News Page</cl:content>
> > </cl:links>
> > It will produce another event on the href
> > <a
> >
> href="portal?portal-action=n&portal-event=m&portal-event=m+1>
> > My News Page</a>
> > Be careful, to access to the MyCoplet-1 attributes
> > this transformer need to
> > be call by the MyCoplet itself and with the cocoon
> > protocol.
> 
> I'm not sure what you mean.  In my case I have 2
> coplet instances: news-list-1 and news-item-1.  Each
> item in the news list needs to have a link to the
> corresponding news item.  So I put the above code in
> the news-list-1 coplet and used the coplet-transformer
> to generate the ancor tag.
> 
> When I click on the generated link, I get the "path
> does not match a changeable location" error.
> 
> If it's not the
> > case use the portal action to 'load' it in memory.
> > <map:act type="portal-object-model">
> > <map:parameter name="portalName" value="portal" />
> > <map:parameter name="CopletId" value="MyCoplet-1" />
> > </map:act>
> 
> I think this is my case, since my news-list coplet
> needs to call news-item coplet.  Where do I place
> this?
> 
> > 3. use it
> > Read value from the coplet input module. For example
> > to use it with an xsl
> > <map:match pattern="MyCoplet.html">
> > <map:generate src="MyData.xml" />
> > <map:transform src="xml2html.xsl">
> > <map:parameter name="MyParameter"
> > value="{coplet:attributes/MyAttribute}"/>
> > </map:transform>
> > <map:serialize />
> > </map:match>
> >
> > Laurent Trillaud
> >
> >
> > > -----Message d'origine-----
> > > De : Alex Romayev [mailto:[EMAIL PROTECTED]
> > > Envoyi : lundi 19 janvier 2004 15:31
> > > @ : [EMAIL PROTECTED]
> > > Objet : RE: [portal] Linking to portal pages
> > >
> > > Thanks Laurent -- that works great!
> > >
> > > Another question, is there a way to pass a request
> > > parameter with it, so that the anchor is something
> > > like:
> > >
> > > <a
> > >
> >
> href="portal?portal-action=n&portal-event=m&news-id=x>My>
> > > News Page</a>
> > >
> > > Thanks,
> > > -Alex
> > >
> > > --- Laurent Trillaud <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > > Events in the new portal engine are very
> > powerful
> > > > but totally misdocumented.
> > > > If you want a link to switch to a News tab in
> > your
> > > > portal you need to create
> > > > an event to say to the maintab composite layout
> > to
> > > > switch to is second
> > > > layout (0 based index) and send it to the
> > portal.
> > > > Hoppefully, the portal-coplet transformer will
> > do it
> > > > for you
> > > > <cl:links>
> > > > <cl:link layout="maintab" value="1"
> > > > path="aspectDatas/tab"/>
> > > > <cl:content>My News Page</cl:content>
> > > > </cl:links>
> > > > will be replace by
> > > > <map:transform type="portal-coplet" />
> > > > by an anchor
> > > > <a
> > href="portal?portal-action=n&portal-event=m>My
> > > > News Page</a>
> > > > where n and m are auto-incremented integer.
> > > >
> > > > If the link can't be compute inside the portal,
> > you
> > > > can use the bookmark
> > > > feature of the portal . The sample include with
> > > > cocoon use
> > > > it(portal/resources/bookmarks.xml).
> > > > Just write a link
> > > > <a
> > > >
> > >
> >
> href="http://myserver/myproject/portal/bookmark?showtab=1";>
> > > > My News Page</a> and it will do the same thing.
> > > >
> > > > Laurent Trillaud
> > > >
> > > > > -----Message d'origine-----
> > > > > De : Alex Romayev [mailto:[EMAIL PROTECTED]
> > > > > Envoyi : vendredi 16 janvier 2004 23:20
> > > > > @ : [EMAIL PROTECTED]
> > > > > Objet : [portal] Linking to portal pages
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am porting my site from old portal-fw to the
> > new
> > > > > portal engine.  I was able to port all the
> > coplets
> > > > and
> > > > > pages with any problems, however, I got really
> > > > stuck
> > > > > on events.  I am clearly missing the point
> > here,
> > > > so
> > > > > could someone at least point me in the right
> > > > direction
> > > > > (an example would be great!)?
> > > > >
> > > > > I need to create a links to my portal pages
> > from
> > > > > within coplet content.  For example, I used to
> > > > have
> > > > > News page, so I could use the following:
> > > > >
> > > > > <a href=portal/news>News</a>
> > > > >
> > > > > Now my News page is represented as a tab.  How
> > > > would I
> > > > > generate the right link to this page?
> > > > >
> > > > > Thanks,
> > > > > -Alex
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> ---------------------------------------------------------------------
> > > > > 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]
> > > >
> > >
> > >
> > > =====
> > > Alex Romayev
> > > Software Architect
> > > http://www.romayev.com
> > > [EMAIL PROTECTED]
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > 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]
> >
> 
> 
> =====
> Alex Romayev
> Software Architect
> http://www.romayev.com
> [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to