cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <Ralph.Go...@dslextreme.com>
Subject Re: Portal: ApplicationCopletAdapter and persistent links
Date Tue, 22 Jan 2008 07:15:35 GMT
Have you configured your application to actually use page labels? By 
default they are disabled.

Guido Casper wrote:
> Hi all,
>
> I am trying to implement persistent links within an application coplet 
> of the portal. By default the internal links of external applications 
> are dynamically converted to "?cocoon-portal-event=xx" parameters at 
> runtime. So a particular page of an external application is not easily 
> bookmarkable or to be incorporated in search results, etc. So to have 
> a search crawler be able to index these pages, these links have to be 
> globally valid, identifyable and have to survive Tomcat restarts. In 
> short, they have to be persistent.
>
> I found it would be easiest to base the implementation on the 
> PageLabelEventConverter.
>
> As a test I tried to manually create a CopletLinkEvent within the 
> start Method (initialize() wouldn't work because this code accesses 
> the ProfileManager) to simulate recreating these Links from a 
> persistent store:
>
> public void start() {
>     String label = this.labelManager.setCurrentLabel();
>     try {
>         PortalService portalService = 
> (PortalService)this.manager.lookup(PortalService.ROLE);
>         PortalComponentManager componentManager = 
> portalService.getComponentManager();
>         ProfileManager profileManager = 
> componentManager.getProfileManager();
>         if (this.eventList.size() == 0) {
>             CopletInstanceData cid = 
> profileManager.getCopletInstanceData( "Google-1" );
>             if (cid != null) {
>                 cid.setAttribute("cookie", null);
>                 cid.setAttribute("documentbase", 
> "http://www.google.de/");
>                 Event persistentEevent = new CopletLinkEvent(cid, 
> "/intl/de/about.html");
>                 this.eventList.add(persistentEevent);
>             }
>         }
>     } catch (ServiceException se) {
>         this.getLogger().error("Error getting " + PortalService.ROLE + 
> ": ", se);
>     }
> }
>
> The event gets correctly endoded into the pages. Even decoding seems 
> to work correctly, however clicking this link simply reloads the 
> current page.
>
> Any idea what might go wrong is much appreciated. The complete Code of 
> PageLabelPersistentEventConverter is below.
>
> Thanks
> Guido
>

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


Mime
View raw message