You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Lizann Epley <la...@uoblivion.com> on 2006/01/13 16:28:25 UTC

specifying id for deployed portlet

Hey all,

I have another question... Does anyone know if there is a way to specify 
the id to be used for a portlet in the psml? In other words, can the id 
be specified in the database instead of generated when the portlet is 
deployed?

I am using Derby with jetspeed2.

I would think that there is since the jetspeed portlets are referenced 
by specific ids instead of generated, however I recognize that it may 
just be a matter of properly inserting into the database on 
initialization as well...

Just thought I'd check!
-- lizann


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: specifying id for deployed portlet

Posted by Lizann Epley <la...@uoblivion.com>.
Hi Randy,

Yeah - it is the fragment id that I want to specify. For example, in 
this snippet form default-page.psml:
    <fragment id="dp-3" type="portlet" name="j2-admin::LocaleSelector">
      <property layout="TwoColumns" name="row" value="0" />
      <property layout="TwoColumns" name="column" value="1" />
    </fragment>  

id="dp-3"  -> I would like to be able to give the portlets a meaningful 
(and reproducable) id here. I am working in a dev. environment on a 
portal that will be distributed, so it would be nice to be able to 
provide the fragment id initially. In HSQL I went in and modified the 
text of the db to get the id that I wanted, but that is obivously not an 
optimal solution...

So the base question would be - how is it that on deployment the 
Jetspeed portlets have "dp-#" for a fragment id instead of 
P-{timestampAtDeploymentTime}- is this set up in the db setup sql?

Thanks!
-- Lizann
ps - i will review last weeks discussion as well...


Randy Watler wrote:

>Lizann,
>
>I am not sure which id you are after, but most of the ids associated
>with portlet ids come from the associated Fragment id. See any PSML file
>for Fragment definitions and check if that is indeed the id you are
>seeking.
>
>There is a DB PageManager that stores PSML in the DB. In that case, the
>ids would be in the DB if that is what you require. See messages on this
>list from the last week for how to configure the DB PageManager if you
>need it.
>
>Randy
>
>On Fri, 2006-01-13 at 10:28 -0500, Lizann Epley wrote:
>  
>
>>Hey all,
>>
>>I have another question... Does anyone know if there is a way to specify 
>>the id to be used for a portlet in the psml? In other words, can the id 
>>be specified in the database instead of generated when the portlet is 
>>deployed?
>>
>>I am using Derby with jetspeed2.
>>
>>I would think that there is since the jetspeed portlets are referenced 
>>by specific ids instead of generated, however I recognize that it may 
>>just be a matter of properly inserting into the database on 
>>initialization as well...
>>
>>Just thought I'd check!
>>-- lizann
>>
>>
>>---------------------------------------------------------------------
>>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


Re: specifying id for deployed portlet

Posted by Randy Watler <wa...@wispertel.net>.
Lizann,

I am not sure which id you are after, but most of the ids associated
with portlet ids come from the associated Fragment id. See any PSML file
for Fragment definitions and check if that is indeed the id you are
seeking.

There is a DB PageManager that stores PSML in the DB. In that case, the
ids would be in the DB if that is what you require. See messages on this
list from the last week for how to configure the DB PageManager if you
need it.

Randy

On Fri, 2006-01-13 at 10:28 -0500, Lizann Epley wrote:
> Hey all,
> 
> I have another question... Does anyone know if there is a way to specify 
> the id to be used for a portlet in the psml? In other words, can the id 
> be specified in the database instead of generated when the portlet is 
> deployed?
> 
> I am using Derby with jetspeed2.
> 
> I would think that there is since the jetspeed portlets are referenced 
> by specific ids instead of generated, however I recognize that it may 
> just be a matter of properly inserting into the database on 
> initialization as well...
> 
> Just thought I'd check!
> -- lizann
> 
> 
> ---------------------------------------------------------------------
> 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


Re: specifying id for deployed portlet

Posted by David Sean Taylor <da...@bluesunrise.com>.
Lizann Epley wrote:
> Hey all,
> 
> I have another question... Does anyone know if there is a way to specify 
> the id to be used for a portlet in the psml? In other words, can the id 
> be specified in the database instead of generated when the portlet is 
> deployed?
> 
> I am using Derby with jetspeed2.
> 
> I would think that there is since the jetspeed portlets are referenced 
> by specific ids instead of generated, however I recognize that it may 
> just be a matter of properly inserting into the database on 
> initialization as well...
> 
> Just thought I'd check!
> -- lizann
> 
The id for a fragment can be specified in the PSML file.
With the default File System impl of the Page Manager, if you provide 
your own fragment IDs, you must take care yourself to not duplicate the IDs.

One thing to note: if you import the pages into the database, the PSML 
fragment IDs will be discarded and new ids will be generated. This means 
that any code relying on the IDs from the PSML file will no longer 
properly refernence the fragment by ID.

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org