Sorry if my question is stoopid... but what is this addRessources attribute?



-----Message d'origine-----
De : Martin Marinschek [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 20 février 2006 13:22
À : MyFaces Discussion
Objet : Re: inputCalendar

Or you set the addRessources attribute to false, and add the
javascript files yourself!

regards,

Martin

On 2/20/06, Matthias Wessendorf <[EMAIL PROTECTED]> wrote:
> On 2/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > I do not really understand what is this PhaseListener, is it to avoid to
use
> > Servlet? All Alfresco code is using Servlet me think so I should add
this
> > PhaseListener for my jsp pages where I have the calendars in top of my
> > inputCalendar?
>
> inside of Portlet is *can* cause problems to server resources with
> Servlets or Filters.
> Well, each PortletContainer is itself a servlet (like pluto for
> instance), but the support of Servlets and Filters inside a Portlet
> application (running inside the portlet container), depends on the
> Portlet container impl. itself (AFAIK).
>
> A PhaseListener is a JSF facility to hook (before / after) a special
> Phase of the JSF Lifecycle. You specifiy the desired phase inside of
> getPhaseId().
>
> As described in the blogs, it is also able to server resources like
javascript.
> So, you can try to create a PhaseListener, which servers the
> javaScript for the component, instead of relying on the Tomahawk
> filter for serving that stuff.
>
> -Matthias
>
> > Is it not easier to find a javascript popupCalendar on the web or I
cannot
> > due to servlets?
> >
> > I am a little bit lost... sorry
> >
> >
> > -----Message d'origine-----
> > De: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
> > Envoyé: lundi 20 février 2006 10:37
> > À: MyFaces Discussion; [EMAIL PROTECTED]
> > Objet: Re: inputCalendar
> >
> > Try to use a PhaseListener
> >
> > see also [1] and [2]
> >
> > [1] - http://tinyurl.com/q7yff
> > [2] - http://tinyurl.com/lzsbz
> >
> > HTH,
> > Matthias
> >
> > On 2/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > Thanks a lot for the answer. So that means that I cannot use this
MyFaces
> > > component then. Which other possibilities I have to add a calendar to
my
> > jsp
> > > page then? Adding a javascript? Will I have the same problem?
> > >
> > > Sophie
> > >
> > > -----Message d'origine-----
> > > De: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
> > > Envoyé: lundi 20 février 2006 09:32
> > > À: MyFaces Discussion; [EMAIL PROTECTED]
> > > Objet: Re: inputCalendar
> > >
> > > I think this is caused by the ServletFilter
> > >
> > > see also [1]
> > >
> > > <snip>
> > > We also found we could not use the MyFaces upload component as it
> > > doesn't fit into the constrained JSR 168 portal architecture. This is
> > > due to the fact that MyFaces relies on a servlet filter to process the
> > > multipart form data, but servlet filters are not executed in a portal
> > > environment. Overall, however, we are pleased with the quality of the
> > > MyFaces implementation.
> > > </snip>
> > >
> > > -Matthias
> > >
> > > [1] http://www.jsfcentral.com/articles/trenches_5.html
> > >
> > > On 2/20/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > Hi Bruno!
> > > >
> > > > Here is the stack trace I have (I am using Alfresco):
> > > >
> > > >
> > > > javax.portlet.PortletException: org.apache.jasper.JasperException:
> > > > org.jboss.portlet.JBossRenderRequest
> > > > at
> > > >
> > >
> >
org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycl
> > > > e(MyFacesGenericPortlet.java:254)
> > > > at
> > > >
> > >
> >
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericP
> > > > ortlet.java:400)
> > > > at
> > > >
> > >
> >
org.alfresco.web.app.portlet.AlfrescoFacesPortlet.facesRender(AlfrescoFacesP
> > > > ortlet.java:260)
> > > > at
> > > >
> > >
> >
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortle
> > > > t.java:266)
> > > > at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:154)
> > > > at javax.portlet.GenericPortlet.render(GenericPortlet.java:394)
> > > > at
> > > >
> > >
> >
org.jboss.portal.portlet.invocation.DispatcherInterceptor.invokeRequest(Disp
> > > > atcherInterceptor.java:163)
> > > > at
> > > >
> > >
> >
org.jboss.portal.portlet.invocation.DispatcherInterceptor.invoke(DispatcherI
> > > > nterceptor.java:195)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.portlet.invocation.PreferencesInterceptor.invoke(Preference
> > > > sInterceptor.java:93)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.invocation.component.ContextDispatcherInterceptor$In
> > > > vokeNextCommand.execute(ContextDispatcherInterceptor.java:94)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > at
> > > >
> > >
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > > > )
> > > > at
> > > >
> > >
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > > > .java:25)
> > > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.servlet.CommandServlet.doGet(CommandServlet.java:49)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.servlet.CommandServlet.doPost(CommandServlet.java:98
> > > > )
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:252)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:173)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> > > > java:672)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
> > > > er.java:539)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
> > > > .java:499)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.invocation.component.ContextDispatcherInterceptor.in
> > > > voke(ContextDispatcherInterceptor.java:58)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.core.invocation.AccessControlInterceptor.invoke(AccessContr
> > > > olInterceptor.java:125)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.invocation.component.CacheInterceptor.invoke(CacheIn
> > > > terceptor.java:74)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:238)
> > > > at org.jboss.portal.server.Component.invoke(Component.java:173)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.invocation.portal.MainDispatcherInterceptor.invoke(M
> > > > ainDispatcherInterceptor.java:93)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.core.invocation.StrategyInterceptor.invoke(StrategyIntercep
> > > > tor.java:184)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.core.invocation.ViewInterceptor.invoke(ViewInterceptor.java
> > > > :118)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.invocation.portal.TargetInterceptor.invoke(TargetInt
> > > > erceptor.java:153)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.core.invocation.ContentTypeInterceptor.invoke(ContentTypeIn
> > > > terceptor.java:117)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.core.invocation.UserContextInterceptor.invoke(UserContextIn
> > > > terceptor.java:92)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:213)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.impl.invocation.InvocationImpl.invokeNext(Invocation
> > > > Impl.java:238)
> > > > at
org.jboss.portal.server.PortalServer.invoke(PortalServer.java:186)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.servlet.AbstractMainServlet.invoke(AbstractMainServl
> > > > et.java:80)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.servlet.AbstractMainServlet.doGet(AbstractMainServle
> > > > t.java:73)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.servlet.AbstractMainServlet.doPost(AbstractMainServl
> > > > et.java:62)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:252)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:173)
> > > > at
> > > >
> > >
> >
org.jboss.portal.core.servlet.TransactionFilter.doFilter(TransactionFilter.j
> > > > ava:79)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:202)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:173)
> > > > at
> > > >
> > >
> >
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.ja
> > > > va:81)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:202)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:173)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
> > > > va:213)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
> > > > va:178)
> > > > at
> > > >
> > >
> >
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalVal
> > > > ve.java:39)
> > > > at
> > > >
> > >
> >
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssoci
> > > > ationValve.java:153)
> > > > at
> > > >
> > >
> >
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
> > > > .java:407)
> > > > at
> > > >
> > >
> >
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
> > > > 59)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126
> > > > )
> > > > at
> > > >
> > >
> >
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105
> > > > )
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
> > > > :107)
> > > > at
> > > >
> > >
> >
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > > > at
> > > >
> >
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
> > > > at
> > > >
> > >
> >
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
> > > > ction(Http11Protocol.java:744)
> > > > at
> > > >
> > >
> >
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
> > > > a:527)
> > > > at
> > > >
> > >
> >
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThre
> > > > ad.java:112)
> > > > at java.lang.Thread.run(Thread.java:595)
> > > > Caused by: javax.faces.FacesException:
> > org.apache.jasper.JasperException:
> > > > org.jboss.portlet.JBossRenderRequest
> > > > at
> > > >
> > >
> >
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(Portl
> > > > etExternalContextImpl.java:171)
> > > > at
> > > >
> > >
> >
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHand
> > > > lerImpl.java:195)
> > > > at
> > >
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
> > > > at
> > > >
> > >
> >
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericP
> > > > ortlet.java:396)
> > > > ... 73 more
> > > > Caused by: javax.portlet.PortletException:
> > > > org.apache.jasper.JasperException:
org.jboss.portlet.JBossRenderRequest
> > > > at
> > > >
> > >
> >
org.jboss.portal.portlet.impl.PortletRequestDispatcherImpl.include(PortletRe
> > > > questDispatcherImpl.java:131)
> > > > at
> > > >
> > >
> >
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch(Portl
> > > > etExternalContextImpl.java:164)
> > > > ... 76 more
> > > > Caused by: org.apache.jasper.JasperException:
> > > > org.jboss.portlet.JBossRenderRequest
> > > > at
> > > >
> > >
> >
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
> > > > 70)
> > > > at
> > >
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
> > > > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
> > > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:252)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:173)
> > > > at
> > > >
> > >
> >
org.jboss.portal.portlet.impl.PortletRequestDispatcherImpl.execute(PortletRe
> > > > questDispatcherImpl.java:71)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > at
> > > >
> > >
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > > > )
> > > > at
> > > >
> > >
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > > > .java:25)
> > > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > > at
> > > >
> > >
> >
org.jboss.portal.server.servlet.CommandFilter.doFilter(CommandFilter.java:54
> > > > )
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
> > > > FilterChain.java:202)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
> > > > ain.java:173)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
> > > > java:672)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
> > > > er.java:574)
> > > > at
> > > >
> > >
> >
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
> > > > .java:499)
> > > > at
> > > >
> > >
> >
org.jboss.portal.portlet.impl.PortletRequestDispatcherImpl.include(PortletRe
> > > > questDispatcherImpl.java:113)
> > > > ... 77 more
> > > >
> > > > -----Message d'origine-----
> > > > De: Bruno Aranda [mailto:[EMAIL PROTECTED]
> > > > Envoyé: lundi 20 février 2006 00:49
> > > > À: MyFaces Discussion; [EMAIL PROTECTED]
> > > > Objet: Re: inputCalendar
> > > >
> > > > Can you post some more of the stack trace?
> > > >
> > > > Bruno
> > > >
> > > > On 2/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > >
> > > > >
> > > > > Hello !
> > > > >
> > > > >
> > > > >
> > > > > I got into trouble with inputCalendar since a while. Please could
> > > somebody
> > > > > tell me what I am doing wrong here because as soon as I use
> > > > > renderAsPopup=true I have this error message:
> > > > >
> > > > >
> > > > >
> > > > > javax.portlet.PortletException:
> > > > > org.apache.jasper.JasperException:
> > > > > org.jboss.portlet.JBossRenderRequest
> > > > >
> > > > > caused by:
> > > > >
> > > > > javax.faces.FacesException:
> > > > > org.apache.jasper.JasperException:
> > > > > org.jboss.portlet.JBossRenderRequest
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Here is my code in my jsp page:
> > > > >
> > > > > <%@ taglib uri="http://myfaces.apache.org/tomahawk";
> > > > > prefix="t"%>
> > > > >
> > > > > <f:loadBundle
> > > > > basename="org.apache.myfaces.examples.resource.example_messages"
> > > > > var="example_messages"/>
> > > > >
> > > > > […]
> > > > >
> > > > > <td>
> > > > >
> > > > >    <h:outputText value="#{example_messages['js_popup']}"/>
> > > > >
> > > > >    <h:outputText value="#{NewUserWizard.birthday}" />
> > > > >
> > > > >    <f:verbatim><br/><br/></f:verbatim>
> > > > >
> > > > >    <h:form id="calendarForm3">
> > > > >
> > > > >         <t:inputCalendar
> > > > > monthYearRowClass="yearMonthHeader"
> > > > > weekRowClass="weekHeader"
> > > > >
> > > > >          currentDayCellClass="currentDayCell"
> > > > > value="#{NewUserWizard.birthday}"
> > > > >
> > > > >          renderAsPopup="true"
> > > > >
> > > > >
> > > > > popupTodayString="#{example_messages['popup_today_string']}"
> > > > >
> > > > >
> > > > > popupWeekString="#{example_messages['popup_week_string']}"
> > > > >
> > > > >          renderPopupButtonAsImage="true" />
> > > > >
> > > > >    </h:form>
> > > > >
> > > > > </td>
> > > > >
> > > > >
> > > > >
> > > > > And here is what I added to web.xml:
> > > > >
> > > > >
> > > > >
> > > > > <filter>
> > > > >
> > > > >         <filter-name>extensionsFilter</filter-name>
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
<filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filte
> > > > r-class>
> > > > >
> > > > >     </filter>
> > > > >
> > > > >     <filter-mapping>
> > > > >
> > > > >         <filter-name>extensionsFilter</filter-name>
> > > > >
> > > > >         <url-pattern>*.faces</url-pattern>
> > > > >
> > > > >     </filter-mapping>
> > > > >
> > > > >     <filter-mapping>
> > > > >
> > > > >         <filter-name>extensionsFilter</filter-name>
> > > > >
> > > > >         <url-pattern>/faces/*</url-pattern>
> > > > >
> > > > >     </filter-mapping>
> > > > >
> > > > >     <filter-mapping>
> > > > >
> > > > >       <filter-name>extensionsFilter</filter-name>
> > > > >
> > > > >             <url-pattern>*.html</url-pattern>
> > > > >
> > > > >       </filter-mapping>
> > > > >
> > > > >     <filter-mapping>
> > > > >
> > > > >       <filter-name>extensionsFilter</filter-name>
> > > > >
> > > > >             <url-pattern>*.jsp</url-pattern>
> > > > >
> > > > >       </filter-mapping>
> > > > >
> > > > >       <filter-mapping>
> > > > >
> > > > >       <filter-name>extensionsFilter</filter-name>
> > > > >
> > > > >             <servlet-name>FacesServlet</servlet-name>
> > > > >
> > > > >       </filter-mapping>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Sophie
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > > Zülpicher Wall 12, 239
> > > 50674 Köln
> > > http://www.wessendorf.net
> > > mwessendorf-at-gmail-dot-com
> > >
> > >
> >
> >
> > --
> > Matthias Wessendorf
> > Zülpicher Wall 12, 239
> > 50674 Köln
> > http://www.wessendorf.net
> > mwessendorf-at-gmail-dot-com
> >
> >
>
>
> --
> Matthias Wessendorf
> Zülpicher Wall 12, 239
> 50674 Köln
> http://www.wessendorf.net
> mwessendorf-at-gmail-dot-com
>


--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to