I have solved this problem with next solution:

1) The portlet calls:
 getPortletRequest().setAttribute("HideDecorator", new Boolean(true))

2) In webapps/jetspeed/decorations/portlet/decorator.vm I have introduced
variable $hidePortlet:
 #set($hidePortlet = $renderRequest.getAttribute("js_${
jetspeed.CurrentFragment.Id}_HideDecorator"))

3) After that I use variable $hidePortlet in velocity code of
decorator.vmthat displays decoration.


So, my decorator.vm is:
#*
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*#

#* ************************* READ ME *************************************
This is the default template to be used for rendering decorations.  If you
find you cannot accomplish your design requirements by defining a custom
style sheet for your decoration, you can define your own decorator.vm in
the root of your decortaion.  This will be used instead of the default.
************************************************************************ *#

#set($decoration = $f.decoration)
#set($actions = $decoration.actions)

<!-- Begin: Fragment: ${f.id} Decoration: ${decoratorId} -->

<div id="${f.id}" class="portlet ${decoration.baseCSSClass}">
 #set($solo = $jetspeed.MappedWindowState.toString()=="solo")
 #set($hidePortlet = $renderRequest.getAttribute("js_${
jetspeed.CurrentFragment.Id}_HideDecorator"))

 #if (!$solo && !$hidePortlet)
   <div class="PTitle" >
     <div class="PTitleContent">
       #set ($ws=$jetspeed.MappedWindowState)

       $!jetspeed.getTitle($jetspeed.getCurrentPortletEntity(), $f)
     </div>
 #end

 #PortletActionBar($decoration)

 #if (!$solo && !$hidePortlet)
   </div>
 #end

 #if (!$jetspeed.isHidden($f) && !$hidePortlet &&
$jetspeed.WindowState.toString() != "minimized")
   #if (!$solo)
     <div class="PContentBorder">
   #end
   <div class="PContent">

     $f.renderedContent

  <span style="line-height:0.005px; clear:both;
display:block">&nbsp;</span>
   </div>
   #if (!$solo)
     </div>
   #end
 #end
</div>

<!-- END: Fragment: ${f.id} Decoration: ${decoratorId} -->




2007/2/1, David Sean Taylor <[EMAIL PROTECTED]>:


On Jan 30, 2007, at 1:07 PM, Vitaly Baranovsky wrote:

>> What I think could be a solution is to set a property on the
>> PortletResponse that communicates back to the portal our instructions
>
> I have thought about something like this... Can you help me with
> name of the
> classes and methods that I must to modify in my jetspeed source
> code? And
> can you give me some suggestions about algorithm of modifications?
>
> Thank you!
>

The portlet calls:

portletResponse.setAttribute
(JetspeedConstants.DISPLAY_PORTLET_DECORATOR, new Boolean(false));

Looking at the Jetspeed code, the first thing I noticed is that we do
not implement one of the Pluto callback services, the PropertyManager
service.
So we would need to implement that for starters.
From there, you can lookup the properties by portlet window
I think the best place to tie this in would be on the LayoutPortlet
-- and make a velocity variable for the current decorator being parsed
Seems like a lot of work to go thru just to hide the title bar... but
the feature isn't there, so someone needs to do the groundwork




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
With best regards,
Vitaly Baranovsky

Reply via email to