portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Sean Taylor <da...@bluesunrise.com>
Subject Re: Velocity Portlet Question
Date Mon, 31 Mar 2008 16:21:32 GMT

On Mar 29, 2008, at 7:54 AM, Brad Gardner wrote:

> I'm not too familiar with velocity, but have a portlet I am trying to
> understand.  I have all of the related files to the portlet, but  
> there is no
> .vm template to display the edit page of the portlet.  It looks like  
> all of
> the information for the edit page is configured in the portlet entry  
> in the
> .xreg file.  Am I correct to assume that the portlet does not need a
> template for an edit page and builds the page based on this  
> definition by
> default?
> If thats correct, I'd assume there is a way to use a custom template  
> for the
> edit page if you want?

NOTE: this is a Jetspeed-1 question....

Edit mode in j1 works a lot different than in the portlet api
In general, most portlets let jetspeed handle edit mode
Take for ex the Database Browser portlet, here is the base definition:

     <portlet-entry name="DatabaseBrowserPortlet" hidden="true"  
type="ref" parent="Velocity" application="false">
         <parameter name="template" value="database-browser-portlet"  
         <parameter name="action"  
value="portlets.browser.DatabaseBrowserAction" hidden="true"/>

and then a concrete definition. Jetspeed handles creating the edit  
mode template for you, using parameters.
Note that you can secure parameters, something not considered in the  
portlet api

	<portlet-entry name="DatabaseBrowserTest" hidden="false" type="ref"  
parent="DatabaseBrowserPortlet" application="false">
			<description>Simple Test Database Browser Portlet Example</ 
		<parameter name="sql" value="select * from coffees" type="style"  
			<security-ref parent="admin-only"/>
				<title>SQL Query</title>
		<parameter name="sql.style" value="TextArea" hidden="true"/>
		<parameter name="windowSize" value="5" hidden="false">
				<title>Window Size</title>
				<description>Number of rows per page to display</description>
		<!-- to use an alternate torque pool, set this parameter -->
		<!-- parameter name="poolname" value="otherpool" hidden="true"/-->
		<media-type ref="html"/>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message