[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12617832#action_12617832
 ] 

Leonardo Uribe commented on TOMAHAWK-1239:
------------------------------------------

This problem is related to MYFACES-434 MyFaces's Portlet enhancement, and right 
now t:inputCalendar is working in portlets using NonBufferingAddResource (do 
the solution previously done before, but in a better way). The only thing left 
to do on MYFACES-434 is add portlet support to t:inputFileUpload.

I'll close this issue as duplicated of MYFACES-434

> calendar in portlet
> -------------------
>
>                 Key: TOMAHAWK-1239
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1239
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Calendar
>    Affects Versions: 1.1.5
>         Environment: Pluto Portal
>            Reporter: Sandro Röder
>
> Hi,
> i try to create a popupcalendar with the tag t:inputCalendar in a portlet.
> There were two errors:
> 1.
> The portlet page dosent open. The error was "The Extensionfilter is not 
> configured correctly....". 
> But the Page was opened if i use the same page in a normal web application.
> I could fix this problem after i created a Portlet which extends the 
> MyFacesGenericPortlet. I entered the folowing line to the render Method 
> before I call the super.render:
> request.setAttribute("org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled",
>  "org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled");
> Full Method:
> public void render(RenderRequest request, RenderResponse response)
>                       throws PortletException, IOException {
>       // This is a bugfix for tomahwk extension in portlet
>       
> request.setAttribute("org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled",
>  "org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled"); 
>       super.render(request, response);
> }
> 2.)
> After i solve the previus error there was another one.
> I got javascript errors after i pressed the calendar-popup key. The main 
> reason was tomahawk could not add his javascript files to the page, because 
> portletsites haven't  a <head> tag.
> I solve this problem: I add the following lines to the page where the 
> popupcalendar is rendered:
>         <link rel="stylesheet" 
> href="<%=renderResponse.encodeURL(renderRequest.getContextPath())%
>          
> >/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12087850/calendar.HtmlCalendarRenderer/WH/theme.css"
>  type="text/css" />
>          <link rel="stylesheet" 
> href="<%=renderResponse.encodeURL(renderRequest.getContextPath())%
>          
> >/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12087850/calendar.HtmlCalendarRenderer/DB/theme.css"
>  type="text/css" />
>          <script type="text/javascript" 
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath())%
>           
> >/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12087850/prototype.PrototypeResourceLoader/prototype.js">
>           </script>
>           <script type="text/javascript" 
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath())%
>           
> >/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12087850/calendar.HtmlCalendarRenderer/date.js">
>          </script>
>          <script type="text/javascript" 
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath())%
>          
> >/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12087850/calendar.HtmlCalendarRenderer/popcalendar.js">
>         </script>
>         <script type="text/javascript" 
> src="<%=renderResponse.encodeURL(renderRequest.getContextPath())%
>         
> >/faces/extensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/12087850/inputTextHelp.HtmlTextHelpRenderer/inputTextHelp.js">
>         </script>
> ....and it works fine
> Thanks.

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

Reply via email to