Return-Path: Delivered-To: apmail-portals-jetspeed-user-archive@www.apache.org Received: (qmail 6082 invoked from network); 23 Jan 2006 22:20:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Jan 2006 22:20:25 -0000 Received: (qmail 32382 invoked by uid 500); 23 Jan 2006 22:20:18 -0000 Delivered-To: apmail-portals-jetspeed-user-archive@portals.apache.org Received: (qmail 32355 invoked by uid 500); 23 Jan 2006 22:20:18 -0000 Mailing-List: contact jetspeed-user-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Users List" Delivered-To: mailing list jetspeed-user@portals.apache.org Received: (qmail 32344 invoked by uid 99); 23 Jan 2006 22:20:18 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 14:20:18 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [63.163.219.5] (HELO tetco.com) (63.163.219.5) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Jan 2006 14:20:17 -0800 Received: from FVillarreal [192.168.1.66] by tetco.com (SMTPD32-8.05) id A68537F0142; Mon, 23 Jan 2006 16:19:49 -0600 From: "Frank Villarreal" To: "Jetspeed Users List" Subject: RE: Retrieving a portlet's unique instance ID.. Date: Mon, 23 Jan 2006 16:19:50 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal In-Reply-To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Ben, Use the tags in your portlet config file. You can key off these parameters to display a "different" initial view for each "instance" of your portlet. For example .... firstPage index.jsp - Frank > -----Original Message----- > From: b.v.weert@valbosoft.com [mailto:b.v.weert@valbosoft.com] > Sent: Monday, January 23, 2006 03:58 PM > To: Jetspeed Users List > Subject: Re: Retrieving a portlet's unique instance ID.. > > > > > > > Hello, > > we've developed some content management modules, which basically add a > parameter to the portlet's definition called "channel" at > creation time (so > no further customization is required). At the same time we create that > channel in the database. In this way, you can have a unique reference for > the portlet without using the portlet ID. > I think that what you're saying is that you use the same portlet for every > content, while I'd create a new portlet for every appearance, so you can > control every aspect at forehand. > > Regards, > > Bo van Weert > tel. 902 014 180 > (00 34) 96 393 19 77 > fax. 96 360 69 13 > http://www.valbosoft.com: Jetspeed development > > > > > > > jetspeed@theunder > > ground.net > > > To > 23/01/2006 22:02 "Jetspeed Users List" > > > > > cc > Please respond to > > "Jetspeed Users > Subject > List" Re: Retrieving a portlet's > unique > > rtals.apache.org> > > > > > > > > > > > > > > > > Thanks for the reply. But I had a question about one of your points.. > > > A portlet isn't really supposed to know about its 'unique id' as that is > > an implementation detail of the portal. > > Perhaps the reason I encountered this problem is because I'm not thinking > about the design in the correct way. What are thoughts on the following > situation: > > A generic Content Display Portlet (CDP) is to be created. The requirement > are that, whenever the CDP is added to a page, it will automatically > create a new 'block' of content in the content management system that's > associated to this individual CDP. > > The only way I can think of tackling that requirement would be for the > portlet to be aware of some unique ID. Then, in the render method (the > first method to be executed), the portlet tries accessing the content > repository with it's unique ID. If the request fails, the portlet knows > to create a new content object. If the request succeeds, the portlet > knows to display the content. This 'unique key' could be done via portlet > preferences, but then there would be an extra customizing step that would > need to be performed after the portlet was added to a page (by the user > clicking the Edit mode and then manually typing a unique string). > > Anyone out there have thoughts on this? Am I thinking about this > incorrectly, or is this a time when a portlet has a legitimate reason for > fetching a unique identifier? > > -Ben > > > >> Wiadomosc od jetspeed@theunderground.net z 2006-01-22 05:19 brzmiala: > >> > >>> Is there a way to get a portlet instance's unique ID without using the > >>> request object (namely, from the portlet init() method)? > >> > >> As far as I know, init() is common for the whole portlet lifecycle (all > >> instances) and is called at the webapp initialization (once for a > >> restart/deployment), while the unique fragmend ID appears at each > >> rendering the portlet (and it it constant as long as it is not changed > >> in PSML). > >> > >> In order to get access to all fragments use ContentPage and > >> ContentFragment implementations (getType() method to identify portlets) > >> and recurse through your portal structure parsing each .psml file. > >> > > A portlet isn't really supposed to know about its 'unique id' as that is > > an implementation detail of the portal. > > > > If you want to write portlets specific to Jetspeed-2, have a look at the > > j2-admin app which accesses portal services in the jetspeed-portlet.xml > > > > > > > > > > > > ... > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org > > For additional commands, e-mail: jetspeed-user-help@portals.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org > For additional commands, e-mail: jetspeed-user-help@portals.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org > For additional commands, e-mail: jetspeed-user-help@portals.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org For additional commands, e-mail: jetspeed-user-help@portals.apache.org