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 Aaron Evans <aa...@gmail.com> on 2008/09/15 16:49:45 UTC

Overriding default JSP portlet decorator

I'm converting my decorators to JSP and I've noticed that for my
portlet decorator, it seems to always use
jetspeed/decorations/portlet/decorator.jsp.

Is there a way I can configure my decorator to use
jetspeed/decorations/portlet/my-decorator/decorator.jsp?

thanks,
aaron

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


Re: Overriding default JSP portlet decorator

Posted by Aaron Evans <aa...@gmail.com>.
Ok, thanks.  I guess the question then is why isn't set up like that
already? Is it a known bug?



On Tue, Sep 16, 2008 at 4:10 AM, Woonsan Ko <wo...@yahoo.com> wrote:
> Hi Aaron,
>
> In the /jetspeed/WEB-INF/templates/layout/html/*/ folders, there are layout.jsp containing the some code fragments like the following:
>
>    String _tempPath = _frag.getDecoration().getBasePath();
>    String _portletJSP = _tempPath.substring(0,_tempPath.lastIndexOf('/')) +
>                      "/decorator.jsp";
>
> I think you can modify the above as follows:
>
>    String _portletJSP = "/" + _frag.getDecoration().getResource("decorator.jsp");
>
> It will find your custom decorator jsp page and it will do fallback algorithm if there's no jsp template file in your custom decorator folder.
>
>
> Regards,
>
> Woonsan
>
> --- On Mon, 9/15/08, Aaron Evans <aa...@gmail.com> wrote:
>
>> From: Aaron Evans <aa...@gmail.com>
>> Subject: Overriding default JSP portlet decorator
>> To: "Jetspeed Users List" <je...@portals.apache.org>
>> Date: Monday, September 15, 2008, 4:49 PM
>> I'm converting my decorators to JSP and I've noticed
>> that for my
>> portlet decorator, it seems to always use
>> jetspeed/decorations/portlet/decorator.jsp.
>>
>> Is there a way I can configure my decorator to use
>> jetspeed/decorations/portlet/my-decorator/decorator.jsp?
>>
>> thanks,
>> aaron
>>
>> ---------------------------------------------------------------------
>> 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: Overriding default JSP portlet decorator

Posted by Woonsan Ko <wo...@yahoo.com>.
Hi Aaron,

In the /jetspeed/WEB-INF/templates/layout/html/*/ folders, there are layout.jsp containing the some code fragments like the following:

    String _tempPath = _frag.getDecoration().getBasePath();
    String _portletJSP = _tempPath.substring(0,_tempPath.lastIndexOf('/')) +
                      "/decorator.jsp";
           
I think you can modify the above as follows:

    String _portletJSP = "/" + _frag.getDecoration().getResource("decorator.jsp");

It will find your custom decorator jsp page and it will do fallback algorithm if there's no jsp template file in your custom decorator folder.


Regards,

Woonsan

--- On Mon, 9/15/08, Aaron Evans <aa...@gmail.com> wrote:

> From: Aaron Evans <aa...@gmail.com>
> Subject: Overriding default JSP portlet decorator
> To: "Jetspeed Users List" <je...@portals.apache.org>
> Date: Monday, September 15, 2008, 4:49 PM
> I'm converting my decorators to JSP and I've noticed
> that for my
> portlet decorator, it seems to always use
> jetspeed/decorations/portlet/decorator.jsp.
> 
> Is there a way I can configure my decorator to use
> jetspeed/decorations/portlet/my-decorator/decorator.jsp?
> 
> thanks,
> aaron
> 
> ---------------------------------------------------------------------
> 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