cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "angeloimm" <angelo...@libero.it>
Subject Information about cocoon portal and its links
Date Tue, 31 May 2005 07:29:06 GMT
Hi all; we are using cocoon portal (cocoon version 2.1.7); now we have had some problems about
coplet links; our target was this one:
we must change dinamically the coplet instance data in a coplet layout when somebody clicks
on a link; in order to have this feature we have changed the coplet transformer (class name:
CopletTransfomer); is there any other way to have the same feature without changing the transformer?
Here i post the java code i have modified:

 if ( attr.getValue("mylayout") != null && attr.getValue("coplet")!= null) {
    System.out.println("mylayout init... ");
     newAttrs.removeAttribute("mylayout");
     final String layoutId = attr.getValue("mylayout");
     newAttrs.removeAttribute("coplet");
     final String mycopletId = attr.getValue("coplet");
     //layout coplet
     Object layout = this.getPortalService().getComponentManager().                      
          getProfileManager().getPortalLayout(null,layoutId);
     //coplet da inserire nel layout
     final CopletInstanceData cid = this.getCopletInstanceData(mycopletId);
     if (layout != null) {
         event = new JXPathEvent(layout, path, cid);
      }
  }

So i can use this tag c:link="mylayout" tag and it seems to work. I have not yet tested all
the other link but this one gives to me the desired feature.
Can anybody tell me if this is the right way?
Thanks to all.





____________________________________________________________
Navighi a 4 MEGA e i primi 3 mesi sono GRATIS. 
Scegli Libero Adsl Flat senza limiti su http://www.libero.it



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


Mime
View raw message