myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott O'Bryan" <darkar...@gmail.com>
Subject Re: [jira] Created: (TOMAHAWK-1239) calendar in portlet
Date Thu, 24 Apr 2008 13:37:20 GMT
Oh sorry, I didn't read the whole response either.  :)  For issue #2, here
is my take on it from what I'm hoping to do in Trinidad very soon.

Trinidad has a "document" tag which is responsible for doing a number of
things (including setting up javascripts and whatnot).  IMO, it makes sense
for this tag to always be present on the page.  It also makes sense for
trh:html and trh:head components to be in a portlet for setup purposes,
especially because the intent from JSR-301 is to allow pages to be written
for BOTH a portal environment AND  a servlet environment at the same time...

But like you said, the <HTML>, <HEAD>, and <BODY> tags should be missing
from a portlets markup.  My intention in Trinidad is to make a
PortletResponseWriter (probably available as a configurator in the commons
but maybe somewhere else) that would strip out the unwanted tags but allow
the other tags to either be copied into the existing head or just fall
through.

The code you have below is not TECHNICALLY correct because in HTML 4.0.1,
the <LINK> tag should only be used in the head.  Currently, however, most
browsers handle this correctly (not sure about Opera).  Of course most
browsers correctly handle having multiple <HTML>,<HEAD>, and <BODY> tags
as
well..  :)

Scott

On Thu, Apr 24, 2008 at 5:27 AM, Sandro Röder (JIRA) <dev@myfaces.apache.org>
wrote:

> 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.
>
>

Mime
View raw message