You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "Woonsan Ko (JIRA)" <je...@portals.apache.org> on 2009/09/01 16:41:33 UTC

[jira] Created: (JS2-1058) JS_PORTLET_HEAD_ELEMENTS in event of file downloads.

JS_PORTLET_HEAD_ELEMENTS in event of file downloads.
----------------------------------------------------

                 Key: JS2-1058
                 URL: https://issues.apache.org/jira/browse/JS2-1058
             Project: Jetspeed 2
          Issue Type: Bug
    Affects Versions: 2.2.0
            Reporter: Woonsan Ko
            Assignee: Woonsan Ko
             Fix For: 2.2.1


This problem was reported by Lance Zhang as seen below.

--- On Sun, 8/16/09, Lance Zhang <lz...@yahoo.com> wrote:

> From: Lance Zhang <lz...@yahoo.com>
> Subject: Re: JS_PORTLET_HEAD_ELEMENTS in event of file download
> To: "Jetspeed Developers List" <je...@portals.apache.org>
> Date: Sunday, August 16, 2009, 4:02 PM
> I saw it is taking elements from the
> window, i guess this for the desktop, but can we change the
> code to be this way.
>
>
> if (!headElements.isEmpty())
>         {
>            
> out.println("<JS_PORTLET_HEAD_ELEMENTS>");
>             for
> (KeyValue<String, Element> kvPair : headElements)
>            {
>            
>    out.println(DOMUtils.stringifyElementToHtml(kvPair.getValue()));
>             }
>          
>    out.print("</JS_PORTLET_HEAD_ELEMENTS>");
>         }
>        
>
>
>
>
>
> ----- Original Message ----
> From: Lance Zhang <lz...@yahoo.com>
> To: Jetspeed Developers List <je...@portals.apache.org>
> Sent: Sunday, August 16, 2009 9:42:13 AM
> Subject: JS_PORTLET_HEAD_ELEMENTS in event of file
> download
>
> Hi, David,
>
> I am trying to use the FileServerPortlet and I think there
> is an issue.
>
> The FileServe pipeline invokes the PortletValve, in the
> PortletAggregatorImpl, the writeHeadElements by default
> write
> JS_PORTLET_HEAD_ELEMENTS to the header. That makes the
> browser not able to recognize the PDF coming back.
>
> Once i commented out the section of code, the PDF seems
> coming back fine, is this a defect or something wrong in the
> config?
>
> If it is header, why it is not using addHeader?
>
> thanks/Lance
>
> 

After looking into pipelines.xml, I found that there are two different portlet valves: portletValve and portletValveTitleInHeader. The former is for fileserver-pipeline and the latter is for the other pipelines.
So, I think we can check the "titleInHeader" member variable to decide whether head elements are to be included during portlet rendering for desktop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (JS2-1058) JS_PORTLET_HEAD_ELEMENTS in event of file downloads.

Posted by "Woonsan Ko (JIRA)" <je...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/JS2-1058?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Woonsan Ko resolved JS2-1058.
-----------------------------

    Resolution: Fixed

Write JS_PORTLET_HEAD_ELEMENTS only when any head element is contributed.
I have just applied the suggestion by Lance Zhang. Thank you so much!
(I don't think it's a good idea to use "titleInHeader" because of its different meaning.)

> JS_PORTLET_HEAD_ELEMENTS in event of file downloads.
> ----------------------------------------------------
>
>                 Key: JS2-1058
>                 URL: https://issues.apache.org/jira/browse/JS2-1058
>             Project: Jetspeed 2
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>            Reporter: Woonsan Ko
>            Assignee: Woonsan Ko
>             Fix For: 2.2.1
>
>
> This problem was reported by Lance Zhang as seen below.
> --- On Sun, 8/16/09, Lance Zhang <lz...@yahoo.com> wrote:
> > From: Lance Zhang <lz...@yahoo.com>
> > Subject: Re: JS_PORTLET_HEAD_ELEMENTS in event of file download
> > To: "Jetspeed Developers List" <je...@portals.apache.org>
> > Date: Sunday, August 16, 2009, 4:02 PM
> > I saw it is taking elements from the
> > window, i guess this for the desktop, but can we change the
> > code to be this way.
> >
> >
> > if (!headElements.isEmpty())
> >         {
> >            
> > out.println("<JS_PORTLET_HEAD_ELEMENTS>");
> >             for
> > (KeyValue<String, Element> kvPair : headElements)
> >            {
> >            
> >    out.println(DOMUtils.stringifyElementToHtml(kvPair.getValue()));
> >             }
> >          
> >    out.print("</JS_PORTLET_HEAD_ELEMENTS>");
> >         }
> >        
> >
> >
> >
> >
> >
> > ----- Original Message ----
> > From: Lance Zhang <lz...@yahoo.com>
> > To: Jetspeed Developers List <je...@portals.apache.org>
> > Sent: Sunday, August 16, 2009 9:42:13 AM
> > Subject: JS_PORTLET_HEAD_ELEMENTS in event of file
> > download
> >
> > Hi, David,
> >
> > I am trying to use the FileServerPortlet and I think there
> > is an issue.
> >
> > The FileServe pipeline invokes the PortletValve, in the
> > PortletAggregatorImpl, the writeHeadElements by default
> > write
> > JS_PORTLET_HEAD_ELEMENTS to the header. That makes the
> > browser not able to recognize the PDF coming back.
> >
> > Once i commented out the section of code, the PDF seems
> > coming back fine, is this a defect or something wrong in the
> > config?
> >
> > If it is header, why it is not using addHeader?
> >
> > thanks/Lance
> >
> > 
> After looking into pipelines.xml, I found that there are two different portlet valves: portletValve and portletValveTitleInHeader. The former is for fileserver-pipeline and the latter is for the other pipelines.
> So, I think we can check the "titleInHeader" member variable to decide whether head elements are to be included during portlet rendering for desktop.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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