Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.1.5
-
None
-
None
-
Pluto Portal
Description
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.